Compiling ac on windows
#1
Hello, I recently learned c++ and decided to look at the assault cube code for practice. I decided to try to add some guns(with same stats just different look than other guns). After successfully doing this i tried to compile the ac source. I moved it into windows system32 and tried to use the visual c++ cmd to run the make file, but when i used the command nmake -f makefile this message pops up "fatal error... illegal character '/' in macro. Stop" I tried to fix this but found i couldn't I was wondering if anybody knows how to stop this or if their is a better way to compile ac thanks.
Thanks given by:
#2
I never even thought about invoking that stuff manually, so I can't help you with that. My advice is to just spare yourself the hassle, open the project (src/vcpp/cube.vcproj) in Visual Studio and hit "Build".
Thanks given by:
#3
You... didn't realize "/" is an illegal character? Microsoft won't allow anyone to use that! :-(

MinGW FTW
Thanks given by:
#4
You will soon get prosecuted.
Thanks given by:
#5
(25 Nov 11, 02:49AM)V-Man Wrote: MinGW FTW
Thanks given by:
#6
how do i compile wallhack? (demo revision)
Thanks given by:
#7
prosecuted?? lol thats what is says. ok so using the visual studio would be best. I'll go ahead and try that.
Thanks given by:
#8
ok so I did what tempest said but when i build it an error message pops up that says "unable to start program debug/cube.exe system cannot find the file specified" I did have to convert the files because im using a newer version could this be why?
Thanks given by:
#9
(25 Nov 11, 09:57AM)Vermi Wrote: how do i compile wallhack? (demo revision)
Wow, you are asking how to cheat on official game forum?

(25 Nov 11, 10:26PM)|FOX|elocsitruc Wrote: ok so I did what tempest said but when i build it an error message pops up that says "unable to start program debug/cube.exe system cannot find the file specified" I did have to convert the files because im using a newer version could this be why?
It means it compiled correctly.
Now you have an executable in bin_win32, ac_client. You have to copy it in bin directory where assault cube is installed (for me, it's C:\Program Files (x86)\AssaultCube_v1.1.0.4\bin_win32). Then you have to launch the game with assaultcube.bat or desktop icon. (not the .exe in bin).

Good luck!
BTW, is the server source code available and open source? I could only find code for ac_client.
Thanks given by:
#10
(25 Nov 11, 10:45PM)Kosta Wrote: It means it compiled correctly.
Now you have an executable in bin_win32, ac_client. You have to copy it in bin directory where assault cube is installed (for me, it's C:\Program Files (x86)\AssaultCube_v1.1.0.4\bin_win32). Then you have to launch the game with assaultcube.bat or desktop icon. (not the .exe in bin).
Actually, I don't think you'd even have to move any files around. It should already be in bin_win32. One day I (or someone else) could fix the VC++ project so the path and working dir for the debugger actually work.

(25 Nov 11, 10:45PM)Kosta Wrote: BTW, is the server source code available and open source? I could only find code for ac_client.
It's all the same code, just that (AFAIK) the VS project doesn't provide a build setting for building the dedicated server. You can
a) build in MinGW (the makefile has such a separate entry) or
b) be good with it and launch the client executable with the -d option, thus getting a dedicated server. The difference lies only in the slightly larger size.

PS: remember to change the protocol number to negative when you make gameplay-relevant changes :)
Thanks given by:
#11
(25 Nov 11, 11:57PM)tempest Wrote:
(25 Nov 11, 10:45PM)Kosta Wrote: ...
Actually, I don't think you'd even have to move any files around. It should already be in bin_win32. One day I (or someone else) could fix the VC++ project so the path and working dir for the debugger actually work.

Already did for my server side stuff. :P But I have encountered some interesting behaviour while debugging ac server.

(25 Nov 11, 11:57PM)tempest Wrote:
(25 Nov 11, 10:45PM)Kosta Wrote: BTW, is the server source code available and open source? I could only find code for ac_client.
It's all the same code, just that (AFAIK) the VS project doesn't provide a build setting for building the dedicated server. You can
a) build in MinGW (the makefile has such a separate entry) or
b) be good with it and launch the client executable with the -d option, thus getting a dedicated server. The difference lies only in the slightly larger size.

You obviously can build a dedicated server in msvcpp. It's just named rather obscure.
Thanks given by:
#12
(26 Nov 11, 02:45AM)SKB Wrote: Already did for my server side stuff. :P But I have encountered some interesting behaviour while debugging ac server.
Such as...?

(26 Nov 11, 02:45AM)SKB Wrote: You obviously can build a dedicated server in msvcpp. It's just named rather obscure.
Indeed, at least it says so in the project file. But what's so obscure about "Standalone"?
Thanks given by:
#13
(26 Nov 11, 11:51AM)tempest Wrote:
(26 Nov 11, 02:45AM)SKB Wrote: Already did for my server side stuff. :P But I have encountered some interesting behaviour while debugging ac server.
Such as...?
Server - MS "handshake" triggers a breakpoint. And it's not set by me, i think it's auto.
>    ac_server.exe!vector<char>::operator[](int i=0)  Line 424 + 0x34 bytes    C++
    ac_server.exe!flushmasterinput()  Line 151 + 0x15 bytes    C++
    ac_server.exe!serverms(int mode=0, int numplayers=0, int minremain=10, char * smapname=0x0056dc60, int millis=17452, const _ENetAddress & localaddr={...}, int * mnum=0x00570f40, int * msend=0x00570324, int * mrec=0x0057072c, int * cnum=0x00570f44, int * csend=0x00570b34, int * crec=0x00570f3c, int protocol_version=1132)  Line 327    C++
    ac_server.exe!serverslice(unsigned int timeout=5)  Line 3861 + 0x50 bytes    C++
    ac_server.exe!initserver(bool dedicated=true, int argc=5, char * * argv=0x00dd3a70)  Line 4206 + 0x7 bytes    C++
    ac_server.exe!main(int argc=5, char * * argv=0x00dd3a70)  Line 4240 + 0xf bytes    C++
    ac_server.exe!__tmainCRTStartup()  Line 266 + 0x19 bytes    C
    ac_server.exe!mainCRTStartup()  Line 182    C
    kernel32.dll!7c817077()     
    [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]

variables:
-        this    0x00575ca0 struct vector<char> masterin {buf=0x00dfeab0 "ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ a    vector<char> * const
+        buf    0x00dfeab0 "ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ"    char *
        alen    4096    int
        ulen    0    int
        i    0    int

Even if i click to continue instead of breaking. It says MS couldn't ping me. (and i'm not using -mlocalhost)

(26 Nov 11, 11:51AM)tempest Wrote:
(26 Nov 11, 02:45AM)SKB Wrote: You obviously can build a dedicated server in msvcpp. It's just named rather obscure.
Indeed, at least it says so in the project file. But what's so obscure about "Standalone"?
Imagine, you're trying to compile an ac server for the first time. It's just too ambiguous. Maybe a poor word choice on my end. :|

Thanks given by:
#14
(26 Nov 11, 02:42PM)SKB Wrote: Server - MS "handshake" triggers a breakpoint. And it's not set by me, i think it's auto.
[snip]
Even if i click to continue instead of breaking. It says MS couldn't ping me. (and i'm not using -mlocalhost)
That's interesting, thanks. Might be some time until I get back to a Windows system, but maybe someone else can take a look.

(26 Nov 11, 11:51AM)tempest Wrote: Imagine, you're trying to compile an ac server for the first time. It's just too ambiguous.
Right, "Standalone Server" or smth would be more obvious.
Thanks given by:
#15
Sorry, I am just new to the game and the source code, didn't look at everything YET. Thanks for the help :-)
Thanks given by:
#16
And it crashes lol oh well ill keep working on it now that i know how to compile it. thanks
Thanks given by:
#17
May I ask how it crashes?
Thanks given by: