Compiling:Makefiles
Contents
Compiling with Makefiles
Concept
Because you can do all of the compiling-stuff on the console you can automize everything. Makefiles are a simple way to go as they are basically developed for compiling Sourcecode. They keep track on when the files were changed and do only the necessary recompiles (etc. if you compiled vis and do a light afterwards without changes it will just compile light additionally).
Misato-san introduced this concept some time ago in the official UrT-Forums and it was developed further for more complex tasks.
Installation
Download the Skeleton and extract it inside an empty folder (e.g. ~/mapping/).
Configuration
First open the Makefile in your skel-folder and fill out the marked sections. They are abbreviated shown here:
# Map version MAP_VER = _dev >> leave this. # Paths #Editor directory for saving maps ED_MAPDIR = ~/.q3a/q3ut4/maps/ >> where the *.map-files are stored - in doubt leave it. #Where to install maps INSTALLDIR = ~/.q3a/q3ut4/ >> where the *.pk3-files are stored - in doubt leave it. # Const variables - no need to change this >> really: don't! PROJECT = $(shell basename `pwd`) LOCATION = $(shell pwd)/ WORKDIR = build/ SRCDIR = src/ TOOLDIR = tools/ ARDIR = archive/ PK3DIR = pk3/ CONFDIR = conf/ # Compiler base flags MC = /home/sdressel/netradiant/install/q3map2.x86 >> your q3map2-binary MC_FLAGS = -game quake3 -threads 8 >> threads # should match your cpu-cores MC_FS_FLAGS = -fs_game q3ut4 -fs_basepath /home/quake3 >> fs_basepath is the path taken for textures etc. pp. >> if you are going to follow the tutorial, leave it so. # Stage specific flags include conf/bsp.conf include conf/vis.conf include conf/light.conf >> configs .. can be changed to i.e. dlight.conf for debug (=dirty) light etc. # pk3 related DISTDIR = distrib/ #dirs to include in pk3, if they exist DIST_INCLUDE = maps/* scripts/* textures/* sound/* models/* icons/* env/* >> don't change. # deploy >> for automatic uploading to an ftp-server. should be self-explaining. DEPLOY_SERVER = myserver.example.com DEPLOY_USER = username DEPLOY_PASS = password DEPLOY_DIR = / >> if using NuLL's diff/merge-mapping-tool you need to setup this. normally not needed. DUSER = diff-username (e.g. Drezil) DOTHER = diff-other_user (e.g. apath0) # rcon-stuff >> for reloading the map on a server after its uploaded. normal rcon/server-data. >> Privatepassword is for joining the server (if its private) RCON_SERVER = myurtserver.example.com RCON_PORT = 27960 RCON_PASSWORD = rconpassword SERVER_PASSWORD = private_password # local urt >> your urt-binary URT_BINARY = /home/sdressel/UrbanTerror/ioq3-urt
Everything after that should not be needed to change.
Setting everyting up
For every map you make you make a seperate folder. Lets say your map is named ut4_uptown. Then you copy the skeleton into an uptown-folder:
cp -R skel/ uptown
now you once do a
make pdirs
a lot of stuff should appear. After everything there are 3 blank lines. After that the errors are posted (usually something like "source map not found"). This will automatically set up stuff and link the .map-file from your ED_MAPDIR directory. Basically you can now start to map (but you shouldn't. There is more!)
Mapper Installation
Normally you want a clean urt-version so you dont conflict with other peoples shaders, textures and whatever. Basically your map should be self-dependend. For this we set up a clean urt-copy. Download UrT (or clean and copy it) to another folder. We will go with /home/quake3/ Extract UrT to there. Then go into the q3ut4-subfolder and extract the zpak000_assets.pk3 and afterwards the (in 4.1.1 new) zpak001_assets.pk3. Everything you use for mapping is in here. Models, effects, textures, shaders etc. And you dont want to have everything copied for every map. Thus symlinks come into play.