Compiling spring (mingw and visual studio 7/8)
Moderator: Moderators
Now this thread has been promoted to "how to build spring code in mingw/dev-cpp" too, let me list some links. Except for TortoiseSVN, which can be replaced by the commandline svn client or SmartSVN and Dev-Cpp, which can be replaced by a bare MinGW system, the linked programs are a must-have if you want to compile spring with MinGW/Dev-Cpp.
Oh, and quick instructions:
- Dev-Cpp installer
- Tortoise SVN installer
- Python 2.4 installer
- Python win32 extensions installer
- Scons installer
Oh, and quick instructions:
- Grab and install the above programs.
- Make sure C:\Python2.4 and C:\Dev-Cpp\bin are in your PATH environment variable. Make sure a MINGDIR environment variable with value C:\Dev-Cpp exists. (change paths where appropriate.) Set environment variables by: Start -> Settings -> Control Panel -> System -> Advanced -> Environment variables (for Windows XP).
- Checkout the TA Spring SVN repository.
- Open a console (Start -> Run -> cmd.exe -> Run), cd \path\to\taspring<enter> (where you checked it out in the previous step) and type scons configure<enter>, followed by scons<enter>. Refer to scons --help for options which can be passed to scons configure.
- Wait.
- Copy over datafiles and stuff from official spring to the game dir (where spring.exe is created).
- Copy missing DLLs from mingwlibs/dll.
- Start developing.
Last edited by Tobi on 28 Mar 2006, 21:03, edited 1 time in total.
I just built TA Spring using MingW on Windows 2k, and i could load a map WITHOUT crash!!!
I rebuilt the devIL libs, but there are some strange things...
At first, compile faild, because -lIL wasn't found, i renamed libdevIL.a to libIL.a and it worked(i just remember, i also created the mingwlibs folder, because i extracted this folder in dev-cpp at first, i thing thats the reason why it worked, no the renaming...), but the game crashed when loading a map.
Later i downloaded and rebuilt the devIL libs, with much much problems..
after deleting unsued extensions (tif,png,mng) it finally compiled. i got a IL.dll and a IL.dll.a .. now i was unsre what to do.. moved the IL.dll.a to the /libs and renamed it to libIL.dll.a (which was not the name i wanted, but i forget it), then i copied over the includes folder of the devIL package, then i renamed the libIL.a in my dev-cpp folder to libIL.a_, so it was not used any more (a same copy of this file called libdevIL.a still exists in mingwlibs/), then i compiled ta spring again... the new ta spring file was copied over to the ta spring game dir, then i started it, error -> dll IL.dll not found... i copied it over, tryed again, and it worked!!!!!!!!
Here are the new created files from devIL :
http://user.supradigital.org/suprano/devIL.rar
You need to copy & rename mods/XTAPE.sd7 to mods/XTAPEv3.sd7 and you have to copy the guis & bitmaps folder from the svn dir to the spring game dir(not sure if it were these 2)
I also uploaded a binary:
http://user.supradigital.org/suprano/springmingw.exe
EDIT: I just joined a online game, but a few seconds after start, the sync errors started and after 10 secs the game closed without error message..
--Ano
I rebuilt the devIL libs, but there are some strange things...
At first, compile faild, because -lIL wasn't found, i renamed libdevIL.a to libIL.a and it worked(i just remember, i also created the mingwlibs folder, because i extracted this folder in dev-cpp at first, i thing thats the reason why it worked, no the renaming...), but the game crashed when loading a map.
Later i downloaded and rebuilt the devIL libs, with much much problems..
after deleting unsued extensions (tif,png,mng) it finally compiled. i got a IL.dll and a IL.dll.a .. now i was unsre what to do.. moved the IL.dll.a to the /libs and renamed it to libIL.dll.a (which was not the name i wanted, but i forget it), then i copied over the includes folder of the devIL package, then i renamed the libIL.a in my dev-cpp folder to libIL.a_, so it was not used any more (a same copy of this file called libdevIL.a still exists in mingwlibs/), then i compiled ta spring again... the new ta spring file was copied over to the ta spring game dir, then i started it, error -> dll IL.dll not found... i copied it over, tryed again, and it worked!!!!!!!!
Here are the new created files from devIL :
http://user.supradigital.org/suprano/devIL.rar
You need to copy & rename mods/XTAPE.sd7 to mods/XTAPEv3.sd7 and you have to copy the guis & bitmaps folder from the svn dir to the spring game dir(not sure if it were these 2)
I also uploaded a binary:
http://user.supradigital.org/suprano/springmingw.exe
EDIT: I just joined a online game, but a few seconds after start, the sync errors started and after 10 secs the game closed without error message..
--Ano
Last edited by Suprano on 31 Mar 2006, 22:20, edited 1 time in total.
We tried to play, but something was relly strange. First we updated from the SVN, and compiled rev 1089. Then I hosted a game. The game started up just fine for me, but Suprano's game wouldn't start. I think the connection timed out. I recreated the game and the lobby wouldn't sync. I couldn't figure out what caused it, so I decided to switch to a diffierent installation.
I moved my newly compiled exe to my primary spring folder, and we tried again. Same problem. The lobby synced and we connected just fine. His connection timed out. When Suprano reconnected the lobby client wouldn't sync.
It sound like something is corupting the installation on my end (I'm using VS8). Anyone have any advice?
Just to make the point relly clear, spring.exe was nt giving sync errors. The lobby was complaining.
I moved my newly compiled exe to my primary spring folder, and we tried again. Same problem. The lobby synced and we connected just fine. His connection timed out. When Suprano reconnected the lobby client wouldn't sync.
It sound like something is corupting the installation on my end (I'm using VS8). Anyone have any advice?
Just to make the point relly clear, spring.exe was nt giving sync errors. The lobby was complaining.
well the second time my connection timed out, it wasn't his fault, because my internet pc was shut down by a virus (i disabled the FW because i was going to host after that) .. but after restart, the lobby was not synced again...
We tryed several lobby restarts, but nothing happend...
The interessting thing: later, I joined an normal game, and the lobby was synced(after that i renamed my exes back to org, to be able to play a normal game), so the lobby-unsync was not caused by the different exes...
--Ano
We tryed several lobby restarts, but nothing happend...
The interessting thing: later, I joined an normal game, and the lobby was synced(after that i renamed my exes back to org, to be able to play a normal game), so the lobby-unsync was not caused by the different exes...
--Ano
Ok thanks for all the help so far. After finally getting round to installing the directx sdk, I got the next missing include I can´t start anything with:
"afxres.h"
Compiling...
7zHeader.c
7zIn.c
7zItem.c
7zMethodID.c
LzmaDecode.c
Generating Code...
Compiling resources...
.\rts.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'.
I found two instances of this header in the windows sdk, but it didnt help to add there folders to the include folders of the project.
I´d by thankful for any further hints I can get. But no worries if you cant help, as I´m not going to be doing much with the code anyway :) .
"afxres.h"
Compiling...
7zHeader.c
7zIn.c
7zItem.c
7zMethodID.c
LzmaDecode.c
Generating Code...
Compiling resources...
.\rts.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'.
I found two instances of this header in the windows sdk, but it didnt help to add there folders to the include folders of the project.
I´d by thankful for any further hints I can get. But no worries if you cant help, as I´m not going to be doing much with the code anyway :) .
Replace any instance of afxres.h in the .rc file with winres.hSeanHeron wrote: .\rts.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'.
I found that "fix" on google. I don't know what that file is suppost to do but at least it compiles.
Found that at http://www.winprog.org/tutorial/errors.html