HowTo: Compile from SVN (Ubuntu/Debian)

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Postby Spaceman » Fri Jun 13, 2008 1:59 pm

Sorry, my build script had some issues and I had intended to update it. But, I forgot :oops:

I have now updated it. :lol:

You may want to remove or comment the the final line. Use # before the text to comment it.

Below is the output from my Konsole using my build script from the above message, Note, I had recently run the script and it had already updated Nexuiz and Darkplaces SVN's.
Code: Select all
victim@victim:~/Games$
victim@victim:~/Games$
victim@victim:~/Games$ simple-build-nexuiz.sh

Starting the process


1. Updating Nexuiz from SVN
At revision 3703.
Nexuiz updated from SVN


2. Compiling menu
Source file: progs.src
outputfile: ../../menu.dat
compiling config.qh
compiling msys.qh
compiling mbuiltin.qh
compiling oo/base.h
compiling ../common/constants.qh
compiling ../common/util.qh
compiling ../common/mapinfo.qh
compiling ../common/campaign_common.qh
compiling gamecommand.qh
compiling menu.qh
compiling draw.qh
compiling skin.qh
compiling nexuiz/util.qh
compiling oo/classdefs.h
compiling classes.c
compiling oo/constructors.h
compiling classes.c
compiling oo/implementation.h
compiling classes.c
compiling ../common/util.qc
compiling ../common/gamecommand.qc
compiling gamecommand.qc
compiling menu.qc
compiling draw.qc
compiling nexuiz/util.qc
compiling ../common/campaign_file.qc
compiling ../common/campaign_setup.qc
compiling ../common/mapinfo.qc
Progs should run on any Quake executor
139816 strofs (of 1000000)
29767 numstatements (of 524288)
   766 numfunctions (of 16384)
  6875 numglobaldefs (of 32768)
   605 numfielddefs (565 unique) (of 2048)
  6877 numpr_globals (of 65536)
Writing ../../menu.dat
493064 TOTAL SIZE
Writing ../../menu.lno
Compile Complete

optres_shortenifnots 57
optres_overlaptemps 10544
optres_constantarithmatic 30
optres_nonvec_parms 6328
optres_assignments 473
optres_unreferenced 157
optres_dupconstdefs 98
numtemps 303
0 warnings
Menu compilation finished


3. Compiling server
Source file: progs.src
outputfile: ../../progs.dat
compiling sys.qh
compiling builtins.qh
compiling constants.qh
compiling ../common/constants.qh
compiling defs.qh
compiling extensions.qh
compiling campaign.qh
compiling ../common/campaign_common.qh
compiling ../common/util.qh
compiling ../common/util.qc
compiling ../common/mapinfo.qh
compiling ipban.qh
compiling keyhunt.qh
compiling antilag.qh
compiling vote.qh
compiling miscfunctions.qc
compiling waypointsprites.qc
compiling bots.qc
compiling havocbot_roles.qc
compiling havocbot.qc
compiling g_subs.qc
compiling runematch.qc
compiling arena.qc
compiling g_violence.qc
compiling g_damage.qc
compiling teamplay.qc
compiling cl_physics.qc
compiling g_world.qc
compiling g_decors.qc
compiling g_casings.qc
compiling t_jumppads.qc
compiling t_teleporters.qc
compiling sv_main.qc
compiling sv_stats.qc
compiling g_triggers.qc
compiling cl_weaponsystem.qc
compiling w_common.qc
compiling w_laser.qc
compiling w_shotgun.qc
compiling w_uzi.qc
compiling w_grenadelauncher.qc
compiling w_electro.qc
compiling w_crylink.qc
compiling w_nex.qc
compiling w_hagar.qc
compiling w_rocketlauncher.qc
compiling t_items.qc
compiling cl_weapons.qc
compiling cl_impulse.qc
compiling cl_player.qc
compiling cl_client.qc
compiling t_plats.qc
compiling antilag.qc
compiling ctf.qc
compiling domination.qc
compiling mode_onslaught.qc
compiling g_hook.qc
compiling t_swamp.qc
compiling clientcommands.qc
compiling vote.qc
compiling campaign.qc
compiling ../common/campaign_file.qc
compiling ../common/campaign_setup.qc
compiling ../common/gamecommand.qc
compiling gamecommand.qc
compiling keyhunt.qc
compiling assault.qc
compiling ipban.qc
compiling ../common/mapinfo.qc
compiling t_quake3.qc
compiling t_halflife.qc
compiling t_quake.qc
Recognised progs as regular Quake
Progs should run on any Quake executor
182748 strofs (of 1000000)
50636 numstatements (of 524288)
  1165 numfunctions (of 16384)
  8787 numglobaldefs (of 32768)
  1032 numfielddefs (902 unique) (of 2048)
  9014 numpr_globals (of 65536)
Writing ../../progs.dat
744572 TOTAL SIZE
Writing ../../progs.lno
112 unique precache_sounds
109 unique precache_models
Compile Complete

optres_shortenifnots 396
optres_overlaptemps 20007
optres_constantarithmatic 152
optres_nonvec_parms 11309
optres_assignments 1436
optres_unreferenced 230
optres_dupconstdefs 285
numtemps 561
0 warnings
Server compilation finished


4. Updating Darkplaces from SVN
At revision 8353.
Darkplaces updated from SVN


5. Compiling Darkplaces
make sv-nexuiz cl-nexuiz sdl-nexuiz
make[1]: Entering directory `/home/victim/Games/Darkplaces/darkplaces'
make bin-release \
                DP_MAKE_TARGET=linux DP_SOUND_API=ALSA \
                EXE="nexuiz-dedicated" LDFLAGS_COMMON="-lm -ldl"
make[2]: Entering directory `/home/victim/Games/Darkplaces/darkplaces'

========== nexuiz-dedicated (release) ==========
make nexuiz-dedicated \
                DP_MAKE_TARGET=linux DP_SOUND_API=ALSA \
                CFLAGS="-MD   -Wall -Wsign-compare -Wdeclaration-after-statement   -O2 -fno-strict-aliasing "\
                LDFLAGS="-O2 -fno-strict-aliasing  -DSVNREVISION=`test -d .svn && svnversion || echo -` -DBUILDTYPE=release -lm -ldl"
make[3]: Entering directory `/home/victim/Games/Darkplaces/darkplaces'
gcc -o nexuiz-dedicated builddate.c sys_linux.o vid_null.o snd_null.o cd_null.o cd_shared.o cl_collision.o cl_demo.o cl_dyntexture.o cl_gecko.o cl_input.o cl_main.o cl_parse.o cl_particles.o cl_screen.o cl_video.o clvm_cmds.o cmd.o collision.o common.o console.o csprogs.o curves.o cvar.o dpvsimpledecode.o filematch.o fractalnoise.o fs.o gl_backend.o gl_draw.o gl_rmain.o gl_rsurf.o gl_textures.o host.o host_cmd.o image.o image_png.o jpeg.o keys.o lhnet.o libcurl.o mathlib.o matrixlib.o mdfour.o menu.o meshqueue.o model_alias.o model_brush.o model_shared.o model_sprite.o mvm_cmds.o netconn.o palette.o polygon.o portals.o protocol.o prvm_cmds.o prvm_edict.o prvm_exec.o r_explosion.o r_lerpanim.o r_lightning.o r_modules.o r_shadow.o r_sky.o r_sprites.o sbar.o sv_demo.o sv_main.o sv_move.o sv_phys.o sv_user.o svbsp.o svvm_cmds.o sys_shared.o vid_shared.o view.o wad.o world.o zone.o -O2 -fno-strict-aliasing  -DSVNREVISION=8353 -DBUILDTYPE=release -lm -ldl
make[3]: Leaving directory `/home/victim/Games/Darkplaces/darkplaces'
strip nexuiz-dedicated
make[2]: Leaving directory `/home/victim/Games/Darkplaces/darkplaces'
make bin-release \
                DP_MAKE_TARGET=linux DP_SOUND_API=ALSA \
                EXE="nexuiz-glx" LDFLAGS_COMMON="-lm -ldl -L/usr/X11R6/lib -lX11 -lXpm -lXext -lXxf86dga -lXxf86vm -lasound `if [ -n "" ]; then echo " /libmodplug.a -lstdc++"; fi`"
make[2]: Entering directory `/home/victim/Games/Darkplaces/darkplaces'

========== nexuiz-glx (release) ==========
make nexuiz-glx \
                DP_MAKE_TARGET=linux DP_SOUND_API=ALSA \
                CFLAGS="-MD   -Wall -Wsign-compare -Wdeclaration-after-statement   -O2 -fno-strict-aliasing "\
                LDFLAGS="-O2 -fno-strict-aliasing  -DSVNREVISION=`test -d .svn && svnversion || echo -` -DBUILDTYPE=release -lm -ldl -L/usr/X11R6/lib -lX11 -lXpm -lXext -lXxf86dga -lXxf86vm -lasound "
make[3]: Entering directory `/home/victim/Games/Darkplaces/darkplaces'
gcc -o nexuiz-glx builddate.c sys_linux.o vid_glx.o snd_main.o snd_mem.o snd_mix.o snd_ogg.o snd_wav.o snd_modplug.o snd_alsa.o cd_linux.o cd_shared.o cl_collision.o cl_demo.o cl_dyntexture.o cl_gecko.o cl_input.o cl_main.o cl_parse.o cl_particles.o cl_screen.o cl_video.o clvm_cmds.o cmd.o collision.o common.o console.o csprogs.o curves.o cvar.o dpvsimpledecode.o filematch.o fractalnoise.o fs.o gl_backend.o gl_draw.o gl_rmain.o gl_rsurf.o gl_textures.o host.o host_cmd.o image.o image_png.o jpeg.o keys.o lhnet.o libcurl.o mathlib.o matrixlib.o mdfour.o menu.o meshqueue.o model_alias.o model_brush.o model_shared.o model_sprite.o mvm_cmds.o netconn.o palette.o polygon.o portals.o protocol.o prvm_cmds.o prvm_edict.o prvm_exec.o r_explosion.o r_lerpanim.o r_lightning.o r_modules.o r_shadow.o r_sky.o r_sprites.o sbar.o sv_demo.o sv_main.o sv_move.o sv_phys.o sv_user.o svbsp.o svvm_cmds.o sys_shared.o vid_shared.o view.o wad.o world.o zone.o -O2 -fno-strict-aliasing  -DSVNREVISION=8353 -DBUILDTYPE=release -lm -ldl -L/usr/X11R6/lib -lX11 -lXpm -lXext -lXxf86dga -lXxf86vm -lasound
make[3]: Leaving directory `/home/victim/Games/Darkplaces/darkplaces'
strip nexuiz-glx
make[2]: Leaving directory `/home/victim/Games/Darkplaces/darkplaces'
make bin-release \
                DP_MAKE_TARGET=linux DP_SOUND_API=ALSA \
                EXE="nexuiz-sdl" LDFLAGS_COMMON="-lm -ldl `sdl-config --libs` `if [ -n "" ]; then echo " /libmodplug.a -lstdc++"; fi`"
make[2]: Entering directory `/home/victim/Games/Darkplaces/darkplaces'

========== nexuiz-sdl (release) ==========
make nexuiz-sdl \
                DP_MAKE_TARGET=linux DP_SOUND_API=ALSA \
                CFLAGS="-MD   -Wall -Wsign-compare -Wdeclaration-after-statement   -O2 -fno-strict-aliasing "\
                LDFLAGS="-O2 -fno-strict-aliasing  -DSVNREVISION=`test -d .svn && svnversion || echo -` -DBUILDTYPE=release -lm -ldl -L/usr/lib -lSDL "
make[3]: Entering directory `/home/victim/Games/Darkplaces/darkplaces'
gcc -o nexuiz-sdl builddate.c sys_sdl.o vid_sdl.o snd_main.o snd_mem.o snd_mix.o snd_ogg.o snd_wav.o snd_modplug.o snd_sdl.o cd_sdl.o cd_shared.o cl_collision.o cl_demo.o cl_dyntexture.o cl_gecko.o cl_input.o cl_main.o cl_parse.o cl_particles.o cl_screen.o cl_video.o clvm_cmds.o cmd.o collision.o common.o console.o csprogs.o curves.o cvar.o dpvsimpledecode.o filematch.o fractalnoise.o fs.o gl_backend.o gl_draw.o gl_rmain.o gl_rsurf.o gl_textures.o host.o host_cmd.o image.o image_png.o jpeg.o keys.o lhnet.o libcurl.o mathlib.o matrixlib.o mdfour.o menu.o meshqueue.o model_alias.o model_brush.o model_shared.o model_sprite.o mvm_cmds.o netconn.o palette.o polygon.o portals.o protocol.o prvm_cmds.o prvm_edict.o prvm_exec.o r_explosion.o r_lerpanim.o r_lightning.o r_modules.o r_shadow.o r_sky.o r_sprites.o sbar.o sv_demo.o sv_main.o sv_move.o sv_phys.o sv_user.o svbsp.o svvm_cmds.o sys_shared.o vid_shared.o view.o wad.o world.o zone.o -O2 -fno-strict-aliasing  -DSVNREVISION=8353 -DBUILDTYPE=release -lm -ldl -L/usr/lib -lSDL
make[3]: Leaving directory `/home/victim/Games/Darkplaces/darkplaces'
strip nexuiz-sdl
make[2]: Leaving directory `/home/victim/Games/Darkplaces/darkplaces'
make[1]: Leaving directory `/home/victim/Games/Darkplaces/darkplaces'
Darkplaces compiled


6. Linking engines
Engines linked


Moving and renaming the three compiled files from /home/victim/Games/Darkplaces/darkplaces to /home/victim/Games/Nexuiz/trunk
Renamed the three compiled files

Starting the game /home/victim/Games/Nexuiz/trunk/nexuiz-linux-sdl.sh
victim@victim:~/Games$
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Postby [-z-] » Fri Jun 13, 2008 2:50 pm

okay, I was missing "libxext-dev". I installed it with synaptic. YAY I COMPILED! thanks
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby Mr. Bougo » Thu Jun 19, 2008 7:42 pm

Ohey fruits, how did you get that whole package list? Linux newb inside... Can't figure out how you found out what packages you needed.
Mr. Bougo
Keyboard killer
 
Posts: 760
Joined: Mon Sep 10, 2007 3:29 pm

Postby :) » Thu Jun 19, 2008 7:59 pm

Mr. Bougo wrote:Ohey fruits, how did you get that whole package list? Linux newb inside... Can't figure out how you found out what packages you needed.

I'm guessing he used
Code: Select all
apt-get build-dep nexuiz
:)
Keyboard killer
 
Posts: 590
Joined: Tue Feb 28, 2006 9:09 pm

Postby FruitieX » Fri Jun 20, 2008 6:01 pm

Nope, I compiled, analyzed the errors, sudo aptitude search 'd for the missing dependency and installed the -dev package of it ;)
FruitieX
Keyboard killer
 
Posts: 588
Joined: Mon Nov 13, 2006 4:47 pm
Location: Finland

Postby Spaceman » Sat Jun 21, 2008 11:02 pm

A version of FrutieX's build script that will halt if an error occurs. I have divided it into two parts. One updates your local SVN copy, and the other compiles the game.

If the compilation has completed without any problems then Nexuiz should start.

Update SVN
Code: Select all
#!
function updateNexuizSVN {
echo "A. Updating Nexuiz from SVN"
cd "$nex_trunk"
svn up
}

function updateDarkplacesSVN {
echo "B. Updating Darkplaces from SVN"
cd "$dp_trunk"
svn up
}

function display {
echo "$1" ; echo ; echo
}

nex_trunk=~/Games/Nexuiz/trunk # Path to Nexuiz SVN trunk
dp_trunk=~/Games/Darkplaces/darkplaces # Path to DarkPlaces SVN trunk

display "Starting the update"

updateNexuizSVN || { echo "Error updating Nexuiz from SVN" ; exit 0 ; }

display "Nexuiz updated from SVN"

updateDarkplacesSVN || { echo "Error updating Darkplaces from SVN" ; exit 0 ; }

display "Darkplaces updated from SVN"

display "Finished updating Nexuiz and Darkplaces from SVN"


Build / compile the game
Code: Select all
#!
function compileCSQC {
echo "0. Compiling CSQC"
cd "$nex_trunk/data/qcsrc/client"
fteqcc
}

function compileMenu {
echo "1. Compiling menu"
cd "$nex_trunk/data/qcsrc/menu"
fteqcc
}

function compileServer {
echo "2. Compiling server"
cd "$nex_trunk/data/qcsrc/server"
fteqcc
}

function compileDarkplaces {
echo "3. Compiling Darkplaces"
cd "$dp_trunk"
make nexuiz
}

function linkingEngines {
echo "4. Linking engines"
ln -f nexuiz-glx "$nex_trunk/nexuiz-glx"
ln -f nexuiz-sdl "$nex_trunk/nexuiz-sdl"
}

function moveFiles {
echo "5. Moving and renaming the three compiled files from $dp_trunk to $nex_trunk"
mv "$dp_trunk/nexuiz-dedicated" "$nex_trunk/nexuiz-linux-686-dedicated"
mv "$dp_trunk/nexuiz-glx" "$nex_trunk/nexuiz-linux-686-glx"
mv "$dp_trunk/nexuiz-sdl" "$nex_trunk/nexuiz-linux-686-sdl"
}

function display {
echo "$1" ; echo ; echo
}

nex_trunk=~/Games/Nexuiz/trunk # Path to Nexuiz SVN trunk
dp_trunk=~/Games/Darkplaces/darkplaces # Path to DarkPlaces SVN trunk

display "Starting the process"

compileCSQC || { echo "Error CSQC compilation failed" ; exit 0 ; }

display "CSQC compilation finished"

compileMenu || { echo "Error menu compilation failed" ; exit 0 ; }

display "Menu compilation finished"

compileServer || { echo "Error server compilation failed" ; exit 0 ; }

display "Server compilation finished"

compileDarkplaces || { echo "Error compiling Darkplaces" ; exit 0 ; }

display "Darkplaces compiled"

linkingEngines || { echo "Error linking engines" ; exit 0 ; }

display "Engines linked"

moveFiles || { echo "Error renaming / moving the new files" ; exit 0 ; }

display "Renamed and moved the three recently compiled files"

display "Starting the game $nex_trunk/nexuiz-linux-sdl.sh"

cd "$nex_trunk"

./nexuiz-linux-sdl.sh
Last edited by Spaceman on Sat Jul 05, 2008 12:35 am, edited 1 time in total.
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Postby Dokujisan » Sun Jun 22, 2008 6:34 am

On Ubuntu 7.10, using victim's last build script, I got this error...



Code: Select all
root@server4:/usr/local/games# ./compile_nexuiz.sh
Starting the process


1. Compiling menu
Source file: progs.src
outputfile: ../../menu.dat
compiling config.qh
compiling msys.qh
compiling mbuiltin.qh
compiling oo/base.h
compiling ../common/constants.qh
compiling ../common/util.qh
compiling ../common/mapinfo.qh
compiling ../common/campaign_common.qh
compiling gamecommand.qh
compiling menu.qh
compiling draw.qh
compiling skin.qh
compiling nexuiz/util.qh
compiling oo/classdefs.h
compiling classes.c
compiling oo/constructors.h
compiling classes.c
compiling oo/implementation.h
compiling classes.c
in function addItemModalController (line 5)
item/modalcontroller.c:242: error: Unknown punctuation
item/modalcontroller.c:242: error: Unknown punctuation
item/modalcontroller.c:242: error: Unknown punctuation
item/modalcontroller.c:242: error: Unknown punctuation
item/modalcontroller.c:242: error: Unknown punctuation
item/modalcontroller.c:242: error: Unknown punctuation
item/modalcontroller.c:242: error: Unknown punctuation
item/modalcontroller.c:242: error: Unknown punctuation
item/modalcontroller.c:242: error: Unknown punctuation
item/modalcontroller.c:242: error: Unknown punctuation
item/modalcontroller.c:242: error: Unknown punctuation
in function configureButtonButton (line 3)
item/button.c:50: error: Unknown punctuation
in function toStringCheckBox (line 6)
item/checkbox.c:27: error: Unknown punctuation
in function configureSliderVisualsSlider (line 6)
item/slider.c:67: error: Unknown punctuation
in function valueToIdentifierTextSlider (line 6)
item/textslider.c:24: warning: RETURN VALUE ALREADY IN USE
in function drawListBoxItemListBox (line 34)
item/listbox.c:283: error: Unknown punctuation
in function drawNexuizPlayerSettingsTab (line 4)
nexuiz/dialog_multiplayer_playersetup.c:26: error: Unknown punctuation
in function loadMapInfoNexuizMapInfoDialog (line 4)
nexuiz/dialog_multiplayer_create_mapinfo.c:58: error: Unknown punctuation
in function Nexuiz_KeyBinds_Read (line 43)
nexuiz/keybinder.c:55: warning: RETURN VALUE ALREADY IN USE

************ ERROR ************
Errors have occured

Error in classes.c on line 67
Error menu compilation failed
Dokujisan
Forum addon
 
Posts: 1199
Joined: Sat Oct 07, 2006 4:31 pm
Location: Louisville, Kentucky

Postby [-z-] » Sun Jun 22, 2008 3:11 pm

fteqcc is outdated. With the help of Ronan and MrBougo, I was able to figure out the following.

1. Remove the fteqcc installed by your package manager:

Code: Select all
sudo apt-get remove fteqcc


2. Get a copy of the latest fteqcc and compile it.

Code: Select all
svn co https://fteqw.svn.sourceforge.net/svnroot/fteqw/trunk/engine/qclib/
cd qclib
make


3. chmod +x and move fteqcc.bin to your /usr/bin

Code: Select all
sudo chmod +x fteqcc.bin
sudo mv fteqcc.bin /usr/bin


4. Edit your shell script used for compiling by appending a .bin to fteqcc wherever it appears. (probably a better way but I don't know it).


It compiles the server fine for me, clients are another story :-P
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby Spaceman » Sat Jul 05, 2008 12:57 am

Earlier today Blµb committed to the Nexuiz SVN a significant update to the CSQC (client side Quake C). This means that you should also compile the new CSQC code, using something like
cd data/qcsrc/client
fteqcc

If you don't compile the CSQC you will only be able to play for 5 seconds before the game drops you to the console.

I have updated and tested my recent build script.

FruitieX's script needs these lines adding to it
echo "Compiling CSQC"
cd "$nex_trunk/data/qcsrc/client"
fteqcc
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Postby [-z-] » Sat Jul 05, 2008 4:23 pm

Code: Select all
~/Games/Nexuiz/trunk/data/qcsrc/client$ fteqcc
Source file: progs.src
outputfile: ../../csprogs.dat
compiling Defs.qc
Defs.qc:171: error: "<<" is not a type
Defs.qc:173: error: "==" is not a type
Defs.qc:175: error: ">>" is not a type

************ ERROR ************
Errors have occured

Error in Defs.qc on line 177


:(

Edit: Somehow there was a conflict, I just deleted my defs.qc and checked out again.
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

PreviousNext

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest