Armagetron compiling in windows.

For all the help you need with Armagetron!
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: Armagetron compiling in windows.

Post by Jip »

Building the workspace names the library files wrong. You need to rename them to what it's says it's missing.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Armagetron compiling in windows.

Post by Z-Man »

Nah, that's just a problem with current Code::Blocks and the 0.2.8 workspace (can't fix it or it won't build any more with 1.0_rc2); trunk and 0.4 don't do that.
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

Trying to compile this on Windows 7
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: Armagetron compiling in windows.

Post by Jip »

Z-Man wrote:Nah, that's just a problem with current Code::Blocks and the 0.2.8 workspace (can't fix it or it won't build any more with 1.0_rc2); trunk and 0.4 don't do that.
Oh, seems like I mixed that up.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Armagetron compiling in windows.

Post by Z-Man »

regedit wrote:Trying to compile this on Windows 7
Hmm, that rules that problem source out... what version of Code::Blocks and mingw?
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: Armagetron compiling in windows.

Post by Jip »

I wanted to write a tutorial how to build 0.4 in windows and tried to build with actual source but get this errors:

Code: Select all

||=== Armagetron Advanced, Win32 Release ===|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|43|error: eEventNotification.pb.h: No such file or directory|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|47|error: variable or field 'se_eventNotificationHandler' declared void|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|47|error: 'EventNotification' is not a member of 'Engine'|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|47|error: expected primary-expression before 'const'|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|58|error: 'EventNotification' is not a member of 'Engine'|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|58|error: 'EventNotification' is not a member of 'Engine'|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|58|error: template argument 1 is invalid|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|58|error: invalid type in declaration before '(' token|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|58|error: 'se_eventNotificationHandler' was not declared in this scope|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|58|error: initializer expression list treated as compound expression|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp||In function 'void se_sendEventNotification(const tString&, const tString&)':|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|67|error: 'EventNotification' is not a member of 'Engine'|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|67|error: 'event' was not declared in this scope|
D:\armagetron\sources\0.4\armagetronad\src\engine\eEventNotification.cpp|67|error: request for member 'Broadcast' in 'se_eventNotificationDescriptor', which is of non-class type 'int'|
||=== Build finished: 13 errors, 0 warnings ===|
It worked like a charm a few weeks ago...

EDIT: nvm, found the error. Will write my tutorial in next post.
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: Armagetron compiling in windows.

Post by Jip »

How to compile 0.4 in Windows 7 with Code::Blocks 10.05

Before everything, get Code::Blocks 10.05 with included mingw.
I downloaded and installed codeblocks-10.05mingw-setup.exe from http://www.codeblocks.org/downloads/26

1.
Make a svn checkout from

Code: Select all

https://armagetronad.svn.sourceforge.net/svnroot/armagetronad/armagetronad/branches/0.4
2.
Edit ..\armagetronad\win32\python.bat and change line 7 to your installation location of python

3.
Edit ..\armagetronad\src\defs.h and comment out line 122 and 125
The block should look like this:

Code: Select all

//#ifndef HAVE_ISBLANK
// this function does not seem to exist in windows and solaris 2.8
inline bool isblank(int x){ return ((x == ' ') || (x == '\t')); }
//#endif
4.
Run ..\armagetronad\win32\update_version.bat

4.
Open ..\armagetronad\win32\code_blocks\ArmagetronAd.workspace in Code::Blocks
I only build the client so I closed the dedicated and master projects (right click -> close project).
Also I set the Build target to win32 release (saves you some time if you dont want to debug)

5.
Build everything in Workspace except "Armagetron Advanced".

6.
Run ..\armagetronad\win32\makedist.bat
Run ..\armagetronad\win32\protobuf.bat

7.
Build "Armagetron Advanced"

8.
You find the build in ..\armagetronad\build\dist\
You can run the .exe from there or generate an installer with the .nsi script.

This is how it worked for me with Revision 10352: /armagetronad/branches/0.4
Last edited by Jip on Thu Jan 12, 2012 12:50 am, edited 1 time in total.
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

I downloaded the Code blocks 10.05 with mingw included.
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: Armagetron compiling in windows.

Post by Jip »

Did you follow my steps and does it still fail?
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

No, not yet.
How is version 2.8 different to 0.4?
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:No, not yet.
How is version 2.8 different to 0.4?
Best way to find out is to install both and try them ;)
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

Where can i get 4 :oops: ?
I can only find up to 0.3
User avatar
Jip
Round Winner
Posts: 397
Joined: Sat Sep 26, 2009 5:32 pm

Re: Armagetron compiling in windows.

Post by Jip »

You can find the snapshots on sourceforge.net
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

Love the minimap :D but i personally preferred the old meters.
Is this version stable enough for normal playing?
regedit
On Lightcycle Grid
Posts: 42
Joined: Sat Jun 27, 2009 12:41 pm

Re: Armagetron compiling in windows.

Post by regedit »

How do i not build armagetron advanced.
Do i go through all the directories in armagetron advanced workspace one by one and build them and not build armagetron advanced?
Sorry for noobness...
Post Reply