I have two machines the first one is
Machine A : Windows 7 professional with service pack 1 and VS2012
Machine B : Windows 8.1 and VS2012
Now Machine A gives the following result
E:\>rm
rm: too few arguments
Try `rm --help' for more information.
Whereas Machine B gives the following
C:\>rm
'rm' is not recognized as an internal or external command,
operable program or batch file.
How do I make the rm command work in Windows 8 VS2012 Command Prompt. Is their an add-on I need to install ?
Install GnuWin32 CoreUtils found at http://gnuwin32.sourceforge.net/packages/coreutils.htm. Then add C:\Program Files (x86)\GnuWin32\bin to your PATH.
Related
I'm using Visual Studio 2019 combined with CMake to cross compile my project on both PC environment (generating .sln file) and remote Linux machine (Generating Makefile file). I'm switching between the environments using Visual Studio's Cross Compilation feature.
Is it somehow possible to run a Windows batch script on POST_BUILD command even when I'm generating CMake on the Linux environment ?
I want this (or any other solution which will achieve the same) to work even when generating on Linux:
add_custom_command(
POST_BUILD
myTarget
COMMAND cmd /c H:/pathToMyCommand/myCommand.bat
)
(remember that I'm in Windows enviroment as Visual Studio is invoking CMake on the remote Linux machine)
I currently adding a custom command which run a shell script directly from the Linux machine and connecting to the Windows environment, but I prefer to run a batch directly from Windows.
Is it possible?
I'm trying to do build in Developer Command Prompt of VS 2019 using Python script.
Here is piece of code i'm using:
import os
os.system('start /wait C:/Windows/System32/cmd.exe "msbuild C:/Users/Desktop/Project/Project.sln"')
os.system("pause")
But it is not working.Developer command prompt is appearing for just 1sec and disappearing .
When i took variable to check if command was succesful or not ,it is giving variable result as zero,which means command is successful but i'm not able to see it in Developer command prompt.
result= os.system('start /wait C:/Windows/System32/cmd.exe /k ipconfig')
print (result)
Whereas when i'm trying the same command in windows command prompt it's working fine.
How to run a command in Developer command prompt 2019 using Python
Developer command prompt 2019 is a tool which is integrated into VS2019 IDE and provides environment parameters for various development modules.
However, the CMD.exe does not have these environment variables for these, so you cannot just use CMD.exe directly. Sorry that I am not familiar with python code and script. I suggest you could configure Developer command prompt 2019 into System environment variable PATHand then call cmd.exe which integrates the related variables to build your projects without any errors.
Suggestion
First, if you build your project on another new agent, you should install one of tool from step 1.
1) If you install VS2019 IDE in your local agent,please make sure that your local agent has VS2019 IDE and install the related workload about your project type.
Besides, if you install Build Tool for VS2019, please also install the related workload.
2) set the below path under System environment variable PATH
VS2019 IDE:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin
Build Tool for VS2019:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin
3) Then you can call your python script as you described to build your projects.
Any feedback and concern will be expected.
I'm trying to run the configure.py for PyQt5 from git bash, but it errors out, giving me a Fatal Error U1077. Some other people have encountered this problem, and I've been trying some of the stuff that other people have been saying, but I'm kind of new to this and it's pretty confusing.
The important section is "fatal error U1077: '.\cl.EXE' : return code '0x000135' " but I don't really know what that means.
Here are the complete steps to configure and install PyQt5 from source, you will need first to run command :
python configure.py
At this step, you did not install PyQt5, you only configured it (basically its installation dir, etc...), Do not specify your qmake path.
Next step is to source your environment variables by running in terminal :
"C:\Qt\Qt5.x.x\5.x\msvc2015\bin\qtenv2.bat"
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
Replace the x by your version of Qt. Keep the double quotes, windows does not like spaces ...
Be careful to specify your Visual Studio installation. In windows, "make" is substituted by "nmake" !
the second command will change your path to Visual Studio, just stay in the same terminal and return to your PyQt5 path.
Then you run :
nmake
nmake install
You may encounter an error when you compile QtNfc. Then use :
python configure.py --disable QtNfc
and re-compile everything.
Hope this will helps.
You don't need Git Bash to install PyQt5 on Windows you can use the Windows command prompt. Here is a step by step guide to install PyQt5 using Qt5.5 on Windows (if you are interested in a newer version you just need to adapt the paths):
Download and install Qt5.5.1 + Mingw32
Download and uncompress SIP
Download and uncompress PyQt5.5.1
Bring up command prompt window, navigate to the uncompressed SIP directory, and type the following:
> PATH=C:\Qt\5.5\mingw492_32\bin;C:\Qt\Tools\mingw492_32\bin;%PATH%
> python configure.py -p win32-g++
> mingw32-make
> mingw32-make install
Using the same command prompt window, navigate to the uncompressed PyQt5 directory, and type the following:
> python configure.py --spec win32-g++ --disable QtPositioning --no-qsci-api --no-designer-plugin --no-qml-plugin --confirm-license
> mingw32-make
> mingw32-make install
NOTE #1: that disabling QtPositioning is not really necessary, but sometime the compiler complains that it's not able to locate the qgeolocation.h header, so leave it disabled unless you really need it.
NOTE #2: To date, I was not able to compile the 5.7 version of PyQt5, not the 5.6 version (for some unexplainable errors that I couldn't solve). This is why I wrote this little installation tutorial using PyQt5.5.
How does one install web2py on Windows XP using cygwin? I've just installed cygwin and downloaded web2py in cygwin using
curl -O http://www.web2py.com/examples/static/web2py_src.zip
but when I try to unzip it using
unzip web2py_src.zip
it doesn't work (returns the error: -bash: unzip: command not found)
What do I do?
I was actually trying to open web2py from cygwin command prompt. Instead I used Windows CMD (after a day's crash course on it) and have been able to open web2py from the WCMD. I simply cd'd to the directory web2py was (I moved it from Downloads to drive C), then ran the -S projectname command, and voila, my project has been created and I'm able to work from the WCMD.Please I may be asking more questions as my journey progresses. Thanks to Regexident for your swift attempt to help!
I just installed the Windows 7.1 SDK and launched the SDK Command Prompt. If I type nmake, I am greeted with this message:
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.
This is what I expect. However, I want to target Windows x64, so I type: setenv /x64. Then if I run nmake, I get an error:
'nmake' is not recognized as an internal or external command,
operable program or batch file.
Why am I getting this error? What am I doing wrong? I am using Windows 8 Consumer Preview 32-bit on my machine.
Edit: here is a diff of the PATH environment variable before and after:
http://diffchecker.com/9jdFi5d
It seems Microsoft forgot to place an nmake.exe binary in the x86_amd64 directory (the others all have it). I suggest copying the nmake.exe in the main Bin directory to the ´Bin/x86_amd64` directory.