Help compiling/building armagetronad source
-
- On Lightcycle Grid
- Posts: 12
- Joined: Fri Aug 05, 2011 4:41 am
Help compiling/building armagetronad source
Guys I am ~totally~ lost on how this is done, I've read the wiki and the forums as much as I could by searching for hours, and I still can't get a grip on the procedure.
I want to build/compile (whatever the correct term is) arma 0.3.0 source on windows 7;
the forums say that windows is buggy, you have to rewrite or comment out a bunch of code to get it to work and codeblocks (which I have no idea what it is) is not compatible anymore since an old version;
so what is the easiest/shortest process to compile 0.3.0 on linux and/or windows 7?
if it's to use ubuntu or gentoo or whatever, can that compiled game be sent in an email so I can download it on my windows user and play it on windows after I use linux to compile it?;
if 0.3.0 is not possible to do this with, how do I do the above questions for 0.2.8?
I've never used linux before, so I probably won't understand advanced instructions, thanks for your help
I want to build/compile (whatever the correct term is) arma 0.3.0 source on windows 7;
the forums say that windows is buggy, you have to rewrite or comment out a bunch of code to get it to work and codeblocks (which I have no idea what it is) is not compatible anymore since an old version;
so what is the easiest/shortest process to compile 0.3.0 on linux and/or windows 7?
if it's to use ubuntu or gentoo or whatever, can that compiled game be sent in an email so I can download it on my windows user and play it on windows after I use linux to compile it?;
if 0.3.0 is not possible to do this with, how do I do the above questions for 0.2.8?
I've never used linux before, so I probably won't understand advanced instructions, thanks for your help
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6712
- Joined: Thu Dec 18, 2003 7:03 pm
Re: Help compiling/building armagetronad source
The instructions for compiling under Windows or compiling under Linux would probable be about equally advanced. I'd wait for it to get easier. Why do you want to compile Armagetron in the first place?

-
- On Lightcycle Grid
- Posts: 12
- Joined: Fri Aug 05, 2011 4:41 am
Re: Help compiling/building armagetronad source
What is a sure way to get it to work (under whatever OS?)
I don't care if it's advanced as long as it has as few bugs/error things as possible. I've followed 3 tutorials, one on youtube, two from these forums, and they all result in a compilation that gives no exe and about 20 errors.
Surely there must be a way, how was armagetron 0.2.8 or 0.3.0 compiled itself? The actual makers of this game, what did they use/do?
If I have to buy visual studio to make it easier or simpler I don't care.
and I'm interested in learning how game code works, messing with something and seeing what happens in the game since I have no idea how to code and I might want to study at uni to get good at it
I don't care if it's advanced as long as it has as few bugs/error things as possible. I've followed 3 tutorials, one on youtube, two from these forums, and they all result in a compilation that gives no exe and about 20 errors.
Surely there must be a way, how was armagetron 0.2.8 or 0.3.0 compiled itself? The actual makers of this game, what did they use/do?
If I have to buy visual studio to make it easier or simpler I don't care.
and I'm interested in learning how game code works, messing with something and seeing what happens in the game since I have no idea how to code and I might want to study at uni to get good at it
Re: Help compiling/building armagetronad source
Simple, with code::blocks 1.0RC2. Both the winlibs.zip and the source zip for 0.2.8 and 0.3.0 are made for that version.compiler_q wrote:Surely there must be a way, how was armagetron 0.2.8 or 0.3.0 compiled itself? The actual makers of this game, what did they use/do?
You don't want to compile 0.3.0, though. It's old. Go with the current 'trunk' code from either bzr on launchpad or svn from sourceforge. You need to install tortoise-bzr resp. tortoise-svn to get those sources, and any instructions you may find around here usually apply to that code, because really, who wants to compile an old version that's already compiled and is outdated? Who would want to update instructions for old versions every time adaptions to new compiler environments are required?
And yeah, that's probably the easiest way to get Windows builds going. You don't want to compile Windows code from Linux. It's probably possible, but nobody has completely done it yet and personally, while it would simplify my builds, I find it not worth the effort.
And you also don't want to learn basic game code from us. Not that our game code is bad, it's just well hidden under network syncing and player management and we're using a very unusual collision detection engine.
If you still want to do it, please post the links to the specific instructions you followed so we can update them if they're outdated and post the concrete errors you got at every step. All we know right now is that you tried something and it didn't work.
Re: Help compiling/building armagetronad source
I don't understand. What is trunk, bzr, launchpad, svn, tortoise-svn, resp and code::blocks 1.0RC2?.Z-Man wrote:Simple, with code::blocks 1.0RC2. Both the winlibs.zip and the source zip for 0.2.8 and 0.3.0 are made for that version.
You don't want to compile 0.3.0, though. It's old. Go with the current 'trunk' code from either bzr on launchpad or svn from sourceforge. You need to install tortoise-bzr resp. tortoise-svn to get those sources, and any instructions you may find around here usually apply to that code, because really, who wants to compile an old version that's already compiled and is outdated? Who would want to update instructions for old versions every time adaptions to new compiler environments are required?
I want to compile the src code on windows 7 too.
Re: Help compiling/building armagetronad source
"Trunk" is referring to the "Tree" metaphor of development. You develop code in branches, occasionally branches split into two (when you prepare for a release and want to both work on new features and make sure only bugfixes enter the release), occasionally branches merge again (OK, the metaphor breaks down here). The Trunk is the main branch where all worthy code eventually gets merged into.
For the rest, google gives the correct answer.
For the rest, google gives the correct answer.
-
- On Lightcycle Grid
- Posts: 12
- Joined: Fri Aug 05, 2011 4:41 am
Re: Help compiling/building armagetronad source
I finally figured out I needed to get the winlibs from here:
https://armagetronad.svn.sourceforge.ne ... k/winlibs/
and I installed tortoiseSVN but when I try to 'import' with that url it asks for a username and password,
how do I get past that?
https://armagetronad.svn.sourceforge.ne ... k/winlibs/
and I installed tortoiseSVN but when I try to 'import' with that url it asks for a username and password,
how do I get past that?
Re: Help compiling/building armagetronad source
You don't want to import, you want to check out. Import puts stuff up to the repository, and you don't have the rights to do so. "Check out" (or checkout) is the operation that makes a local copy of the current state to your hard drive.
-
- On Lightcycle Grid
- Posts: 12
- Joined: Fri Aug 05, 2011 4:41 am
Re: Help compiling/building armagetronad source
ok got all that I'm pretty sure I did everything right, but now I'm getting this error at the start of compiling
what does this mean? (i'm using codeblocks ver 1.0 RC 2)
Code: Select all
Switching to target: Win32 Release
Linking console executable: ..\..\build\dist\armagetronad_dedicated.exe
C:\Program Files (x86)\CodeBlocks\lib/libmingw32.a(main.o):main.c:(.text+0x106): undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
what does this mean? (i'm using codeblocks ver 1.0 RC 2)
Re: Help compiling/building armagetronad source
Oh, you got far. I haven't seen that error message before, it shouldn't actually happen; the dedicated server you're linking there is a console program and those don't have WinMain(), but plain old main(). Are you still trying to compile 0.3.0? Either way, code::blocks 1.0RC2 and current winlibs from that svn source are no good match, I suggest you move to code::blocks 10.05 and code from trunk ( https://armagetronad.svn.sourceforge.ne ... magetronad ) or stick with your current coe::blocks and arma source, but switch to an earlier version of winlibs ( https://armagetronad.svn.sourceforge.ne ... 0/winlibs/ ). The former method is what we can give most support for, as it's closest to the way we do current builds.
-
- On Lightcycle Grid
- Posts: 12
- Joined: Fri Aug 05, 2011 4:41 am
Re: Help compiling/building armagetronad source
Ok I did what you said (updated to code::blocks 10.05 with mingw) and the build seemed to go fine,
however whenever I open armagetronad_master.exe (I assume this is the right one to open) I get a black console window that says thousands of things in this format:
then it says bound socket, twice, and stops.. the console command window is left open and game doesn't start
~lost~
my wild guess is that I did something wrong in the compiling procedure, am I supposed to open makedist before I 'build workspace' in codeblocks, or the other way around?
however whenever I open armagetronad_master.exe (I assume this is the right one to open) I get a black console window that says thousands of things in this format:
Code: Select all
COMMAND TEAM_BLUE UNKNOWN
COMMAND PREDICT_WALLS UNKNOWN
~lost~
my wild guess is that I did something wrong in the compiling procedure, am I supposed to open makedist before I 'build workspace' in codeblocks, or the other way around?
-
- On Lightcycle Grid
- Posts: 12
- Joined: Fri Aug 05, 2011 4:41 am
Re: Help compiling/building armagetronad source
I found that post, can someone please tell me which parts we need to do, I did all of them and it really messed up. I did some of them and it kind of worked. So, obviously some of these things need to be done but not all of them, which ones? (For example I did step 14 and it messed it up, these instructions must not be up to date with the latest trunk source, step 13 makes no sense as line 55 in the trunk doesn't have that text).1) Download project from repository (i used TortoiseSVN)
2) Download and install Code::Blocks with mingw (i used version 10.05)
3) Download and install Python (i used version 2.7.1)
4) In project folder, go to .\armagetronad\trunk\armagetronad\win32 and run update_version.bat. It will probably tell you that python is missing, so..
5) in the same folder, edit python.bat and change SET PYTHON=python.exe to SET PYTHON=<path to python.exe> (in my case: C:\Python27\python.exe). You can now run python.bat to see if everything is allright.
6) Now we will need to setup Google protocol buffers. Still in the same folder, edit protobuf.bat and change command "protoc" to "<path to project folder>\armagetronad\trunk\winlibs\protobuf\bin\protoc.exe" (without quotation marks)
7) Run protobuf.bat and optionally check ..\src\protobuf folder for *.pb.h files. If they are there, everything is cool.
Boost in winlibs is outdated which causes building errors. We will update it. Download boost at http://www.boost.org/users/download/. Extract the archive and copy boost subfolder. Go to <path to project folder>\armagetronad\trunk\winlibs\boost\includes, delete the boost subfolder there and insert the newer one you have copied.
9) Before finally entering Code::Blocks, we will update its project files to fix names of link libraries. Download code_blocks.rar - an archive uploaded by k3nny in this thread. Copy all cbp files you will find inside. Then, go to <path to project folder>\armagetronad\trunk\winlibs\win32\code_blocks and replace cbp files there with the ones you have copied.
10) So far so good? Cool, we can now start Code::Blocks. Go to <path to project folder>\armagetronad\trunk\armagetronad\win32\code_blocks and start ArmagetronAd.workspace. Now, in menu, you can Build -> Select Target -> Win32 Release (or debug if you want) and Build -> Build workspace. However, building will fail giving you some errors. Here are things you need to fix in source codes...
11) For navigation in source codes, use Managenement toolbar on the left. In Armagetron Advanced -> ... -> src -> tools -> tString.cpp, add #include <time.h> into include section.
12) In tTrueVersion.h at the first line, change the last-fourth number to zero (if there is no fourth number behind comma, add zero there). You will not find this file in Management toolbar. Here is path to the file in explorer: <path to project folder>\armagetronad\trunk\armagetronad\src\tTrueVersion.h
13) Go to FTGL -> Headers -> FTGL -> include -> FTTextureGlyph.h at line 55. Remove " FTTextureGlyph::" label there.
14) In Armagetron Advanced -> ... -> src -> tron -> gMenus.cpp at line 316, insert "bool dirty = true;" and replace "currentScreensetting.useSDL" with just "dirty" at line 321 (of course without quotation marks).
15) Now, compiling should pass. Well done. But linking of client will still fail because of wrong names of link libraries (missing dll suffix) in Armagetron Advanced project. We have fixed that for other projects but not for this one because K3nny's archive doesn't include Armagetron Advanced project file. In attachment, you will find an archive with mine. Replace the project file in <path to project folder>\armagetronad\trunk\armagetronad\win32\code_blocks\ with the one you will find in the archive. If you build the workspace now, everything should pass successfully, but armagetronAd still would not launch giving an error. So..
16) as it has been noted in this thread, you need to remove Armagetron Advanced -> ... -> src -> tron -> gWinZone.cpp from the project. Right click on it and choose Remove file from the project. If you want to build a dedicated server you need to do this for project Dedicated.
17) Build workspace.
18) Now, go to <path to project folder>\armagetronad\trunk\armagetronad\win32 and run make_dist.bat. Then go to <path to project folder>\armagetronad\trunk\armagetronad\build\dist and...
19) enjoy living on the edge.
Many steps could be ommited if trunk was updated accordingly.
EDIT: if you download trunk from launchpad-bazaar thing (really the latest sources), steps 9, 13, 16 have been done already.
z-man do you know of any clear and precise instructions? (using trunk source zip and codeblocks 10.05?)
Re: Help compiling/building armagetronad source
In the same thread as the post you quoted, right at the end. None of the hacky stuff is required right now.
And you ran the master server. Yeah, it spits out those messages. That's normal. You want to run ArmagetronAd.exe for the main game, and you may need to build more projects to get it. Best to build the whole workspace.
And you ran the master server. Yeah, it spits out those messages. That's normal. You want to run ArmagetronAd.exe for the main game, and you may need to build more projects to get it. Best to build the whole workspace.
-
- On Lightcycle Grid
- Posts: 12
- Joined: Fri Aug 05, 2011 4:41 am
Re: Help compiling/building armagetronad source
ok I'm getting really close, I can feel it.. I have the same error message over and over when I try to compile, it says:
a bunch of times
Code: Select all
C:\arma\ARMAGE~1\ARMAGE~1\src\win32\ARMAGE~1.RC|71|digit exceeds base|
Re: Help compiling/building armagetronad source
Oh yeah, that's the only manual adaption you need to make sometimes as some script screws up. Find the file tTrueVersion.h (it's accessible in the project overview on the right under Headers/src, IIRC) find the last line, and make sure it reads
#define MAJOR_VERSION a,b,c,d
where a, b, c and d are numbers NOT starting with a zero and smaller than 65000, anything else confuses the build process. The numbers don't really matter.
#define MAJOR_VERSION a,b,c,d
where a, b, c and d are numbers NOT starting with a zero and smaller than 65000, anything else confuses the build process. The numbers don't really matter.