Tremulous Forum

Mods => Modding Center => Topic started by: crazywhiteboy9x9 on March 08, 2008, 03:06:09 am

Title: How Do I Complie A Patch
Post by: crazywhiteboy9x9 on March 08, 2008, 03:06:09 am
Ok so i want to learn how to complie patches will some 1 help me out???
Title: Re: How Do I Complie A Patch
Post by: Death On Ice on March 08, 2008, 03:33:26 am
You mean patch the source with a downloaded patch?

Or do you mean edit the source and make a patch from your edits?
Title: Re: How Do I Complie A Patch
Post by: TinMan on March 08, 2008, 07:54:01 am
You don't compile a patch, you patch with a patch.
Patch files are applied to existing files and they patch them.
Search these forums, there are plenty of threads that have covered doing it.
Search "compile trem" for the compile info.
Title: Re: How Do I Complie A Patch
Post by: n.o.s.brain on March 09, 2008, 01:56:59 am
to make a patch from source code, type
Code: [Select]
svn diff > patchfile.patch
to apply a patch, type
Code: [Select]
patch -p0 < patchname.patch
Title: Re: How Do I Complie A Patch
Post by: Odin on March 11, 2008, 03:36:30 am
If you are about to make your own patch, you must also add your own files to the source code before doing svn diff:
Code: [Select]
svn add file
Title: Re: How Do I Complie A Patch
Post by: MartinX3 on March 23, 2008, 08:01:17 pm
And when i want to patch my Game.qvm?
I want to have a super hyper mega Game.QVM for my server.
With all specials. XD
Title: Re: How Do I Complie A Patch
Post by: David on March 24, 2008, 12:42:51 am
And when i want to patch my Game.qvm?
I want to have a super hyper mega Game.QVM for my server.
With all specials. XD
to apply a patch, type
Code: [Select]
patch -p0 < patchname.patch
Title: Re: How Do I Complie A Patch
Post by: n.o.s.brain on March 24, 2008, 01:24:45 am
if that doesn't make sense, then read this (http://tremulous.net/forum/index.php?topic=3408.0) if you are on windows...
Title: Re: How Do I Complie A Patch
Post by: MartinX3 on March 24, 2008, 10:31:26 pm
Okay I tried to compile but it gave me an error.
=(
Title: Re: How Do I Complie A Patch
Post by: Amanieu on March 25, 2008, 06:06:49 am
-_-
You expect people to know how to solve your problem, but you don't tell us what the problem is. Post the error.
Title: Re: How Do I Complie A Patch
Post by: blood2.0 on March 27, 2008, 05:16:15 am
what commands were you thinking of. just wondering?
Title: Re: How Do I Complie A Patch
Post by: AlphaBetaAdmin on April 10, 2008, 10:03:17 pm
interesting, yesterday it was working...but now i can't seem to get it to work  :( it keeps saying file not found [i have to do it in the command prompt because i have a vista  :-\]
Title: Re: How Do I Complie A Patch
Post by: Divmax on April 11, 2008, 10:29:27 am
-_-
You expect people to know how to solve your problem, but you don't tell us what the problem is. Post the error.
Let me guess the error, Error 2/ GCC not found.
Title: Re: How Do I Complie A Patch
Post by: lizards160 on April 12, 2008, 07:44:57 pm
-_-
You expect people to know how to solve your problem, but you don't tell us what the problem is. Post the error.
Let me guess the error, Error 2/ GCC not found.

I just got this error how do you fix it??
exact code here
Code: [Select]
$ make
make[1]: Entering directory `/c/editable/code'

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

  CFLAGS:
    -MMD
    -Wall
    -fno-strict-aliasing
    -Wimplicit
    -Wstrict-prototypes
    -DUSE_ICON
    -Isrc/SDL12/include
    -DUSE_OPENAL=1
    -DUSE_OPENAL_DLOPEN
    -DUSE_CURL
    -DCURL_STATICLIB
    -m32
    -DUSE_LOCAL_HEADERS
    -DNDEBUG
    -O3
    -march=i586
    -fno-omit-frame-pointer
    -ffast-math
    -falign-loops=2
    -funroll-loops
    -falign-jumps=2
    -falign-functions=2
    -fstrength-reduce

  LDFLAGS:
    -lwsock32
    -lwinmm
    -m32

  Output:
    build/release-mingw32-x86/tremded.x86.exe
    build/release-mingw32-x86/tremulous.x86.exe
    build/release-mingw32-x86/base/vm/cgame.qvm
    build/release-mingw32-x86/base/vm/game.qvm
    build/release-mingw32-x86/base/vm/ui.qvm

make[2]: Entering directory `/c/editable/code'
DED_CC src/server/sv_client.c
make[2]: gcc: Command not found
make[2]: *** [build/release-mingw32-x86/ded/sv_client.o] Error 127
make[2]: Leaving directory `/c/editable/code'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/c/editable/code'
make: *** [release] Error 2

Title: Re: How Do I Complie A Patch
Post by: David on April 12, 2008, 10:11:34 pm
You can't compile without a compiler.
Follow one of the tutorials.
Title: Re: How Do I Complie A Patch
Post by: Divmax on April 13, 2008, 02:59:04 am
*smacks head**spoonfeeds some who doesn't use the Search function*
Error :
Code: [Select]
/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
^Something like that.

Reply :
Code: [Select]
maybe you didnt set the mingw path :/
Solution :
http://tremulous.net/phpBB2/viewtopic.php?t=2672&highlight=fstab
Title: Re: How Do I Complie A Patch
Post by: AlphaBetaAdmin on April 13, 2008, 11:58:04 pm
ok, i think i have everything ready, except:

where do you put the .patch file?

and

where do you put the original game.qvm?

also, what i said above, i was getting an error, here it is:


Code: [Select]
$ make
make -C src/tools/lcc install
make[1]: Entering directory `/mingw/tremulous/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[1]: gcc: Command not found
make[1]: *** [build-mingw32-x86/etc/lcc.o] Error 127
make[1]: Leaving directory `/mingw/tremulous/src/tools/lcc'
make: *** [tools] Error 2


[i'm probably doing something horribly wrong, but idk what]
Title: Re: How Do I Complie A Patch
Post by: Divmax on April 14, 2008, 10:23:16 am
Read the post above you for the solution for your error.../me is getting pissed off with people WHO CANT FUCKING READ.
Title: Re: How Do I Complie A Patch
Post by: AlphaBetaAdmin on April 14, 2008, 08:25:22 pm
wow...i finaly got it working, some files were installed in the wrong place =/


i moved:

cc1.exe
gcc.exe
cpp0.exe

to the bin folder in C:\msys\1.0\bin


and i copied mingw directly to C:/

wow, there are a lot of files to be made xD
Title: Re: How Do I Complie A Patch
Post by: AlphaBetaAdmin on April 14, 2008, 10:13:43 pm
um, i figured out last error, now onto the next one...

Code: [Select]
$ patch -p0 < NERO_QVM.patch
m.AllocationBase 0x0, m.BaseAddress 0x715B0000, m.RegionSize 0xD0000, m.State 0x10000
C:\msys\1.0\bin\patch.exe: *** Couldn't reserve space for cygwin's heap (0x715B0000 <0x1690000>) in child, Win32 error 0
Title: Re: How Do I Complie A Patch
Post by: David on April 15, 2008, 02:03:56 pm
A one second google on that error and the top hit says that your a retard for moving things around and blindly hoping it would work.
Read the docs.
Title: Re: How Do I Complie A Patch
Post by: Divmax on April 15, 2008, 02:42:42 pm
Quote from:
The error "Couldn't reserve space for cygwin's heap" is actually due to some
XP/cygwin bug in older versions of the cygwin1 DLL. To fix the problem, go
to http://www.cygwin.com, and then download and install the lastest and
greatest version  (r1.3.0). One potential hang up here, is that PDP++
expects to find cygwin1.dll in something like C:\WINDOWS\SYSTEM32, however
the cygwin install program puts it in something like C:\CYGWIN\BIN. So, to
fix this just copy the file over.
The other solution, disable your AV(For stupid people, Anti-Virus).