Deploying for Windows and Mac
-
Hi,
I have created a small little app on a Mac and I was wondering what would be the steps to compile this little application to create an executable file for Windows.
I actually copied the two folders where the project resides to my Windows machine but as expected I got an error.
bq. Error while building project applicationName(target: Desktop)
When executing build step 'qmake'What would be the proper procedure to create an .exe file for Windows after creating the app on a Mac?
Thanks a lot for your help!
-
Just copying in the folder probably means that you copied all kinds of temporary files created by the Mac build along with the source code. This will not work (tm). For example, Makefiles generated on Mac for the Mac C++ compiler will not work at all on Windows.
Firstly, you need to clean the source directory before copying the files over (side note: Dude, get a source code repo, there is Github and tons of other free options!).
Then run qmake on Windows on the .pro file to generate Windows build files. How to do that depends on your compiler and setup. See http://qt-project.org/doc/qt-4.8/qmake-tutorial.html for how to use QMake.
-
Thank you for your reply.
This is how I did it.
1-Created a new project in my Windows machine.
2-Copied the files from the project created on the Mac (main.cpp,mainwindow.cpp, mainwindow.ui etc ) and replaced the files in the Windows machine, and it did the trick.bq. Firstly, you need to clean the source directory before copying the files over (side note: Dude, get a source code repo, there is Github and tons of other free options!).
I do have an account but I have never use it because I don't see how this could help me if I'm not collaborating with any body, in fact I don't even know how to use Github.
Excuse my ignorance but what would be the benefit of using Github?
Can you please give me a quick explanation on how you use Github?
Thanks a lot
-
The benefit of using a repository is that there is a managed process of working with multiple setups and tracking changes done for the different target platforms. It is one of the first things to learn when developing code, just as important as the coding itself.
For an introduction to Github, see http://learn.github.com/p/intro.html
By the way, your initial error message looks like QMake is not in the path.
[Edit: Fixed path by removing . from the end; mlong]
-
Thanks a lot for your help!
I will give it a try. For some reason the link doesn't work, but I guess my homework is to find good tutorials.
Thanks
-
The link should work now.
-
I apreciate it. Thanks a lot!
-
Oops, sorry for the messed up path. Thanks, @mlong!