17 : ${date:=`date +%Y%m%d`}
19 echo "date stamp: $date"
23 version=2-svntest-$date
30 versiontag=$versiontag
36 basepk3=$base/data20070531.pk3
37 nexdir=$base/nexuiz-2.0
38 nexprodir=$base/nexuiz-current/pro
39 dpdir=$base/darkplaces
41 zipdir=/home/polzer/public_html/nexuiz/builds
42 buildfiles=$base/nexuiz-current/misc/buildfiles
43 mingwdlls=$buildfiles/w32
44 osxapps=$buildfiles/osx
45 copystrip=$buildfiles/copystrip
46 zipdiff=$base/nexuiz-current/misc/zipdiff
47 fteqccdir="$base/fteqcc"
49 mingw=/home/polzer/mingw32
54 #if [ -n "$EXPERIMENTAL" ]; then
55 # basepk3=$base/data20071231.pk3 # newer build to make smaller patches
56 nexdir=$base/nexuiz-current
59 # TODO normalize the builds
60 platforms='x86 amd64 osx'
77 rm -f "$fteqccdir"/*.o
78 rm -f "$fteqccdir"/*.bin
79 rsync --exclude "*.o" --exclude "*.d" --exclude "nexuiz-*" --delete-excluded --delete -zvaSHP . "$copystrip" "$fteqccdir" "$host:$path"
80 ssh "$host" ". ~/.profile && cd $path && COPYSTRIP_STRIP=$strip PATH=$path/copystrip:\$PATH make $makeflags clean nexuiz && cd ${fteqccdir##*/} && make $makeflags $fteqcc_cflags"
81 rsync --exclude "*.o" --exclude "*.d" --delete-excluded --delete -zvaSHP "$host:$path/." .
82 for P in -dedicated -sdl -glx -wgl -agl -dedicated.exe -sdl.exe .exe; do
83 [ -f nexuiz$P ] && mv nexuiz$P "$tmpdir/$prefix$P"
84 [ -f nexuiz$P-withdebug ] && mv nexuiz$P-withdebug "$tmpdir/debuginfo/$prefix$P"
88 mv "${fteqccdir##*/}"/fteqcc.exe "$tmpdir/fteqcc/$fteqccname"
91 mv "${fteqccdir##*/}"/fteqcc.bin "$tmpdir/fteqcc/$fteqccname"
99 buildon macmini nexuiz-osx fteqcc-osx /tmp/Darkplaces.build 'CC="gcc -g -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -I/Library/Frameworks/SDL.framework/Headers"' strip
100 mv "$tmpdir/nexuiz-osx-agl" "$tmpdir/Nexuiz.app/Contents/MacOS/nexuiz-osx-agl-bin"
101 mv "$tmpdir/nexuiz-osx-sdl" "$tmpdir/Nexuiz-SDL.app/Contents/MacOS/nexuiz-osx-sdl-bin"
102 buildon hagger nexuiz-linux-686 fteqcc-linux-686 /tmp/Darkplaces.build 'CC="gcc -g" DP_MODPLUG_STATIC_LIBDIR=/usr/local/lib'
103 buildon hector nexuiz-linux-x86_64 fteqcc-linux-x86_64 /tmp/Darkplaces.build 'CC="gcc -g -Wl,--hash-style=sysv" DP_MODPLUG_STATIC_LIBDIR=/home/users4/ommz/polzer/libmodplug-static/lib64'
104 buildon hagger nexuiz fteqcc.exe /tmp/Darkplaces.build 'DP_MAKE_TARGET=mingw CC="i586-mingw32msvc-gcc -g -I/home/polzer/mingw32.include" WINDRES=i586-mingw32msvc-windres SDL_CONFIG=/home/polzer/mingw32.SDL/bin/sdl-config' i586-mingw32msvc-strip
108 while [ -f "$zipdir/nexuiz$date$i$ext.zip" ]; do
112 i=`echo "$i" | tr a-y b-z`
117 echo "Using build name nexuiz$date$ext"
124 conflicts=`find "$dpdir" "$nexdir" -name '*.orig' -o -name '*.rej' -o -name '*.mine' -o -name '.#*' -o -name '.*~'`
125 if [ -n "$conflicts" ]; then
126 echo "CONFLICTS OR UNNEEDED FILES HAVE BEEN FOUND!"
127 echo "NOT PROCEEDING"
141 quilt push -a # apply all patches
143 cp -r "$osxapps"/*.app "$tmpdir"
144 mkdir "$tmpdir/debuginfo"
145 mkdir "$tmpdir/fteqcc"
147 svn export "$fteqccdir" "$tmpdir/fteqcc/source"
148 svn info "$fteqccdir" > "$tmpdir/fteqcc/source/fteqcc-base-revision.txt"
149 fteqccrev=$((`grep "Last Changed Rev:" "$tmpdir/fteqcc/source/fteqcc-base-revision.txt" | cut -d : -f 2`))
150 echo "fteqcc rev $fteqccrev"
152 rm -f *.exe nexuiz-* *-withdebug* *.o
155 rm -f *.exe nexuiz-* *-withdebug '.#'* *.o
156 rm -rf fteqcc copystrip
160 cp "$nexdir/"nexuiz-*.sh "$tmpdir/"
161 cp "$nexdir/"nexuiz-*.bat "$tmpdir/"
162 cp "$nexdir/gpl.txt" "$tmpdir/"
165 svn export . "$tmpdir/data"
168 svn export . "$tmpdir/pro"
171 svn export . "$tmpdir/Docs"
174 mkdir -p "$tmpdir/sources"
175 #zip -9r ../sources/gamesource$date.zip qcsrc
176 7za a -mx=9 -tzip ../sources/gamesource$date.zip qcsrc
179 svn export . "$tmpdir/darkplaces"
180 svn info > "$tmpdir/darkplaces/nexuiz-base-revision.txt"
181 svn diff > "$tmpdir/darkplaces/nexuiz-engine-changes.diff"
182 svn log > "$tmpdir/darkplaces/ChangeLog"
185 7za a -mx=9 -tzip "$tmpdir/sources/enginesource$date.zip" "darkplaces"
189 zip -9r "$tmpdir/sources/fteqcc-binaries-and-source-rev$fteqccrev.zip" "fteqcc"
196 cd "$tmpdir/data/qcsrc/$menuqc"
197 "$fteqccdir/fteqcc.bin" $fteqccflags
199 cd "$tmpdir/data/qcsrc/server"
200 "$fteqccdir/fteqcc.bin" $fteqccflags
202 rm -rf "$tmpdir/data/qcsrc"
205 perl -pi -e '/^#---SET nexversion=([0-9.]*)$/ and $_ = "#---SET nexversion='$version'\n"' FAQ.aft
206 perl -pi -e '/^\s*Version ([0-9.]*)<\/div>$/ and $_ = "Version '$version'</div>\n"' Readme.htm
207 cp "$dpdir/darkplaces.txt" .
213 mv common-spog.pk3 ..
214 perl -pi -e '/^set g_nexuizversion "?([0-9.]*)[^"]*"?/ and $_ = "set g_nexuizversion '$version'\n"' default.cfg
215 if [ -n "$versiontag" ]; then
216 perl -pi -e '/^set g_nexuizversion/ and $_ = "showbrand 3\n$_"' default.cfg
217 cp "$buildfiles/brand/$versiontag.tga" gfx/brand.tga
220 echo "$defaultcfg" >> default.cfg
221 7za a -mx=7 -tzip ../data.pk3 .
224 perl -pi -e '/^set g_nexuizversion "?([0-9.]*)[^"]*"?/ and $_ = "set g_nexuizversion '$version-pro'\n"' default.cfg
225 if [ -n "$versiontag" ]; then
226 perl -pi -e '/^set g_nexuizversion/ and $_ = "showbrand 3\n$_"' default.cfg
229 echo "$defaultcfg" >> default.cfg
230 7za a -mx=7 -tzip ../pro.pk3 .
235 mv data.pk3 data/data$tag$date.pk3
236 mv common-spog.pk3 data/
239 mv pro.pk3 pro/data$tag${date}pro.pk3
241 cp -r "$mingwdlls"/* .
243 chmod 644 *.dll *.exe
248 find . -name .svn -exec rm -rf {} \; -prune
250 rm -f "$zipdir/nexuiz$date$ext.zip"
251 zip $zipflags -9yr "$zipdir/nexuiz$date$ext.zip" Nexuiz/gpl.txt Nexuiz/nexuiz* Nexuiz/Nexuiz* Nexuiz/*.dll Nexuiz/sources Nexuiz/Docs Nexuiz/data/data$tag$date.pk3 Nexuiz/data/common-spog.pk3 Nexuiz/pro/*
252 ln -snf nexuiz$date$ext.zip "$zipdir/nexuiz-$newest.zip"
254 rm -f "$zipdir/nexuizengineonly$date$ext.zip"
255 zip $zipflags -9yr "$zipdir/nexuizengineonly$date$ext.zip" Nexuiz/gpl.txt Nexuiz/nexuiz* Nexuiz/Nexuiz* Nexuiz/*.dll
256 ln -snf nexuizengineonly$date$ext.zip "$zipdir/nexuizengineonly-$newest.zip"
258 rm -f "$zipdir/nexuizsource$date$ext.zip"
259 zip $zipflags -9yr "$zipdir/nexuizsource$date$ext.zip" Nexuiz/gpl.txt Nexuiz/sources
260 ln -snf nexuizsource$date$ext.zip "$zipdir/nexuizsource-$newest.zip"
262 $zipdiff -o "Nexuiz/data/datapatch$tag$date.pk3" -f "$basepk3" -t Nexuiz/data/data$tag$date.pk3 -x 'sound/cdtracks/track*.ogg'
264 if unzip "Nexuiz/data/data$tag$date.pk3" gfx/brand.tga; then
265 zip $zipflags -9r "Nexuiz/data/datapatch$tag$date.pk3" gfx/brand.tga
269 rm -f "$zipdir/nexuizpatch$date$ext.zip"
270 zip $zipflags -9yr "$zipdir/nexuizpatch$date$ext.zip" Nexuiz/gpl.txt Nexuiz/nexuiz* Nexuiz/Nexuiz* Nexuiz/*.dll Nexuiz/sources Nexuiz/Docs Nexuiz/data/datapatch$tag$date.pk3 Nexuiz/pro/*
271 ln -snf nexuizpatch$date$ext.zip "$zipdir/nexuizpatch-$newest.zip"
273 rm -f "$zipdir/nexuizdocs$date$ext.zip"
274 zip $zipflags -9yr "$zipdir/nexuizdocs$date$ext.zip" Nexuiz/gpl.txt Nexuiz/Docs
275 ln -snf nexuizdocs$date$ext.zip "$zipdir/nexuizdocs-$newest.zip"
277 rm -f "$zipdir/nexuizdebug$date$ext.zip"
278 zip $zipflags -9yr "$zipdir/nexuizdebug$date$ext.zip" Nexuiz/gpl.txt Nexuiz/debuginfo/* Nexuiz/sources
279 ln -snf nexuizdebug$date$ext.zip "$zipdir/nexuizdebug-$newest.zip"