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
47 fteqccdir="$base/fteqcc"
48 mingw=/home/polzer/mingw32
50 # TODO normalize the builds
51 platforms='x86 amd64 osx'
68 rm -f "$fteqccdir"/*.o
69 rm -f "$fteqccdir"/*.bin
70 rsync --exclude "*.o" --exclude "*.d" --exclude "nexuiz-*" --delete-excluded --delete -zvaSHP . "$copystrip" "$fteqccdir" "$host:$path"
71 ssh "$host" ". ~/.profile && cd $path && COPYSTRIP_STRIP=$strip PATH=$path/copystrip:\$PATH make $makeflags clean nexuiz && cd ${fteqccdir##*/} && make $makeflags $fteqccflags"
72 rsync --exclude "*.o" --exclude "*.d" --delete-excluded --delete -zvaSHP "$host:$path/." .
73 for P in -dedicated -sdl -glx -wgl -agl -dedicated.exe -sdl.exe .exe; do
74 [ -f nexuiz$P ] && mv nexuiz$P "$tmpdir/$prefix$P"
75 [ -f nexuiz$P-withdebug ] && mv nexuiz$P-withdebug "$tmpdir/debuginfo/$prefix$P"
79 mv "${fteqccdir##*/}"/fteqcc.exe "$tmpdir/fteqcc/$fteqccname"
82 mv "${fteqccdir##*/}"/fteqcc.bin "$tmpdir/fteqcc/$fteqccname"
90 buildon hagger nexuiz-linux-686 fteqcc-linux-686 /tmp/Darkplaces.build 'CC="gcc -g" DP_MODPLUG_STATIC_LIBDIR=/usr/local/lib'
91 buildon hector nexuiz-linux-x86_64 fteqcc-linux-x86_64 /tmp/Darkplaces.build 'CC="gcc -g" DP_MODPLUG_STATIC_LIBDIR=/home/users4/ommz/polzer/libmodplug-static/lib64'
92 buildon hagger nexuiz-osx fteqcc-osx /tmp/Darkplaces.build 'DP_MAKE_TARGET=macosx CC="i686-apple-darwin8-gcc -g -arch i386 -arch ppc -I/opt/mac/SDKs/MacOSX10.4u.sdk/Library/Frameworks/SDL.framework/Headers"' i686-apple-darwin8-strip
93 mv "$tmpdir/nexuiz-osx-agl" "$tmpdir/Nexuiz.app/Contents/MacOS/nexuiz-osx-agl-bin"
94 mv "$tmpdir/nexuiz-osx-sdl" "$tmpdir/Nexuiz-SDL.app/Contents/MacOS/nexuiz-osx-sdl-bin"
95 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
99 while [ -f "$zipdir/nexuiz$date$i$ext.zip" ]; do
103 i=`echo "$i" | tr a-y b-z`
108 echo "Using build name nexuiz$date$ext"
115 conflicts=`find "$dpdir" "$nexdir" -name '*.orig' -o -name '*.rej' -o -name '*.mine' -o -name '.#*' -o -name '.*~'`
116 if [ -n "$conflicts" ]; then
117 echo "CONFLICTS OR UNNEEDED FILES HAVE BEEN FOUND!"
118 echo "NOT PROCEEDING"
132 quilt push -a # apply all patches
134 cp -r "$osxapps"/*.app "$tmpdir"
135 mkdir "$tmpdir/debuginfo"
136 mkdir "$tmpdir/fteqcc"
138 svn export "$fteqccdir" "$tmpdir/fteqcc/source"
139 svn info "$fteqccdir" > "$tmpdir/fteqcc/source/fteqcc-base-revision.txt"
140 fteqccrev=$((`grep "Last Changed Rev:" "$tmpdir/fteqcc/source/fteqcc-base-revision.txt" | cut -d : -f 2`))
141 echo "fteqcc rev $fteqccrev"
143 rm -f *.exe nexuiz-* *-withdebug* *.o
146 rm -f *.exe nexuiz-* *-withdebug '.#'* *.o
147 rm -rf fteqcc copystrip
151 cp "$nexdir/"nexuiz-*.sh "$tmpdir/"
152 cp "$nexdir/"nexuiz-*.bat "$tmpdir/"
153 cp "$nexdir/gpl.txt" "$tmpdir/"
156 svn export . "$tmpdir/data"
159 svn export . "$tmpdir/pro"
162 svn export . "$tmpdir/Docs"
165 mkdir -p "$tmpdir/sources"
166 #zip -9r ../sources/gamesource$date.zip qcsrc
167 7za a -mx=9 -tzip ../sources/gamesource$date.zip qcsrc
170 svn export . "$tmpdir/darkplaces"
171 svn info > "$tmpdir/darkplaces/nexuiz-base-revision.txt"
172 svn diff > "$tmpdir/darkplaces/nexuiz-engine-changes.diff"
173 svn log > "$tmpdir/darkplaces/ChangeLog"
176 7za a -mx=9 -tzip "$tmpdir/sources/enginesource$date.zip" "darkplaces"
180 zip -9r "$tmpdir/sources/fteqcc-binaries-and-source-rev$fteqccrev.zip" "fteqcc"
187 cd "$tmpdir/data/qcsrc/menu"
188 "$fteqccdir/fteqcc.bin" $fteqccflags
190 cd "$tmpdir/data/qcsrc/server"
191 "$fteqccdir/fteqcc.bin" $fteqccflags
193 rm -rf "$tmpdir/data/qcsrc"
196 perl -pi -e '/^#---SET nexversion=([0-9.]*)$/ and $_ = "#---SET nexversion='$version'\n"' FAQ.aft
197 perl -pi -e '/^\s*Version ([0-9.]*)<\/div>$/ and $_ = "Version '$version'</div>\n"' Readme.htm
198 cp "$dpdir/darkplaces.txt" .
204 mv common-spog.pk3 ..
205 perl -pi -e '/^set g_nexuizversion "?([0-9.]*)[^"]*"?/ and $_ = "set g_nexuizversion '$version'\n"' default.cfg
206 if [ -n "$versiontag" ]; then
207 perl -pi -e '/^set g_nexuizversion/ and $_ = "showbrand 3\n$_"' default.cfg
208 cp "$buildfiles/brand/$versiontag.tga" gfx/brand.tga
211 echo "$defaultcfg" >> default.cfg
212 7za a -mx=7 -tzip ../data.pk3 .
215 perl -pi -e '/^set g_nexuizversion "?([0-9.]*)[^"]*"?/ and $_ = "set g_nexuizversion '$version-pro'\n"' default.cfg
216 if [ -n "$versiontag" ]; then
217 perl -pi -e '/^set g_nexuizversion/ and $_ = "showbrand 3\n$_"' default.cfg
220 echo "$defaultcfg" >> default.cfg
221 7za a -mx=7 -tzip ../pro.pk3 .
226 mv data.pk3 data/data$date.pk3
227 mv common-spog.pk3 data/
230 mv pro.pk3 pro/data${date}pro.pk3
232 cp -r "$mingwdlls"/* .
234 chmod 644 *.dll *.exe
239 find . -name .svn -exec rm -rf {} \; -prune
241 rm -f "$zipdir/nexuiz$date$ext.zip"
242 zip $zipflags -9yr "$zipdir/nexuiz$date$ext.zip" Nexuiz/gpl.txt Nexuiz/nexuiz* Nexuiz/Nexuiz* Nexuiz/*.dll Nexuiz/sources Nexuiz/Docs Nexuiz/data/data$date.pk3 Nexuiz/data/common-spog.pk3 Nexuiz/pro/*
243 ln -snf nexuiz$date$ext.zip "$zipdir/nexuiz-NEWEST.zip"
245 rm -f "$zipdir/nexuizengineonly$date$ext.zip"
246 zip $zipflags -9yr "$zipdir/nexuizengineonly$date$ext.zip" Nexuiz/gpl.txt Nexuiz/nexuiz* Nexuiz/Nexuiz* Nexuiz/*.dll
247 ln -snf nexuizengineonly$date$ext.zip "$zipdir/nexuizengineonly-NEWEST.zip"
249 rm -f "$zipdir/nexuizsource$date$ext.zip"
250 zip $zipflags -9yr "$zipdir/nexuizsource$date$ext.zip" Nexuiz/gpl.txt Nexuiz/sources
251 ln -snf nexuizsource$date$ext.zip "$zipdir/nexuizsource-NEWEST.zip"
253 zipdiff -o "Nexuiz/data/datapatch$date.pk3" -f "$basepk3" -t Nexuiz/data/data$date.pk3
255 if unzip "Nexuiz/data/data$date.pk3" gfx/brand.tga; then
256 zip $zipflags -9r "Nexuiz/data/datapatch$date.pk3" gfx/brand.tga
260 rm -f "$zipdir/nexuizpatch$date$ext.zip"
261 zip $zipflags -9yr "$zipdir/nexuizpatch$date$ext.zip" Nexuiz/gpl.txt Nexuiz/nexuiz* Nexuiz/Nexuiz* Nexuiz/*.dll Nexuiz/sources Nexuiz/Docs Nexuiz/data/datapatch$date.pk3 Nexuiz/pro/*
262 ln -snf nexuizpatch$date$ext.zip "$zipdir/nexuizpatch-NEWEST.zip"
264 rm -f "$zipdir/nexuizdocs$date$ext.zip"
265 zip $zipflags -9yr "$zipdir/nexuizdocs$date$ext.zip" Nexuiz/gpl.txt Nexuiz/Docs
266 ln -snf nexuizdocs$date$ext.zip "$zipdir/nexuizdocs-NEWEST.zip"
268 rm -f "$zipdir/nexuizdebug$date$ext.zip"
269 zip $zipflags -9yr "$zipdir/nexuizdebug$date$ext.zip" Nexuiz/gpl.txt Nexuiz/debuginfo/* Nexuiz/sources
270 ln -snf nexuizdebug$date$ext.zip "$zipdir/nexuizdebug-NEWEST.zip"