Improve Windows build instructions
gonutz opened this issue · comments
I followed your instructions to get the game running on Windows. I installed Qt, cmake and Visual Studio and am able to build the game but your last instructions were not clear to me. In your README you say:
Run windeployqt to copy dependencies into bin folder.
C:\Qt\5.10.1\msvc2017_64\bin\windeployqt.exe --release dist\procalc.exe --dir dist
It gives me the error
"dist\procalc.exe" does not exist.
so instead I use Release
instead of dist
for the directory, making the command
C:\Qt\5.10.1\msvc2017_64\bin\windeployqt.exe --release Release\procalc.exe --dir Release
which works for me. However, when running the game I noticed that in the About dialog after the calculator changes for the first time, it seems to not find the path to an image in Debug build, here is what I see
but I remember that the Steam version had the Apex logo there or some other image.
The Settings
dialog is also blank and just has the magic number displayed.
Looks like the INSTALL target didn't run, or it installed to the wrong place. Did you forget to supply -D CMAKE_INSTALL_PREFIX=./dist
when running cmake? Also, make sure you run cmake from inside project_root/build/win64.
Inside
pro_office_calc\dependencies\build\win64
I ran
cmake -D USE_LOCAL_DEPS=1 -D CMAKE_INSTALL_PREFIX=./dist -D CMAKE_BUILD_TYPE=Debug -G "Visual Studio 15 2017 Win64" ../..
Then I get the error message described above. To be sure I just started all over again and did everything as you described and got the same results.
I got the game working by copying the data folder into the Release folder, next to the procalc.exe so it at least finds the data and runs so now I can start changing the code to see what is what.
Good to hear. I was in the process of typing this, so might as well post it.
From <project_root>/dependencies/build/win64 run
cmake -D CMAKE_CXX_FLAGS=/w ^
-D CMAKE_INSTALL_PREFIX=./dist ^
-G "Visual Studio 15 2017 Win64" ../..
Open the solution, select the Release configuration from the drop-down, then build ALL_BUILD.
You should now have the dependencies built and installed to <project_root>/dependencies/build/win64/dist.
Now, from <project_root>/build/win64, run
cmake -D USE_LOCAL_DEPS=1 ^
-D CMAKE_INSTALL_PREFIX=./dist ^
-D CMAKE_BUILD_TYPE=Debug ^
-G "Visual Studio 15 2017 Win64" ../..
Open the solution, select the Release configuration (even if Debug was specified above), and build INSTALL.
Now run
C:\Qt\5.10.1\msvc2017_64\bin\windeployqt.exe --release Release\procalc.exe --dir Release
The game should now be in <project_root>/build/win64/dist with all its dependencies.
I did everything as you said, instead that you changed the windeplyqt
line to use Release
instead of dist
as stated in your README. Using Release works as mentioned above, still I need to copy over the data
folder manually into the Release
folder or it will lack all images.
One more question, is it correct that once I got this all working, I can just fire up the procalc VS solution, hit build and run and it works? The windeployqt does not need to be executed every time, does it?
One more question, is it correct that once I got this all working, I can just fire up the procalc VS solution, hit build and run and it works? The windeployqt does not need to be executed every time, does it?
That's correct.
OK thanks very much for your help so far, I am now able to modify the game and run it from VS.
I have to say, downloading and installing 25 GB of stuff is quite the endeavor for a 100 MB game - you choosing Qt was a brave decision and I am a bit proud of getting everything to run ;-)
But seriously, your build instructions are very good, typically when I try to build something off github it fails at several points until I rage quit but your README is great and I very much appreciate your quick response time in the comments.
I will let you know when I find a solution for the mouse issue #6.
Thanks, yeah Qt is a huge framework, but the bits of it that actually get deployed to the user aren't too big.
I think I've just fixed the bug. Can you pull the latest from the develop branch and confirm?
Indeed! Still, this issue here is for the readme, maybe you could change the line above to
C:\Qt\5.10.1\msvc2017_64\bin\windeployqt.exe --release Release\procalc.exe --dir Release
in there. I am going to close this now anyway.