17 : ${date:=`date +%Y%m%d`}
19 echo "date stamp: $date"
23 version=2-svntest-$date
30 versiontag=$versiontag
36 basepk3=$base/data20070531.pk3
38 nexprodir=$base/nexuiz/pro
39 dpdir=$base/darkplaces
42 buildfiles=$base/nexuiz/misc/buildfiles
43 mingwdlls=$buildfiles/w32
44 osxapps=$buildfiles/osx
45 copystrip=$buildfiles/copystrip
46 zipdiff=$base/nexuiz/misc/zipdiff
47 fteqccdir="$base/fteqcc"
53 #if [ -n "$EXPERIMENTAL" ]; then
54 # basepk3=$base/data20071231.pk3 # newer build to make smaller patches
58 # TODO normalize the builds
59 platforms='x86 amd64 osx'
76 rm -f "$fteqccdir"/*.o
77 rm -f "$fteqccdir"/*.bin
78 rsync --exclude "*.o" --exclude "*.d" --exclude "nexuiz-*" --delete-excluded --delete -zvaSHP . "$copystrip" "$fteqccdir" "$host:$path"
79 ssh "$host" ". ~/.profile && cd $path && COPYSTRIP_STRIP=$strip PATH=$path/copystrip:\$PATH make $makeflags clean nexuiz && cd ${fteqccdir##*/} && make $makeflags $fteqcc_cflags"
80 rsync --exclude "*.o" --exclude "*.d" --delete-excluded --delete -zvaSHP "$host:$path/." .
81 for P in -dedicated -sdl -glx -wgl -agl -dedicated.exe -sdl.exe .exe; do
82 [ -f nexuiz$P ] && mv nexuiz$P "$tmpdir/$prefix$P"
83 [ -f nexuiz$P-withdebug ] && mv nexuiz$P-withdebug "$tmpdir/debuginfo/$prefix$P"
87 mv "${fteqccdir##*/}"/fteqcc.exe "$tmpdir/fteqcc/$fteqccname"
90 mv "${fteqccdir##*/}"/fteqcc.bin "$tmpdir/fteqcc/$fteqccname"
98 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
99 mv "$tmpdir/nexuiz-osx-agl" "$tmpdir/Nexuiz.app/Contents/MacOS/nexuiz-osx-agl-bin"
100 mv "$tmpdir/nexuiz-osx-sdl" "$tmpdir/Nexuiz-SDL.app/Contents/MacOS/nexuiz-osx-sdl-bin"
101 buildon blubpc.homelinux.org nexuiz fteqcc.exe /tmp/Darkplaces.build 'DP_MAKE_TARGET=mingw CC="i486-mingw32-gcc -g" WINDRES=i486-mingw32-windres SDL_CONFIG=/usr/i486-mingw32/bin/sdl-config' i486-mingw32-strip
102 buildon rear nexuiz-linux-686 fteqcc-linux-686 /tmp/Darkplaces.build 'CC="gcc -g" DP_MODPLUG_STATIC_LIBDIR=/usr/lib'
103 buildon blubpc.homelinux.org nexuiz-linux-x86_64 fteqcc-linux-x86_64 /tmp/Darkplaces.build 'CC="gcc -g -Wl,--hash-style=sysv" DP_MODPLUG_STATIC_LIBDIR=/usr/lib'
107 while [ -f "$zipdir/nexuiz$date$i$ext.zip" ]; do
111 i=`echo "$i" | tr a-y b-z`
116 echo "Using build name nexuiz$date$ext"
123 conflicts=`find "$dpdir" "$nexdir" -name '*.orig' -o -name '*.rej' -o -name '*.mine' -o -name '.#*' -o -name '.*~'`
124 if [ -n "$conflicts" ]; then
125 echo "CONFLICTS OR UNNEEDED FILES HAVE BEEN FOUND!"
126 echo "NOT PROCEEDING"
140 quilt push -a # apply all patches
142 cp -r "$osxapps"/*.app "$tmpdir"
143 mkdir "$tmpdir/debuginfo"
144 mkdir "$tmpdir/fteqcc"
146 svn export "$fteqccdir" "$tmpdir/fteqcc/source"
147 svn info "$fteqccdir" > "$tmpdir/fteqcc/source/fteqcc-base-revision.txt"
148 fteqccrev=$((`grep "Last Changed Rev:" "$tmpdir/fteqcc/source/fteqcc-base-revision.txt" | cut -d : -f 2`))
149 echo "fteqcc rev $fteqccrev"
151 rm -f *.exe nexuiz-* *-withdebug* *.o
154 rm -f *.exe nexuiz-* *-withdebug '.#'* *.o
155 rm -rf fteqcc copystrip
159 cp "$nexdir/"nexuiz-*.sh "$tmpdir/"
160 cp "$nexdir/gpl.txt" "$tmpdir/"
163 svn export . "$tmpdir/data"
166 svn export . "$tmpdir/pro"
169 svn export . "$tmpdir/Docs"
172 mkdir -p "$tmpdir/sources"
173 #zip -9r ../sources/gamesource$date.zip qcsrc
174 7za a -mx=9 -tzip ../sources/gamesource$date.zip qcsrc
177 svn export . "$tmpdir/darkplaces"
178 svn info > "$tmpdir/darkplaces/nexuiz-base-revision.txt"
179 svn diff > "$tmpdir/darkplaces/nexuiz-engine-changes.diff"
180 svn log > "$tmpdir/darkplaces/ChangeLog"
183 7za a -mx=9 -tzip "$tmpdir/sources/enginesource$date.zip" "darkplaces"
187 zip -9r "$tmpdir/sources/fteqcc-binaries-and-source-rev$fteqccrev.zip" "fteqcc"
194 cd "$tmpdir/data/qcsrc/$menuqc"
195 "$fteqccdir/fteqcc.bin" $fteqccflags
197 cd "$tmpdir/data/qcsrc/server"
198 "$fteqccdir/fteqcc.bin" $fteqccflags
200 rm -rf "$tmpdir/data/qcsrc"
203 perl -pi -e '/^#---SET nexversion=([0-9.]*)$/ and $_ = "#---SET nexversion='$version'\n"' FAQ.aft
204 perl -pi -e '/^\s*Version ([0-9.]*)<\/div>$/ and $_ = "Version '$version'</div>\n"' Readme.htm
205 cp "$dpdir/darkplaces.txt" .
211 mv common-spog.pk3 ..
212 perl -pi -e '/^set g_nexuizversion "?([0-9.]*)[^"]*"?/ and $_ = "set g_nexuizversion '$version'\n"' default.cfg
213 if [ -n "$versiontag" ]; then
214 perl -pi -e '/^set g_nexuizversion/ and $_ = "showbrand 3\n$_"' default.cfg
215 cp "$buildfiles/brand/$versiontag.tga" gfx/brand.tga
218 echo "$defaultcfg" >> default.cfg
219 7za a -mx=7 -tzip ../data.pk3 .
222 perl -pi -e '/^set g_nexuizversion "?([0-9.]*)[^"]*"?/ and $_ = "set g_nexuizversion '$version-pro'\n"' default.cfg
223 if [ -n "$versiontag" ]; then
224 perl -pi -e '/^set g_nexuizversion/ and $_ = "showbrand 3\n$_"' default.cfg
227 echo "$defaultcfg" >> default.cfg
228 7za a -mx=7 -tzip ../pro.pk3 .
233 mv data.pk3 data/data$tag$date.pk3
234 mv common-spog.pk3 data/
237 mv pro.pk3 pro/data$tag${date}pro.pk3
239 cp -r "$mingwdlls"/* .
241 chmod 644 *.dll *.exe
246 find . -name .svn -exec rm -rf {} \; -prune
248 rm -f "$zipdir/nexuiz$date$ext.zip"
249 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/*
250 ln -snf nexuiz$date$ext.zip "$zipdir/nexuiz-$newest.zip"
252 rm -f "$zipdir/nexuizengineonly$date$ext.zip"
253 zip $zipflags -9yr "$zipdir/nexuizengineonly$date$ext.zip" Nexuiz/gpl.txt Nexuiz/nexuiz* Nexuiz/Nexuiz* Nexuiz/*.dll
254 ln -snf nexuizengineonly$date$ext.zip "$zipdir/nexuizengineonly-$newest.zip"
256 rm -f "$zipdir/nexuizsource$date$ext.zip"
257 zip $zipflags -9yr "$zipdir/nexuizsource$date$ext.zip" Nexuiz/gpl.txt Nexuiz/sources
258 ln -snf nexuizsource$date$ext.zip "$zipdir/nexuizsource-$newest.zip"
260 $zipdiff -o "Nexuiz/data/datapatch$tag$date.pk3" -f "$basepk3" -t Nexuiz/data/data$tag$date.pk3 -x 'sound/cdtracks/track*.ogg'
262 if unzip "Nexuiz/data/data$tag$date.pk3" gfx/brand.tga; then
263 zip $zipflags -9r "Nexuiz/data/datapatch$tag$date.pk3" gfx/brand.tga
267 rm -f "$zipdir/nexuizpatch$date$ext.zip"
268 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/*
269 ln -snf nexuizpatch$date$ext.zip "$zipdir/nexuizpatch-$newest.zip"
271 rm -f "$zipdir/nexuizdocs$date$ext.zip"
272 zip $zipflags -9yr "$zipdir/nexuizdocs$date$ext.zip" Nexuiz/gpl.txt Nexuiz/Docs
273 ln -snf nexuizdocs$date$ext.zip "$zipdir/nexuizdocs-$newest.zip"
275 rm -f "$zipdir/nexuizdebug$date$ext.zip"
276 zip $zipflags -9yr "$zipdir/nexuizdebug$date$ext.zip" Nexuiz/gpl.txt Nexuiz/debuginfo/* Nexuiz/sources
277 ln -snf nexuizdebug$date$ext.zip "$zipdir/nexuizdebug-$newest.zip"