Tremulous Forum

Mods => Modding Center => Topic started by: cron on December 05, 2010, 03:39:47 pm

Title: Compiling Tremulous on Windows using MinGW [Updated 2017-10-03]
Post by: cron on December 05, 2010, 03:39:47 pm
First, download and install 7-Zip (http://www.7-zip.org/). You'll need it to decompress several files we'll be using.
Then follow these steps to compile the Tremulous client on Windows using MinGW:

1. Download and install the newest mingw-get-setup.exe:
https://sourceforge.net/projects/mingw/files/Installer/ (https://sourceforge.net/projects/mingw/files/Installer/)

** Note: Msys uses a file & folder/directory hierarchy that is separate from the OS's. Edit the file C:\MinGW\msys\1.0\bin\fstab to add any folder locations that you may want mounted. See the 'Getting Started (http://www.mingw.org/wiki/Getting_Started)' guide for more info. **
   
2. Download the source for libcURL from curl.haxx.se and build it :
https://curl.haxx.se/latest.cgi?curl=zip (https://curl.haxx.se/dlwiz/?type=source&os=-)

Notes to flesh this out later:  https://web.archive.org/web/20160108151213/http://curl.haxx.se:80/mail/lib-2007-02/0076.html
   
3. Download and install the OpenAL libraries that you would like to use:

Using the free LGPL licensed OpenAL Soft libraries (http://kcat.strangesoft.net/openal.html#about) (Needed for systems without OpenAL32.dll):
openal-soft-1.18.2-bin.zip (http://kcat.strangesoft.net/openal-binaries/openal-soft-1.18.2-bin.zip)

 -OR-

Using the proprietary (non free) OpenAL 11 Core SDK:
OpenAL11CoreSDK.zip (http://www.openal.org/downloads/OpenAL11CoreSDK.zip)


4. Download the Git for Windows installer:
https://git-scm.com/download/win (https://git-scm.com/download/win) (64-bit or 32-bit, depending on your system)
Title: Re: The NEW shorter and sweeter guide to compiling Tremulous on Windows
Post by: Demolution on December 05, 2010, 06:02:38 pm
Sticky?
Title: Re: The NEW shorter and sweeter guide to compiling Tremulous on Windows
Post by: DraZiLoX on December 05, 2010, 11:49:55 pm
Sticky?
I second that!
Title: Re: The NEW shorter and sweeter guide to compiling Tremulous on Windows
Post by: cron on December 06, 2010, 03:11:22 am
Sticky?

I need people to test this out to make sure it all works first. :police:
Title: Re: The NEW shorter and sweeter guide to compiling Tremulous on Windows
Post by: Thorn on December 06, 2010, 08:37:13 am
Will openal-soft use hardware if available?
Title: Re: The NEW shorter and sweeter guide to compiling Tremulous on Windows
Post by: Ingar on December 06, 2010, 11:38:27 am
I think there's a little misunderstanding: I suggested to use openal-soft instead of
the official implementation because I had problems with that when I used
it to compile other projects, I use openal-soft in my own devenv now.

For OpenAL support you need an OpenAL32.dll (either the official (http://"http://www.openal.org./openal/Downloads/oalinst.zip") one, or the OpenAL-soft (http://"http://kcat.strangesoft.net/openal-soft-1.12.854-bin.zip") replacement).
I can't remember if those packages install the necessary development files (includes) as well.
Title: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: cron on December 07, 2010, 01:29:16 am
Updated the info on OpenAL and gave the topic a new name. Thanks Ingar!
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: cron on December 24, 2010, 08:27:05 am
I can only compile the GPP using GCC 3.4.5. Does this guide work for GCC 4.5.x on Windows?
I'll add instructions on setting up a separate MinGW install with older GCC if needed.
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: Dr. A. Goon on February 28, 2011, 04:22:16 pm
I keep trying to compile and get a heap of errors that are obviously the creative commons license, but I can't find the file.
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: gimhael on February 28, 2011, 05:24:27 pm
Unfortunately on mingw filenames are case insensitive and usually the $PATH contains the current directory, so when make looks for the default C-compiler cc it finds the Creative Commons license file ./CC and tries to execute it !

Easy fix: run
Code: [Select]
make CC=gcc and it should pick up the proper C-compiler.
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: Dr. A. Goon on March 06, 2011, 03:04:34 am
Thanks for the CC fix.  I now get errors about wsiapi.h, even though I placed it in MinGw's include folder.
Code: [Select]
Javier@Javier-PC ~/tremulous
$ make CC=gcc
make[1]: Entering directory `/home/Javier/tremulous'

Building Tremulous in build/release-HPD-x86:
  PLATFORM: HPD
  ARCH: x86
  VERSION: 1.1.0_SVN2184
  COMPILE_PLATFORM: mingw32
  COMPILE_ARCH: x86
  CC: gcc

  CFLAGS:
    -DNO_VM_COMPILED
    -DNO_GZIP
    -Isrc/zlib
    -DUSE_LOCAL_HEADERS
    -DPRODUCT_VERSION="1.1.0_SVN2184"
    -MMD
    -DNDEBUG
    -O3

  CLIENT_CFLAGS:
    -DUSE_MUMBLE
    -DUSE_VOIP
    -DFLOATING_POINT
    -DUSE_ALLOCA
    -Isrc/libspeex/include

  SERVER_CFLAGS:
    -DUSE_VOIP

  LDFLAGS:

  LIBS:

  CLIENT_LIBS:

  Output:
    build/release-HPD-x86/tremded.x86
    build/release-HPD-x86/tremulous.x86
    build/release-HPD-x86/base/cgamex86.so
    build/release-HPD-x86/base/gamex86.so
    build/release-HPD-x86/base/uix86.so

make[2]: Entering directory `/home/Javier/tremulous'
DED_CC src/server/sv_client.c
DED_CC src/server/sv_ccmds.c
DED_CC src/server/sv_game.c
DED_CC src/server/sv_init.c
DED_CC src/server/sv_main.c
DED_CC src/server/sv_net_chan.c
DED_CC src/server/sv_snapshot.c
DED_CC src/server/sv_world.c
DED_CC src/qcommon/cm_load.c
DED_CC src/qcommon/cm_patch.c
DED_CC src/qcommon/cm_polylib.c
DED_CC src/qcommon/cm_test.c
DED_CC src/qcommon/cm_trace.c
DED_CC src/qcommon/cmd.c
DED_CC src/qcommon/common.c
DED_CC src/qcommon/cvar.c
DED_CC src/qcommon/files.c
DED_CC src/qcommon/md4.c
DED_CC src/qcommon/msg.c
DED_CC src/qcommon/net_chan.c
DED_CC src/qcommon/net_ip.c
In file included from src/qcommon/net_ip.c:35:0:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:67:11: error
: expected ')' before 'const'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:73:16: error
: expected ')' before '(' token
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:82:11: error
: expected ')' before 'struct'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:96:1: error:
 expected '=', ',', ';', 'asm' or '__attribute__' before 'char'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:136:11: erro
r: expected ')' before 'const'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:180:11: erro
r: expected ')' before 'int'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:237:11: erro
r: expected ')' before 'const'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:315:11: erro
r: expected ')' before 'const'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:399:11: erro
r: expected ')' before 'WORD'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:449:11: erro
r: expected ')' before 'struct'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:482:10: erro
r: expected ')' before 'const'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:700:16: erro
r: expected ')' before '(' token
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:873:11: erro
r: expected ')' before 'WORD'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:999:14: erro
r: expected ')' before 'const'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:1021:16: err
or: expected ')' before '(' token
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/wspiapi.h:1046:11: err
or: expected ')' before 'struct'
make[2]: *** [build/release-HPD-x86/ded/net_ip.o] Error 1
make[2]: Leaving directory `/home/Javier/tremulous'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/home/Javier/tremulous'
make: *** [release] Error 2

Javier@Javier-PC ~/tremulous
$
*EDIT  More pertinently, how do I compile the code without wspiapi.h?
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: gimhael on March 06, 2011, 08:44:34 am
I think the #include of wspiapi.h or ws2spi.h can be completely removed without problems.
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: {FN}BlueCelery2 on April 11, 2011, 06:35:04 am
when i do step 2 i cant find the file y is this?
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: cron on April 14, 2011, 02:47:38 pm
The design on the libcurl site is a bit yucky, making it hard to find the right thing, but here's a direct link to what you want: http://www.gknw.net/mirror/curl/win32/curl-7.21.4-devel-mingw32.zip (http://www.gknw.net/mirror/curl/win32/curl-7.21.4-devel-mingw32.zip)
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: Dr. A. Goon on May 02, 2011, 06:28:45 pm
This guide should definitely be stickied, the old guide is outdated.

You should add a section on what to do with the build output, especially the qvm.
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: Piper802 on May 31, 2011, 12:42:22 am
Haha sorry Cron but I've been having the same probs as everyone else :P

At first I couldnt find the right libcURL, due to the site being a bit yucky as you said haha. I think you should put the direct link in the topic post :P

But yeah then I had the same problem as Dr. A Goon that involved using
Code: [Select]
make CC=gcc, which got me a liiittle further

And now I'm having the same problem as Dr. A Goon again, where its not finding wspiapi.h from the #include in tremulous/src/qcommon/net_ip.c, so I deleted the #include call, and now I'm just getting more errors about other files it cant find:

Code: [Select]
make[1]: Leaving directory `/home/Nolan/tremulous'
make[1]: Entering directory `/home/Nolan/tremulous/src/master'
rm -f debug-HPD-x86/*
rm -f release-HPD-x86/*
make[1]: Leaving directory `/home/Nolan/tremulous/src/master'

Nolan@Nolan-PC ~/tremulous
$ make
make[1]: Entering directory `/home/Nolan/tremulous'

Building Tremulous in build/release-HPD-x86:
  PLATFORM: HPD
  ARCH: x86
  VERSION: 1.1.0_SVN2213
  COMPILE_PLATFORM: mingw32
  COMPILE_ARCH: x86
  CC: cc

  CFLAGS:
    -DNO_VM_COMPILED
    -DNO_GZIP
    -Isrc/zlib
    -DUSE_INTERNAL_JPEG
    -Isrc/jpeg-8c
    -DUSE_LOCAL_HEADERS
    -DPRODUCT_VERSION="1.1.0_SVN2213"
    -MMD
    -DNDEBUG
    -O3

  CLIENT_CFLAGS:
    -DUSE_MUMBLE
    -DUSE_VOIP
    -DFLOATING_POINT
    -DUSE_ALLOCA
    -Isrc/libspeex/include

  SERVER_CFLAGS:
    -DUSE_VOIP

  LDFLAGS:

  LIBS:

  CLIENT_LIBS:

  Output:
    build/release-HPD-x86/tremded.x86
    build/release-HPD-x86/tremulous.x86
    build/release-HPD-x86/base/cgamex86.so
    build/release-HPD-x86/base/gamex86.so
    build/release-HPD-x86/base/uix86.so

make[2]: Entering directory `/home/Nolan/tremulous'
DED_CC src/server/sv_client.c
./cc: line 1: Creative_Commons: command not found
./cc: line 2: Creative: command not found
./cc: line 3: Attribution-ShareAlike: command not found
./cc: line 4: CREATIVE: command not found
./cc: line 5: SERVICES.: command not found
./cc: line 6: RELATIONSHIP.: command not found
./cc: line 7: CREATIVE: command not found
./cc: line 8: DISCLAIMS: command not found
./cc: line 9: License: command not found
./cc: line 10: syntax error near unexpected token `('
./cc: line 10: `THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
CREATIVE'
make[2]: *** [build/release-HPD-x86/ded/sv_client.o] Error 2
make[2]: Leaving directory `/home/Nolan/tremulous'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/home/Nolan/tremulous'
make: *** [release] Error 2

Nolan@Nolan-PC ~/tremulous
$ make CC=gcc
make[1]: Entering directory `/home/Nolan/tremulous'

Building Tremulous in build/release-HPD-x86:
  PLATFORM: HPD
  ARCH: x86
  VERSION: 1.1.0_SVN2213
  COMPILE_PLATFORM: mingw32
  COMPILE_ARCH: x86
  CC: gcc

  CFLAGS:
    -DNO_VM_COMPILED
    -DNO_GZIP
    -Isrc/zlib
    -DUSE_INTERNAL_JPEG
    -Isrc/jpeg-8c
    -DUSE_LOCAL_HEADERS
    -DPRODUCT_VERSION="1.1.0_SVN2213"
    -MMD
    -DNDEBUG
    -O3

  CLIENT_CFLAGS:
    -DUSE_MUMBLE
    -DUSE_VOIP
    -DFLOATING_POINT
    -DUSE_ALLOCA
    -Isrc/libspeex/include

  SERVER_CFLAGS:
    -DUSE_VOIP

  LDFLAGS:

  LIBS:

  CLIENT_LIBS:

  Output:
    build/release-HPD-x86/tremded.x86
    build/release-HPD-x86/tremulous.x86
    build/release-HPD-x86/base/cgamex86.so
    build/release-HPD-x86/base/gamex86.so
    build/release-HPD-x86/base/uix86.so

make[2]: Entering directory `/home/Nolan/tremulous'
DED_CC src/server/sv_client.c
DED_CC src/server/sv_ccmds.c
DED_CC src/server/sv_game.c
DED_CC src/server/sv_init.c
DED_CC src/server/sv_main.c
DED_CC src/server/sv_net_chan.c
DED_CC src/server/sv_snapshot.c
DED_CC src/server/sv_world.c
DED_CC src/qcommon/cm_load.c
DED_CC src/qcommon/cm_patch.c
DED_CC src/qcommon/cm_polylib.c
DED_CC src/qcommon/cm_test.c
DED_CC src/qcommon/cm_trace.c
DED_CC src/qcommon/cmd.c
DED_CC src/qcommon/common.c
DED_CC src/qcommon/cvar.c
DED_CC src/qcommon/files.c
DED_CC src/qcommon/md4.c
DED_CC src/qcommon/msg.c
DED_CC src/qcommon/net_chan.c
DED_CC src/qcommon/net_ip.c
src/qcommon/net_ip.c:35:24: fatal error: wspiapi.h: No such file or directory
compilation terminated.
make[2]: *** [build/release-HPD-x86/ded/net_ip.o] Error 1
make[2]: Leaving directory `/home/Nolan/tremulous'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/home/Nolan/tremulous'
make: *** [release] Error 2

Nolan@Nolan-PC ~/tremulous
$ make CC=gcc
make[1]: Entering directory `/home/Nolan/tremulous'

Building Tremulous in build/release-HPD-x86:
  PLATFORM: HPD
  ARCH: x86
  VERSION: 1.1.0_SVN2213M
  COMPILE_PLATFORM: mingw32
  COMPILE_ARCH: x86
  CC: gcc

  CFLAGS:
    -DNO_VM_COMPILED
    -DNO_GZIP
    -Isrc/zlib
    -DUSE_INTERNAL_JPEG
    -Isrc/jpeg-8c
    -DUSE_LOCAL_HEADERS
    -DPRODUCT_VERSION="1.1.0_SVN2213M"
    -MMD
    -DNDEBUG
    -O3

  CLIENT_CFLAGS:
    -DUSE_MUMBLE
    -DUSE_VOIP
    -DFLOATING_POINT
    -DUSE_ALLOCA
    -Isrc/libspeex/include

  SERVER_CFLAGS:
    -DUSE_VOIP

  LDFLAGS:

  LIBS:

  CLIENT_LIBS:

  Output:
    build/release-HPD-x86/tremded.x86
    build/release-HPD-x86/tremulous.x86
    build/release-HPD-x86/base/cgamex86.so
    build/release-HPD-x86/base/gamex86.so
    build/release-HPD-x86/base/uix86.so

make[2]: Entering directory `/home/Nolan/tremulous'
DED_CC src/qcommon/net_ip.c
src/qcommon/net_ip.c:50:2: error: #else without #if
src/qcommon/net_ip.c:57:24: fatal error: arpa/inet.h: No such file or directory
compilation terminated.
make[2]: *** [build/release-HPD-x86/ded/net_ip.o] Error 1
make[2]: Leaving directory `/home/Nolan/tremulous'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/home/Nolan/tremulous'
make: *** [release] Error 2

Nolan@Nolan-PC ~/tremulous
$ make CC=gcc
make[1]: Entering directory `/home/Nolan/tremulous'

Building Tremulous in build/release-HPD-x86:
  PLATFORM: HPD
  ARCH: x86
  VERSION: 1.1.0_SVN2213M
  COMPILE_PLATFORM: mingw32
  COMPILE_ARCH: x86
  CC: gcc

  CFLAGS:
    -DNO_VM_COMPILED
    -DNO_GZIP
    -Isrc/zlib
    -DUSE_INTERNAL_JPEG
    -Isrc/jpeg-8c
    -DUSE_LOCAL_HEADERS
    -DPRODUCT_VERSION="1.1.0_SVN2213M"
    -MMD
    -DNDEBUG
    -O3

  CLIENT_CFLAGS:
    -DUSE_MUMBLE
    -DUSE_VOIP
    -DFLOATING_POINT
    -DUSE_ALLOCA
    -Isrc/libspeex/include

  SERVER_CFLAGS:
    -DUSE_VOIP

  LDFLAGS:

  LIBS:

  CLIENT_LIBS:

  Output:
    build/release-HPD-x86/tremded.x86
    build/release-HPD-x86/tremulous.x86
    build/release-HPD-x86/base/cgamex86.so
    build/release-HPD-x86/base/gamex86.so
    build/release-HPD-x86/base/uix86.so

make[2]: Entering directory `/home/Nolan/tremulous'
DED_CC src/qcommon/net_ip.c
DED_CC src/qcommon/huffman.c
DED_CC src/qcommon/parse.c
DED_CC src/qcommon/q_math.c
DED_CC src/qcommon/q_shared.c
DED_CC src/qcommon/unzip.c
DED_CC src/qcommon/ioapi.c
DED_CC src/qcommon/vm.c
DED_CC src/qcommon/vm_interpreted.c
DED_CC src/null/null_client.c
DED_CC src/null/null_input.c
DED_CC src/null/null_snddma.c
DED_CC src/sys/con_log.c
DED_CC src/sys/sys_main.c
AS src/asm/ftola.s
AS src/asm/snapvectora.s
AS src/asm/matha.s
DED_CC src/zlib/adler32.c
DED_CC src/zlib/crc32.c
DED_CC src/zlib/inffast.c
DED_CC src/zlib/inflate.c
DED_CC src/zlib/inftrees.c
DED_CC src/zlib/zutil.c
DED_CC src/sys/sys_unix.c
src/sys/sys_unix.c:35:22: fatal error: sys/mman.h: No such file or directory
compilation terminated.
make[2]: *** [build/release-HPD-x86/ded/sys_unix.o] Error 1
make[2]: Leaving directory `/home/Nolan/tremulous'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/home/Nolan/tremulous'
make: *** [release] Error 2


$
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: Dr. A. Goon on May 31, 2011, 12:48:58 am
Yeah, what happened to me was that I screwed my PLATFORM variable to HPD which happened to you too. Set it to the windows standard, which you can find by inspecting the makefile.
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: zoomer on June 07, 2011, 06:02:14 pm
It worked for me first time thanks
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: cron on November 18, 2011, 03:03:49 am
More info:

You should add a section on what to do with the build output, especially the qvm.

I have compiled the source.. But now what, is there another guide that can tell me what to do next?  It obviously isn't runnable.  How can I package it for distribution to some friends? 

the tremulous.x86.exe file can be found in the build/*/ directory and the VMs can be found in vm/*/base/vm/.

You put the tremulous.x86.exe file in your Tremulous folder and execute it to play and/or put the VMs in %appdata%/Tremulous/base/vm to put your compiled gameplay changes into effect.
Title: Re: A shorter & sweeter guide to compiling Tremulous on Windows [Updated 9-24-11]
Post by: ULTRA Random ViruS on April 10, 2012, 07:59:19 am
I get lots of error messages due to the fact that i have ._ files (needed for Git repo)
I'm also having problems with auto-installing tools... they block my qvm build
Title: Re: A shorter & sweeter guide to compiling Tremulous on Windows [Updated 9-24-11]
Post by: /dev/humancontroller on April 11, 2012, 11:45:30 pm
To download the newest Tremulous 1.1 source from SVN (creates a directory ~/tremulous/ ):
   $ svn co -r HEAD svn://svn.icculus.org/tremulous/trunk/ ~/tremulous
there isn't really such a thing as the newest 1.1 source. r755 was the revision used in the 1.1.0 release. the network compatibility with 1.1.0 was lost at, IIRC, some 900ish revision, and after 100s of revisions later, GPP changes (including balance changes) were added. the gpp branch differs from the main branch (the trunk) basically only by default network settings (eg., the master server port). for users who do not fully understand the differences between the main branch and the gpp branch: avoid the main branch, download the gpp branch instead; ie., do not chose to run the above command.
Title: Re: A shorter & sweeter guide to compiling Tremulous on Windows [Updated 9-24-11]
Post by: ULTRA Random ViruS on April 12, 2012, 10:05:53 am
Its not that... i while building the qvm it says something like installing blah blah and said something like invalid or cannot etc...
Also, i tried compiling gpp and korx qvm as is, they succeed but when i try the qvm on a local server, the korx one's buildables are screwed up (multiple rcs can be built, you can walk through them, they do not power anything e.i. do nothing at all, just visually present) and the gpp [server] has lots of [i think buildable placement] problems as it shows the coordinates of some random numbers, and the client crashes before it loads the map. This time i  redone step #2, [before i had the forum opened up in a weird format and couldn't load some links [http://tremulous.net/forum/index.php?topic=14726.0;wap2]] but it seems the link no longer exists [http://www.gknw.net/mirror/curl/win32/curl-7.21.4-devel-mingw32.zip]
I googled the file but i get the same links or links that have no relation [e.i. viruses, porno sites etc...]
Title: Re: A shorter & sweeter guide to compiling Tremulous on Windows [Updated 9-24-11]
Post by: /dev/humancontroller on April 17, 2012, 03:16:46 pm
9-24-11
4-17-12
what are these silly numbers?
Title: Re: A shorter & sweeter guide to compiling Tremulous on Windows [Updated 9-24-11]
Post by: CreatureofHell on April 18, 2012, 12:39:38 am
9-24-11
4-17-12
what are these silly numbers?

Dates in MM/DD/YY format?
Title: Re: A shorter & sweeter guide to compiling Tremulous on Windows [Updated 9-24-11]
Post by: /dev/humancontroller on April 18, 2012, 04:21:07 am
9-24-11
4-17-12
what are these silly numbers?

Dates in MM/DD/YY format?
that can't be; MM/DD/YY would imply something like 04/17/12, which has a leading 0 and uses '/'s as separators. the number could be dates in Y-M-D or M-D-Y format, or could be just some fancy serial numbers. but in any case, there's an international date and time representation standard (http://www.cl.cam.ac.uk/~mgk25/iso-time.html).
Title: Re: Compiling Tremulous on Windows using MinGW
Post by: danmal on April 22, 2012, 03:42:57 pm
There's also local (non-ISO 8601 complaint) standards for the display of dates which in some countries see wide spread use. It's my belief that Cron used this local standard instead of ISO 8601. Be aware that the use of ISO 8601 compliant date representation does not actually resolve your issue. Your issue is that he has not specified which format he has used. Alternatively this confusion could be avoided by using a non-ambiguous date format such as 12 April 2012.
Title: Re: Compiling Tremulous on Windows using MinGW
Post by: /dev/humancontroller on April 23, 2012, 02:20:08 am
a non-ambiguous date format such as 12 April 2012.
or YYYY-MM-DD...
Title: Re: Compiling Tremulous on Windows using MinGW [Updated 2012-04-18]
Post by: danmal on April 23, 2012, 05:06:58 am
It's ambiguous as YYYY-MM-DD could be mistaken for YYYY-DD-MM unless the date format has been specified.
Title: Re: Compiling Tremulous on Windows using MinGW [Updated 2012-04-18]
Post by: /dev/humancontroller on April 23, 2012, 06:30:50 pm
It's ambiguous as YYYY-MM-DD could be mistaken for YYYY-DD-MM unless the date format has been specified.
or could be "mistaken" for YD-MY-YMDY, or any other fancy format, just as 12 April 2012 could be "mistaken" for YD <month> DY<fancy_checksum_of_the_year>. but who uses any of these fancy formats?
Title: Re: Compiling Tremulous on Windows using MinGW [Updated 2012-04-18]
Post by: danmal on April 24, 2012, 08:32:04 am
You should be aware however that there are 3 main formats used to represent dates; D-M-Y, M-D-Y, Y-M-D. 9-24-11 is obviously of the format M-D-Y and therefore in this case the format M-D-Y is non-ambiguous (just like ISO 8601). We must operate on one of two assumptions. That a person will be aware of the 3 major date formats in which case the use of M-D-YY is perfectly acceptable in this specific case or that a person will not be aware of any date formats in which case your proposed solution (the implementation of ISO 8601) is inadequate.
Title: Re: Compiling Tremulous on Windows using MinGW [Updated 2012-04-18]
Post by: /dev/humancontroller on April 24, 2012, 09:08:59 am
there are 3 main formats used to represent dates; D-M-Y, M-D-Y, Y-M-D.
where are you getting this shit from? if you use the MDY ordering, then separate numbers with '/' characters, ie. 1/2/3. use of the MDY ordering in combination with '-' characters is a mockery of the international standard.
We must operate on one of two assumptions. That a person will be aware of the 3 major date formats in which case the use of M-D-YY is perfectly acceptable in this specific case or that a person will not be aware of any date formats in which case your proposed solution (the implementation of ISO 8601) is inadequate.
at least my solution is better in both cases.
Title: Re: The shorter & sweeter guide to compiling Tremulous on Windows
Post by: hoggernick on August 16, 2013, 11:08:21 pm
Haha sorry Cron but I've been having the same probs as everyone else :P
...
Code: [Select]
DED_CC src/sys/sys_unix.c
src/sys/sys_unix.c:35:22: fatal error: sys/mman.h: No such file or directory
compilation terminated.
make[2]: *** [build/release-HPD-x86/ded/sys_unix.o] Error 1
make[2]: Leaving directory `/home/Nolan/tremulous'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/home/Nolan/tremulous'
make: *** [release] Error 2
$
You shouldn't be in that area at all if you're compiling for win32. Your PLATFORM variable needs to be mingw32, and then your Makefile won't try to do those unix-only things (like compiling sys_unix).

I added this to my Makefile.local (in addition to what's mentioned above in the instructions) and it got things compiling fine for me on Windows in Mingw:

PLATFORM=mingw32
Title: Re: Compiling Tremulous on Windows using MinGW [Updated 2013-07-01]
Post by: QuentinTyrantino on October 22, 2013, 01:38:07 pm
I followed exactly all the instructions but the client won't compile successfully under my Win7 64bit.

Code: [Select]
src/libs/win32/libcurl.a(strequal.o):strequal.c:(.text+0x14): undefined reference to `strcasecmp'
src/libs/win32/libcurl.a(strequal.o):strequal.c:(.text+0x48): undefined reference to `strncasecmp'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [build/release-mingw32-x86/tremulous.x86.exe] Error 1

The errors seem related to libcurl. I also tried with a fresh install of everything excluding the libcurl package, but the same errors come up.

in my Makefile.local I have:
Code: [Select]
PLATFORM=mingw32
CC=gcc
BUILD_GAME_QVM=0
INCLUDE=
LIBRARY=

Any suggestions?
Title: Re: Compiling Tremulous on Windows using MinGW [Updated 2013-07-01]
Post by: /dev/humancontroller on October 22, 2013, 10:16:16 pm
Code: [Select]
src/libs/win32/libcurl.a(strequal.o):strequal.c:(.text+0x14): undefined reference to `strcasecmp'
src/libs/win32/libcurl.a(strequal.o):strequal.c:(.text+0x48): undefined reference to `strncasecmp'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [build/release-mingw32-x86/tremulous.x86.exe] Error 1

Any suggestions?
weird.
The errors seem related to libcurl. I also tried with a fresh install of everything excluding the libcurl package, but the same errors come up.
how do you "install"? by the workings of the build system on Windows, only the internal cURL stuff is used, ie., the relevant .a file, which you can also try to replace with a newer one.
Title: Re: Compiling Tremulous on Windows using MinGW [Updated 2013-07-01]
Post by: QuentinTyrantino on October 23, 2013, 06:02:40 pm
you can add USE_CURL=0 to try to avoid those "curly" errors
if I add USE_CURL=0 , other errors come out:
Code: [Select]
LD build/release-mingw32-x86/tremulous.x86.exe
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0xe5): undefined reference to `curl_multi_remove_handle'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0xf3): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x100): undefined reference to `curl_multi_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x127): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x159): undefined reference to `curl_multi_remove_handle'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x167): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x174): undefined reference to `curl_multi_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x19b): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x209): undefined reference to `curl_multi_remove_handle'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x217): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x225): undefined reference to `curl_multi_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x2f0): undefined reference to `curl_easy_init'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x330): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x35f): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x382): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x3ba): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x3bf): undefined reference to `curl_version'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x3f0): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x40e): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x42c): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x44a): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x468): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x486): more undefined references to `curl_easy_setopt' follow
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x4e4): undefined reference to `curl_multi_init'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x503): undefined reference to `curl_multi_add_handle'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x560): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x5aa): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x5e3): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x618): undefined reference to `curl_multi_perform'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x631): undefined reference to `curl_multi_perform'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x651): undefined reference to `curl_multi_perform'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x66b): undefined reference to `curl_multi_perform'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x686): undefined reference to `curl_multi_perform'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x69d): more undefined references to `curl_multi_perform' follow
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x724): undefined reference to `curl_multi_info_read'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x757): undefined reference to `curl_easy_getinfo'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x765): undefined reference to `curl_easy_strerror'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: build/release-mingw32-x86/client/cl_curl.o: bad reloc address 0x20 in section `.eh_frame'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation

Quote
how do you "install"? by the workings of the build system on Windows, only the internal cURL stuff is used, ie., the relevant .a file, which you can also try to replace with a newer one.
already tried replacing src\libs\win32\libcurl.a and sadly I get other boring errors.
Since I don't have any coding skill and no time to learn and edit the code right now, I think I will simply try switching back to gcc v4.6.3 hoping it will solve this strange issue.
btw, thanks for your help :)
Title: Re: Compiling Tremulous on Windows using MinGW [Updated 2013-07-01]
Post by: /dev/humancontroller on October 23, 2013, 06:39:53 pm
if I add USE_CURL=0 , other errors come out:
Code: [Select]
LD build/release-mingw32-x86/tremulous.x86.exe
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0xe5): undefined reference to `curl_multi_remove_handle'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0xf3): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x100): undefined reference to `curl_multi_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x127): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x159): undefined reference to `curl_multi_remove_handle'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x167): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x174): undefined reference to `curl_multi_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x19b): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x209): undefined reference to `curl_multi_remove_handle'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x217): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x225): undefined reference to `curl_multi_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x2f0): undefined reference to `curl_easy_init'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x330): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x35f): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x382): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x3ba): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x3bf): undefined reference to `curl_version'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x3f0): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x40e): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x42c): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x44a): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x468): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x486): more undefined references to `curl_easy_setopt' follow
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x4e4): undefined reference to `curl_multi_init'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x503): undefined reference to `curl_multi_add_handle'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x560): undefined reference to `curl_easy_setopt'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x5aa): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x5e3): undefined reference to `curl_easy_cleanup'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x618): undefined reference to `curl_multi_perform'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x631): undefined reference to `curl_multi_perform'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x651): undefined reference to `curl_multi_perform'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x66b): undefined reference to `curl_multi_perform'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x686): undefined reference to `curl_multi_perform'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x69d): more undefined references to `curl_multi_perform' follow
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x724): undefined reference to `curl_multi_info_read'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x757): undefined reference to `curl_easy_getinfo'
build/release-mingw32-x86/client/cl_curl.o:cl_curl.c:(.text+0x765): undefined reference to `curl_easy_strerror'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: build/release-mingw32-x86/client/cl_curl.o: bad reloc address 0x20 in section `.eh_frame'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation
remove the whole build directory first, then build.
Title: Re: Compiling Tremulous on Windows using MinGW [Updated 2013-07-01]
Post by: QuentinTyrantino on October 23, 2013, 07:44:54 pm
remove the whole build directory first, then build.
I always remove the build directory, but that didn't help. I finally solved the problem switching to gcc v4.6.3, everything compiled right!
So, there must be some linking bug in gcc 4.8.1 with curl.

If anyone encounter the same problem:
- Get MinGW Builds: http://sourceforge.net/projects/mingwbuilds/ (http://sourceforge.net/projects/mingwbuilds/)
- Install it with these options: version:4.6.3 Architecture:x32 Threads:win32 Exception:dwarf Build:2 and choose a separate folder, like c:\Mingw-4.6.3
- Copy the whole content of c:\Mingw-4.6.3\mingw to c:\MinGW and overwrite all files
- before compiling, do a "make clean"
- Done!
Title: Re: Compiling Tremulous on Windows using MinGW [Updated 2013-07-01]
Post by: vcxzet on October 28, 2013, 09:56:52 am
You can try tdm mingw builds. I had no problem with them in the past.
http://tdm-gcc.tdragon.net/