Author Topic: The short and sweet guide to compiling SVN 895 on Windows  (Read 102342 times)

Risujin

  • Posts: 739
  • Turrets: +33/-13
    • http://risujin.org
The short and sweet guide to compiling SVN 895 on Windows
« Reply #30 on: July 05, 2007, 10:45:27 pm »
Quote from: "Paradox"
Would 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

  • Posts: 892
  • Turrets: +3/-6
The short and sweet guide to compiling SVN 895 on Windows
« Reply #31 on: July 07, 2007, 11:48:02 am »
Quote from: "Risujin"
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.


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

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
The short and sweet guide to compiling SVN 895 on Windows
« Reply #32 on: July 07, 2007, 04:54:33 pm »
Quote from: "next_ghost"
Quote from: "Risujin"
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.


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

  • Posts: 892
  • Turrets: +3/-6
The short and sweet guide to compiling SVN 895 on Windows
« Reply #33 on: July 08, 2007, 12:10:24 pm »
Quote from: "Lakitu7"
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.


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

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
The short and sweet guide to compiling SVN 895 on Windows
« Reply #34 on: July 08, 2007, 04:39:25 pm »
Quote from: "next_ghost"
Quote from: "Lakitu7"
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.


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

  • Posts: 34
  • Turrets: +0/-1
wtf?
« Reply #35 on: August 05, 2007, 10:52:09 pm »
Code: [Select]

...
/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:

Fluxflashor

  • Guest
The short and sweet guide to compiling SVN 895 on Windows
« Reply #36 on: August 09, 2007, 02:53:08 am »
Thanks Risujin.

Mad_Joe

  • Posts: 67
  • Turrets: +4/-0
The short and sweet guide to compiling SVN 895 on Windows
« Reply #37 on: August 19, 2007, 06:58:28 pm »
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

  • Posts: 892
  • Turrets: +3/-6
The short and sweet guide to compiling SVN 895 on Windows
« Reply #38 on: August 19, 2007, 07:52:03 pm »
Quote from: "Mad_Joe"
Can 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

  • Posts: 67
  • Turrets: +4/-0
The short and sweet guide to compiling SVN 895 on Windows
« Reply #39 on: August 19, 2007, 08:19:12 pm »
Quote from: "next_ghost"
I'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

  • Posts: 238
  • Turrets: +13/-13
The short and sweet guide to compiling SVN 895 on Windows
« Reply #40 on: August 19, 2007, 08:29:57 pm »
Quote from: "Mad_Joe"
Can 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.


Code: [Select]
patch --help.
Often, applying a patch will look something like

 patch -p0 < patchname.patch

next_ghost

  • Posts: 892
  • Turrets: +3/-6
The short and sweet guide to compiling SVN 895 on Windows
« Reply #41 on: August 19, 2007, 08:54:30 pm »
Quote from: "Plague"
Quote from: "Mad_Joe"
Can 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

  • Posts: 67
  • Turrets: +4/-0
The short and sweet guide to compiling SVN 895 on Windows
« Reply #42 on: August 19, 2007, 09:48:27 pm »
Quote from: "Plague"
Quote from: "Mad_Joe"
Can 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:

Code: [Select]
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:

Code: [Select]
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

  • Posts: 892
  • Turrets: +3/-6
The short and sweet guide to compiling SVN 895 on Windows
« Reply #43 on: August 19, 2007, 11:10:51 pm »
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

  • Posts: 67
  • Turrets: +4/-0
The short and sweet guide to compiling SVN 895 on Windows
« Reply #44 on: August 20, 2007, 01:52:55 am »
Quote from: "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:


YESSSSS! IT IS ALIVE!!!

Yeah, that worked. Thanks a bunch!

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
The short and sweet guide to compiling SVN 895 on Windows
« Reply #45 on: August 22, 2007, 07:33:29 pm »
Meh, it doesnt work with cygwin, as it claims that the platform is not supported.
(trying to make a qvm)

∧OMG ENTROPY∧

tehOen

  • Guest
The short and sweet guide to compiling SVN 895 on Windows
« Reply #46 on: August 23, 2007, 03:31:12 am »
oh god why do you want to compile it on cygwin

next_ghost

  • Posts: 892
  • Turrets: +3/-6
The short and sweet guide to compiling SVN 895 on Windows
« Reply #47 on: August 23, 2007, 01:43:33 pm »
Quote from: "tehOen"
oh 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

  • Guest
The short and sweet guide to compiling SVN 895 on Windows
« Reply #48 on: August 23, 2007, 02:02:50 pm »
Quote from: "next_ghost"
Quote from: "tehOen"
oh 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

  • Posts: 892
  • Turrets: +3/-6
The short and sweet guide to compiling SVN 895 on Windows
« Reply #49 on: August 23, 2007, 06:15:47 pm »
Quote from: "tehOen"
eh? 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

  • Guest
The short and sweet guide to compiling SVN 895 on Windows
« Reply #50 on: August 23, 2007, 06:24:09 pm »
Quote from: "next_ghost"
Quote from: "tehOen"
eh? mingw is way easier and it generates windows native binary


MSYS isn't, Cygwin does too.

ok go build us cygwin binaries lol

Divmax

  • Posts: 197
  • Turrets: +3/-8
The short and sweet guide to compiling SVN 895 on Windows
« Reply #51 on: August 30, 2007, 11:50:31 am »
/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

  • Guest
The short and sweet guide to compiling SVN 895 on Windows
« Reply #52 on: August 30, 2007, 12:06:52 pm »
maybe you didnt set the mingw path :/

Divmax

  • Posts: 197
  • Turrets: +3/-8
The short and sweet guide to compiling SVN 895 on Windows
« Reply #53 on: August 30, 2007, 12:55:51 pm »
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

  • Posts: 197
  • Turrets: +3/-8
The short and sweet guide to compiling SVN 895 on Windows
« Reply #55 on: August 30, 2007, 03:12:46 pm »
Thank you for pointing out my mistake.
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

  • Posts: 339
  • Turrets: +1337/-24
    • youtube page
Re: The short and sweet guide to compiling SVN 895 on Windows
« Reply #56 on: January 11, 2008, 06:04:49 am »
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!!
« Last Edit: April 17, 2009, 01:00:25 am by n.o.s.brain »

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Re: The short and sweet guide to compiling SVN 895 on Windows
« Reply #57 on: January 11, 2008, 09:08:48 pm »
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#msg169333
Ok 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

  • Posts: 339
  • Turrets: +1337/-24
    • youtube page
Re: The short and sweet guide to compiling SVN 895 on Windows
« Reply #58 on: January 12, 2008, 12:05:05 am »
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....
« Last Edit: January 12, 2008, 03:29:54 am by n.o.s.brain »

Plague

  • Posts: 238
  • Turrets: +13/-13
Re: The short and sweet guide to compiling SVN 895 on Windows
« Reply #59 on: January 13, 2008, 06:33:50 pm »
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.