How to build for Windows? Noob help

How to build for Windows? Noob help

Postby HellFire2345 » 22 Sep 2014, 01:41

I am a complete noob when it comes to C++ and visual studio, and the current tutorial on how to build the game for windows doesn't give enough information... When using cmake, it fails to find a bunch of libraries and includes, so I directed them to the correct places, and I managed to get a .sln that I can open in VS2013. However, there are a lot of compiling errors, and somehow once I managed to compile the game under Debug, the game crashes on startup, and under Release, the game doesn't even open.

Can someone possibly give me EVERY STEP I need to take in order to build the game under VS2013? Help would be greatly appreciated.
HellFire2345
 
Posts: 2
Joined: 22 Sep 2014, 01:36

Re: How to build for Windows? Noob help

Postby Auria » 23 Sep 2014, 02:07

Hi,

it's hard to help when we don't know what the problem is.
can you please try to follow the tutorial on the website, but when you meet a problem, simply post the exact error message here?
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: How to build for Windows? Noob help

Postby HellFire2345 » 23 Sep 2014, 04:17

Sorry if I'm sounding like a complete idiot here, but I don't do a lot of programming in Visual Studio and it's very confusing to me.
I only want to build the game for Windows, I can compile for Linux fine but windows seems to be where my troubles are.
Exact steps I took, I'm not sure what's relevant and what's not, but here:

1. Installed Visual Studio 2013 for Desktop. Running Windows 7 32-bit. Works fine.
2. Downloaded the code from the "Download ZIP" button on https://github.com/supertuxkart/stk-code
3. Extracted the folder inside stk-code-master to C:\TuxKart ----> C:\TuxKart\stk-code-master\
4. Downloaded dependencies_for_0.8.2-new.zip from the github page. Extracted dependencies folder to C:\TuxKart\stk-code-master\ ----> C:\TuxKart\stk-code-master\dependencies.
5. SVN checkout stk-assets to C:\TuxKart, ----> C:\TuxKart\stk-assets\
6. Installed cmake, ran cmake-gui.
Set Source Code (first box) to C:/TuxKart/stk-code-master.
Set binary directory (second box) to C:/TuxKart/stk-code-master/bld
7. Hit Configure, Yes, then set generator to Visual Studio 12 2013, Use default native compilers checked. Hit Finish.
8. Waited for everything to finish, then it all turned red, is this bad? It actually found the dependencies this time because I put them in the right place.
9. Hit Generate, gave me a warning. Assumed it was nothing, got a .sln in the bld folder.
10. Opened the sln, waited to parse. Switched to Release. Built solution.
11. No errors. Copied over SuperTuxKart.exe and all the dlls over to the stk-assets folder, so the "data" folder and the exe were in the same place.
The exe fails to start. Absolutely nothing opens. in Task Manager, the program closes itself after opening it.

Any ideas?
HellFire2345
 
Posts: 2
Joined: 22 Sep 2014, 01:36

Re: How to build for Windows? Noob help

Postby deve » 23 Sep 2014, 05:53

It looks fine. Did you copy assets to data directory? You need both - directories from "data" and "stk-assets" in the same place. On linux it's done automatically when you use make install.

If you still will have an error, look what the logs say:
c:\users\%your user%\appdata\roaming\supertuxkart\stdout.log

You can also try to compile it in debug mode. In this case some logs will be displayed in console.

Edit:
To be more clear. You need to have all files in following structure:
>Supertuxkart
--->data
------>karts
------>models
------>gui
------>shaders
------> ...
--->supertuxkart.exe
--->*.dll
deve
 
Posts: 268
Joined: 23 Jan 2014, 13:45

Re: How to build for Windows? Noob help

Postby hiker » 23 Sep 2014, 13:40

HellFire2345 {l Wrote}:8. Waited for everything to finish, then it all turned red, is this bad? It actually found the dependencies this time because I put them in the right place.
9. Hit Generate, gave me a warning. Assumed it was nothing, got a .sln in the bld folder.

This is indeed probably something that can be ignored, but feel free to post the warning message here so we can confirm.

10. Opened the sln, waited to parse. Switched to Release. Built solution.
11. No errors. Copied over SuperTuxKart.exe and all the dlls over to the stk-assets folder, so the "data" folder and the exe were in the same place.

Sounds good. There is no need to copy anything. Just hit 'F5' inside of VS, and it should run (and if not, it should at least print a warning).

Could you try that?

Thanks!
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Who is online

Users browsing this forum: No registered users and 1 guest