News:

Come Chat with us live! Learn how HERE!

Main Menu

The short and sweet guide to compiling SVN 895 on Windows

Started by Risujin, January 28, 2007, 05:38:52 AM

Risujin

Quote from: ParadoxWould cygwin work instead of msys?
CygWin will compile QVMs normally (just type 'make', Unix-style). However, if you try to compile the client or server I believe it will only run out of CygWin.

next_ghost

Quote from: RisujinCygWin will compile QVMs normally (just type 'make', Unix-style). However, if you try to compile the client or server I believe it will only run out of CygWin.

It will work as long as it can find cygwin1.dll.
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

Lakitu7

Quote from: next_ghost
Quote from: RisujinCygWin will compile QVMs normally (just type 'make', Unix-style). However, if you try to compile the client or server I believe it will only run out of CygWin.

It will work as long as it can find cygwin1.dll.

I don't know if it works for trem specifically, but generally in cygwin if you add the --mno-cygwin flag when compiling it will static link that dll and work without it.

next_ghost

Quote from: Lakitu7I don't know if it works for trem specifically, but generally in cygwin if you add the --mno-cygwin flag when compiling it will static link that dll and work without it.

Not exactly, -mno-cygwin tells GCC to build native Win32 app which won't use cygwin API. That should work for Tremulous since it is completely ported in the first place. However, the linker will die on pure UNIX code. cygwin1.dll has no statically linked substitute at the moment.
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

Lakitu7

Quote from: next_ghost
Quote from: Lakitu7I don't know if it works for trem specifically, but generally in cygwin if you add the --mno-cygwin flag when compiling it will static link that dll and work without it.

Not exactly, -mno-cygwin tells GCC to build native Win32 app which won't use cygwin API. That should work for Tremulous since it is completely ported in the first place. However, the linker will die on pure UNIX code. cygwin1.dll has no statically linked substitute at the moment.

Fair enough. Thanks for the correction.

[COM-IT]Styx


...
/bin/sh.exe: svnversion: command not found
make[2]: Entering directory `/development/tremulous'
CC src/client/cl_cgame.c
gcc.exe: no input files
make[2]: *** [build/release-mingw32-x86/client/cl_cgame.o] Error 1
make[2]: Leaving directory `/development/tremulous'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/development/tremulous'
make: *** [release] Error 2


even when i go directly into the directory and type "gcc cl_cgame.c" it says "gcc.exe: no input files", what is wrong with it?

EDIT: fixed, i messed up with the fstab  :oops:


Mad_Joe

Hey, great guide, thanks!

Having a problem, though. I went through your steps precisely, and got it to compile the game.qvm like I was trying to get it to do. However, now I need to be able to run it in a server. I tried running it with the tjw dedicated server, but as expected I got "G_ParseSpawnVars: found  when expecting {" I know this means that I have a mismatched game.qvm and server, but how do I get them matched? Can I compile a server to run my game.qvm? I've also heard people referencing patching, but none of them seem to be for SVN 895. Should I even be using SVN 895?

Also... sorry, but how exactly do you apply a patch? I know it's a command (right?), but when and how do you use it? Thanks.

next_ghost

Quote from: Mad_JoeCan I compile a server to run my game.qvm?

I'd say something but I don't want to be more rude than usual... :roll:
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

Mad_Joe

Quote from: next_ghostI'd say something but I don't want to be more rude than usual... :roll:

That doesn't sound good... Sorry if my question was overly ignorant hehe. I'm learning.


Go ahead and say whatever rude thing you want, as long as it is reasonably helpful.

Plague

Quote from: Mad_JoeCan I compile a server to run my game.qvm?

Edit the Makefile or create a Makefile.local in the same directory of the source and change BUILD_SERVER= to BUILD_SERVER=1. You can also create tremded using BUILD_CLIENT=0 BUILD_SERVER=1 BUILD_GAME_SO=0 BUILD_GAME_QVM=(0 or 1, often you want a qvm to accompany tremded) as make parameters at compile time.
Quote
I've also heard people referencing patching, but none of them seem to be for SVN 895. Should I even be using SVN 895?

You should base your svn qvm upon the largest patch you want to apply, or if you're starting with a fresh qvm, the latest svn. For example, if you wanted Lakitu's new 5.x release, use svn 966. Svn 966 is also the latest qvm revision, so it's a good choice to use if just starting out. Risujin used 895 presumably because it was a recent release at the time + he has a couple patches based on it. Note that compiling patches from various svn revisions will often cause errors.

Quote
Also... sorry, but how exactly do you apply a patch? I know it's a command (right?), but when and how do you use it? Thanks.

patch --help.
Often, applying a patch will look something like

patch -p0 < patchname.patch

next_ghost

Quote from: Plague
Quote from: Mad_JoeCan I compile a server to run my game.qvm?

Edit the Makefile or create a Makefile.local in the same directory of the source and change BUILD_SERVER= to BUILD_SERVER=1. You can also create tremded using BUILD_CLIENT=0 BUILD_SERVER=1 BUILD_GAME_SO=0 BUILD_GAME_QVM=(0 or 1, often you want a qvm to accompany tremded) as make parameters at compile time.

The default is build everything supported by target platform. :roll:
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

Mad_Joe

Quote from: Plague
Quote from: Mad_JoeCan I compile a server to run my game.qvm?

Edit the Makefile or create a Makefile.local in the same directory of the source and change BUILD_SERVER= to BUILD_SERVER=1. You can also create tremded using BUILD_CLIENT=0 BUILD_SERVER=1 BUILD_GAME_SO=0 BUILD_GAME_QVM=(0 or 1, often you want a qvm to accompany tremded) as make parameters at compile time.

Ok, in my defense, I tried that before I posted. However, it doesn't seem to work for me. I assume it's supposed to compile in the /build/release/ded folder, but that folder is empty (I've checked everything else just to be sure).
The code for my makefile is as it should be, I'm pretty sure:

BUILD_CLIENT=0
BUILD_CLIENT_SMP=0
BUILD_SERVER=1
BUILD_GAME_SO=0
BUILD_GAME_QVM=1


Any other ideas on what the problem could be?

EDIT: Just to try to figure it out, I turned off all the options except for BUILD_SERVER. Here's the output:

make -C src/tools/lcc install
make[1]: Entering directory `/c/tremmod/src/tools/lcc'
install -s -m 0755 build-mingw32-x86/q3lcc.exe ../
install -s -m 0755 build-mingw32-x86/q3cpp.exe ../
install -s -m 0755 build-mingw32-x86/q3rcc.exe ../
make[1]: Leaving directory `/c/tremmod/src/tools/lcc'
make -C src/tools/asm install
make[1]: Entering directory `/c/tremmod/src/tools/asm'
install -s -m 0755 q3asm.exe ../
make[1]: Leaving directory `/c/tremmod/src/tools/asm'
make targets B=build/release-mingw32-x86 CFLAGS=" -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -DUSE_OPENAL=1 -DUSE_OPENAL_DLOPEN=1 -m32 -DUSE_LOCAL_HEADERS=1 -DNDEBUG -O3 -march=i586 -fomit-frame-pointer -ffast-math -falign-loops=2 -funroll-loops -falign-jumps=2 -falign-functions=2 -fstrength-reduce -MMD"
make[1]: Entering directory `/c/tremmod'
make[1]: Nothing to be done for `targets'.
make[1]: Leaving directory `/c/tremmod'


It created a directory structure but put no files in it. Ideas?

next_ghost

Windows don't support TTY terminals in the way required by tremded. Simply compile tremulous.exe, rename it to tremded.exe and run it with +set dedicated 1 or +set dedicated 2. :roll:
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

Mad_Joe

Quote from: next_ghostWindows don't support TTY terminals in the way required by tremded. Simply compile tremulous.exe, rename it to tremded.exe and run it with +set dedicated 1 or +set dedicated 2. :roll:

YESSSSS! IT IS ALIVE!!!

Yeah, that worked. Thanks a bunch!

Paradox

Meh, it doesnt work with cygwin, as it claims that the platform is not supported.
(trying to make a qvm)

∧OMG ENTROPY∧

tehOen


next_ghost

Quote from: tehOenoh god why do you want to compile it on cygwin

Perhaps because it's 10-click installation and you're ready to compile?
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

tehOen

Quote from: next_ghost
Quote from: tehOenoh god why do you want to compile it on cygwin

Perhaps because it's 10-click installation and you're ready to compile?
eh? mingw is way easier and it generates windows native binary

next_ghost

Quote from: tehOeneh? mingw is way easier and it generates windows native binary

MSYS isn't, Cygwin does too.
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

tehOen

Quote from: next_ghost
Quote from: tehOeneh? mingw is way easier and it generates windows native binary

MSYS isn't, Cygwin does too.
ok go build us cygwin binaries lol

Divmax

/bin/sh.exe: svnversion: command not found
/bin/sh.exe: svnversion: command not found
make[1]: Entering directory `/c/SVN966'
make -C src/tools/lcc install
make[2]: Entering directory `/c/SVN966/src/tools/lcc'
gcc -O2 -Wall -fno-strict-aliasing -MMD -DTEMPDIR=\"/tmp\" -DSYSTEM=\"\" -c -Isrc -o build-mingw32-x86/etc/lcc.o etc/lcc.c
make[2]: gcc: Command not found
make[2]: *** [build-mingw32-x86/etc/lcc.o] Error 127
make[2]: Leaving directory `/c/SVN966/src/tools/lcc'
make[1]: *** [tools] Error 2
make[1]: Leaving directory `/c/SVN966'
make: *** [release] Error 2

For some reason i cant compile because i get this msg both on MSys and Linux.

BTW, this is using pure SVN966.
I'm a developer for the following projects(now I'm inactive) :
TremWars's QVMNot updated anymore
TremWars's Client and Server Executable
TremWars's QVM 2

tehOen


Divmax

And exactly where is MinGW suppose to be. I'm confused with the replies. I get C:/MinGW and C:/MSys/MinGW.

(Prepares for flames)
I'm a developer for the following projects(now I'm inactive) :
TremWars's QVMNot updated anymore
TremWars's Client and Server Executable
TremWars's QVM 2


Divmax

I'm a developer for the following projects(now I'm inactive) :
TremWars's QVMNot updated anymore
TremWars's Client and Server Executable
TremWars's QVM 2

n.o.s.brain

#56
hmmm, i compiled the source code with no errors, but got this error when i moved the executable into /tremulous and clicked on it....

any ideas on how to get this file, or why it needs it anywayz?
i know, i probably should get linux, but i wanna play on windows!!

kevlarman

you should just use a precompiled binary for playing tremulous, even if you got that client to start (there is another problem after you give it sdl), it won't connect to 1.1 servers.
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

n.o.s.brain

#58
well, if u arent gonna tell me how to fix it, then will u atleast give me the precompiled exe? because i wanted to have it compiled with some patches...

i got it to work with svn 901, but some patches didnt work....

Plague

If you couldn't manage to get all the patches you wanted to apply correctly, chances are your client is already unplayable, among other reasons (no backporting).  I suggest you do a search of the forums for precompiled binaries, you'll be able to find a number of them which are more recent and feature-ladden than TJW's.