Armagetron compiling in windows.

For all the help you need with Armagetron!
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Armagetron compiling in windows.

Post by regedit »

Hi all,
I decided to attempt to compile armagetron in windows, but have
encountered a problem, umm, very early on :D
I am trying to follow the instructions of the Windows_Development_System
page on the wiki but cannot find the armagetronad-winlibs mentioned.

Where can i find them?

Once again, sorry for the noobie question and thanks in advance.
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Armagetron compiling in windows.

Post by Z-Man »

regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

Thanks once again Z-Man.
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

Just another question, hope it's ok continuing it on this topic as it is related.
When i try to build the workspace in codeblocks, it gives me errors. Should i
comment out the lines that have the errors?

EDIT: and should i be following this video (http://www.youtube.com/watch?v=4iTIIXYU9MY), is it correct?
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Armagetron compiling in windows.

Post by Z-Man »

regedit wrote:Should i comment out the lines that have the errors?
You can try, but chances are they were important. You better check where you went wrong and if that fails, post the errors here.
regedit wrote:EDIT: and should i be following this video (http://www.youtube.com/watch?v=4iTIIXYU9MY), is it correct?
1. I hate video tutorials. Following them slowly is a pain in the neck (pause video, go do stuff, continue video), most are just slideshows with text and would me much better just as static HTML pages, if there is spoken comment the voice is usually terrible. You can't copy/paste from them. It's impossible to glance over them to see whether they're useful at all, and you can't skip around in them very well. I haven't seen a single good one yet for software related instructions.
2. This specific one can't be played in Germany, so I can't even tell you whether it's correct. It probably uses silly background music.
3. The correct instructions are on our Wiki.
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

K, i'll do my best to follow the wiki.

EDIT: I assume that the included README is ok to follow?
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

Back again, sorry :(
The readme suggests that i need "armagetronad_build_codeblocks"
Where can i find this?
Thanks
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Armagetron compiling in windows.

Post by Z-Man »

All support modules can be found here: https://code.launchpad.net/armagetronad

The included README talks about windows compilation? Whoops, then it's probably outdated. If you try to compile something 0.4, you no longer need the code_blocks support module, it's all in the win32 subdirectory.
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

The readme has these instructions:

Code: Select all

Compiling Armagetron Advanced on Windows with Code::Blocks
----------------------------------------------------------

Code::Blocks is an open source, cross platform C/C++ IDE.
It has multiple compiler support, and it comes in two presentations:
MinGW bundle or Standalone for use with other compilers.

More info and download of Code::Blocks: http://www.codeblocks.org

Armagetron Advanced can be compiled with these compilers:
* MinGw: obtained in the MinGW bundle download of Code::Blocks
* Free Microsoft Visual C++ Toolkit 2003: http://msdn.microsoft.com/visualc/vctoolkit2003/

The sources are distributed over three CVS modules:
* armagetronad: containing generic sources
* armagetronad_build_codeblocks: containing codeblocks project files
* armagetronad_winlibs: containing the libraries Armagetron Advanced depends on

You need to check out all three modules from the repository at
:ext:<your sf username>@cvs.sourceforge.net:/cvsroot/armagetronad
for developers or
:pserver:[email protected]:/cvsroot/armagetronad
for everyone else.

1.  Create a project directory (e.g. C:\Projects\Armagetron Advanced)
2.  Put the armagetronad source files there
3.  In the same directory, put the armagetronad_build_codeblocks files
4.  In the same directory, put the armagetronad_winlibs files
5.  It should look something like this:
    +- Armagetron Advanced
       +- armagetronad
       +- build_codeblocks
       +- winlibs
6.  Go to the build_codeblocks directory
7.  IMPORTANT !!! Before compiling you need to run these commands:

    0) START->Run enter "cmd" press "OK"
    1) cd [..PATH TO PROJECT FOLDER]\armagetronad\resources
    2) At prompt [..]\armagetronad\resources> enter:

       python.exe ..\batch\make\sortresources.py

       Make sure you see the above prompt! Sortresouces.py will only work
       if called from [..]\armagetronad\resources. 

    3) run makedist.bat (from build_codeblocks) folder
8.  Start the Armagetron Advanced workspace (Armagetron.workspace)
9.  To compile you will need to change the active project and build target 
    (it defaults to Armagetron Advanced Client and Win32 Release build target)
Is there anything there that seems incorrect?
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Armagetron compiling in windows.

Post by Z-Man »

Oh my, this references CVS still? That is old, even older than README-Subversion. That's the README.txt from the code_blocks module itself and yeah, it's outdated. You don't need to call any python scripts manually, just some .bat files. I'll clean that up, meanwhile, stick to the Wiki.
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: Armagetron compiling in windows.

Post by Jip »

regedit wrote:The readme has these instructions:

Code: Select all

...
Is there anything there that seems incorrect?
I followed these instructions and it worked fine for me.
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

I get this error when building:

Code: Select all

Linking console executable: ..\..\build\dist\armagetronad_dedicated.exe
mingw32-g++.exe: ..\..\..\winlibs\protobuf\vsprojects\libprotobuf.a: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
Any ideas?
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Armagetron compiling in windows.

Post by Z-Man »

You need to build the whole workspace, not just the project. We could use dependencies to avoid that, but that needlessly slows down trivial compilation runs and spams the output window and is quite annoying.
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

EDIT:
Did the whole thing again, just to make sure that i hadn't ruined something in previous attempts, but there are still errors:

Code: Select all

Linking console executable: ..\..\build\dist\armagetronad_dedicated.exe
..\..\build\tmp\Armagetron_Dedicated___Win32_Release\src\network\nSocket.o(.text+0x7866):nSocket.cpp: undefined reference to `gai_strerrorA@4'
..\..\build\tmp\Armagetron_Dedicated___Win32_Release\src\network\nSocket.o(.text$_ZN12nDNSResolver7ResolveEv[nDNSResolver::Resolve()]+0x9ff):nSocket.cpp: undefined reference to `gai_strerrorA@4'
..\..\..\winlibs\win32\boost_libs\libboost_thread-mgw44-mt-1_47.a(thread.o)(.text$_ZN5boost15get_system_timeEv[boost::get_system_time()]+0x1b):thread.cpp: undefined reference to `gettimeofday'
collect2: ld returned 1 exit status
Process terminated with status 1 (5 minutes, 17 seconds)
3 errors, 356 warnings
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Armagetron compiling in windows.

Post by Z-Man »

Humm, those are new and may mean your development environment and AA are incompatible. User errors usually result in a torrent of linker errors. About the gai_strerrorA@4 one, are you on XP by chance?
Post Reply