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'
60 rm -f "$fteqccdir"/*.o
61 rm -f "$fteqccdir"/*.bin
62 rsync --exclude "*.o" --exclude "*.d" --exclude "nexuiz-*" --delete-excluded --delete -zvaSHP . "$copystrip" "$fteqccdir" "$host:$path"
63 ssh "$host" ". ~/.profile && cd $path && COPYSTRIP_STRIP=$strip PATH=$path/copystrip:\$PATH make $makeflags clean nexuiz && cd ${fteqccdir##*/} && make $makeflags BASE_CFLAGS=-DQCCONLY"
64 rsync --exclude "*.o" --exclude "*.d" --delete-excluded --delete -zvaSHP "$host:$path/." .
65 for P in -dedicated -sdl -glx -wgl -agl -dedicated.exe -sdl.exe .exe; do
66 [ -f nexuiz$P ] && mv nexuiz$P "$tmpdir/$prefix$P"
67 [ -f nexuiz$P-withdebug ] && mv nexuiz$P-withdebug "$tmpdir/debuginfo/$prefix$P"
69 mv "${fteqccdir##*/}"/fteqcc.bin "$tmpdir/fteqcc/$fteqccname"
75 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
76 mv "$tmpdir/nexuiz-osx-agl" "$tmpdir/Nexuiz.app/Contents/MacOS/nexuiz-osx-agl-bin"
77 mv "$tmpdir/nexuiz-osx-sdl" "$tmpdir/Nexuiz-SDL.app/Contents/MacOS/nexuiz-osx-sdl-bin"
78 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
79 buildon hagger nexuiz-linux-686 fteqcc-linux-686 /tmp/Darkplaces.build 'CC="gcc -g"'
80 buildon hector nexuiz-linux-x86_64 fteqcc-linux-x86_64 /tmp/Darkplaces.build 'CC="gcc -g"'
84 while [ -f "$zipdir/nexuiz$date$i$ext.zip" ]; do
88 i=`echo "$i" | tr a-y b-z`
93 echo "Using build name nexuiz$date$ext"
100 conflicts=`find "$dpdir" "$nexdir" -name '*.orig' -o -name '*.rej' -o -name '*.mine' -o -name '.#*' -o -name '.*~'`
101 if [ -n "$conflicts" ]; then
102 echo "CONFLICTS OR UNNEEDED FILES HAVE BEEN FOUND!"
103 echo "NOT PROCEEDING"
117 quilt push -a # apply all patches
119 cp -r "$osxapps"/*.app "$tmpdir"
120 mkdir "$tmpdir/debuginfo"
121 mkdir "$tmpdir/fteqcc"
123 svn export "$fteqccdir" "$tmpdir/fteqcc/source"
124 svn info "$fteqccdir" > "$tmpdir/fteqcc/source/fteqcc-base-revision.txt"
125 fteqccrev=$((`grep "Last Changed Rev:" "$tmpdir/fteqcc/source/fteqcc-base-revision.txt" | cut -d : -f 2`))
126 echo "fteqcc rev $fteqccrev"
128 rm -f *.exe nexuiz-* *-withdebug* *.o
131 rm -f *.exe nexuiz-* *-withdebug '.#'* *.o
132 rm -rf fteqcc copystrip
136 cp "$nexdir/"nexuiz-*.sh "$tmpdir/"
137 cp "$nexdir/"nexuiz-*.bat "$tmpdir/"
138 cp "$nexdir/gpl.txt" "$tmpdir/"
141 svn export . "$tmpdir/data"
144 svn export . "$tmpdir/pro"
147 svn export . "$tmpdir/Docs"
150 mkdir -p "$tmpdir/sources"
151 #zip -9r ../sources/gamesource$date.zip qcsrc
152 7za a -mx=9 -tzip ../sources/gamesource$date.zip qcsrc
155 svn export . "$tmpdir/darkplaces"
156 svn info > "$tmpdir/darkplaces/nexuiz-base-revision.txt"
157 svn diff > "$tmpdir/darkplaces/nexuiz-engine-changes.diff"
158 svn log > "$tmpdir/darkplaces/ChangeLog"
161 7za a -mx=9 -tzip "$tmpdir/sources/enginesource$date.zip" "darkplaces"
165 zip -9r "$tmpdir/sources/fteqcc-binaries-and-source-rev$fteqccrev.zip" "fteqcc"
172 cd "$tmpdir/data/qcsrc/menu"
173 "$fteqccdir/fteqcc.bin" $fteqccflags
175 cd "$tmpdir/data/qcsrc/server"
176 "$fteqccdir/fteqcc.bin" $fteqccflags
178 rm -rf "$tmpdir/data/qcsrc"
181 perl -pi -e '/^#---SET nexversion=([0-9.]*)$/ and $_ = "#---SET nexversion='$version'\n"' FAQ.aft
182 perl -pi -e '/^\s*Version ([0-9.]*)<\/div>$/ and $_ = "Version '$version'</div>\n"' Readme.htm
183 cp "$dpdir/darkplaces.txt" .
189 mv common-spog.pk3 ..
190 perl -pi -e '/^set g_nexuizversion "?([0-9.]*)[^"]*"?/ and $_ = "set g_nexuizversion '$version'\n"' default.cfg
191 if [ -n "$versiontag" ]; then
192 perl -pi -e '/^set g_nexuizversion/ and $_ = "showbrand 3\n$_"' default.cfg
193 cp "$buildfiles/brand/$versiontag.tga" gfx/brand.tga
196 echo "$defaultcfg" >> default.cfg
197 7za a -mx=7 -tzip ../data.pk3 .
200 perl -pi -e '/^set g_nexuizversion "?([0-9.]*)[^"]*"?/ and $_ = "set g_nexuizversion '$version-pro'\n"' default.cfg
201 if [ -n "$versiontag" ]; then
202 perl -pi -e '/^set g_nexuizversion/ and $_ = "showbrand 3\n$_"' default.cfg
205 echo "$defaultcfg" >> default.cfg
206 7za a -mx=7 -tzip ../pro.pk3 .
211 mv data.pk3 data/data$date.pk3
212 mv common-spog.pk3 data/
215 mv pro.pk3 pro/data${date}pro.pk3
217 cp -r "$mingwdlls"/* .
219 chmod 644 *.dll *.exe
224 find . -name .svn -exec rm -rf {} \; -prune
226 rm -f "$zipdir/nexuiz$date$ext.zip"
227 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/*
228 ln -snf nexuiz$date$ext.zip "$zipdir/nexuizNEWEST.zip"
230 rm -f "$zipdir/nexuizengineonly$date$ext.zip"
231 zip $zipflags -9yr "$zipdir/nexuizengineonly$date$ext.zip" Nexuiz/gpl.txt Nexuiz/nexuiz* Nexuiz/Nexuiz* Nexuiz/*.dll
232 ln -snf nexuizengineonly$date$ext.zip "$zipdir/nexuizengineonlyNEWEST.zip"
234 rm -f "$zipdir/nexuizsource$date$ext.zip"
235 zip $zipflags -9yr "$zipdir/nexuizsource$date$ext.zip" Nexuiz/gpl.txt Nexuiz/sources
236 ln -snf nexuizsource$date$ext.zip "$zipdir/nexuizsourceNEWEST.zip"
238 zipdiff -o "Nexuiz/data/datapatch$date.pk3" -f "$basepk3" -t Nexuiz/data/data$date.pk3
240 if unzip "Nexuiz/data/data$date.pk3" gfx/brand.tga; then
241 zip $zipflags -9r "Nexuiz/data/datapatch$date.pk3" gfx/brand.tga
245 rm -f "$zipdir/nexuizpatch$date$ext.zip"
246 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/*
247 ln -snf nexuizpatch$date$ext.zip "$zipdir/nexuizpatchNEWEST.zip"
249 rm -f "$zipdir/nexuizdocs$date$ext.zip"
250 zip $zipflags -9yr "$zipdir/nexuizdocs$date$ext.zip" Nexuiz/gpl.txt Nexuiz/Docs
251 ln -snf nexuizdocs$date$ext.zip "$zipdir/nexuizdocsNEWEST.zip"
253 rm -f "$zipdir/nexuizdebug$date$ext.zip"
254 zip $zipflags -9yr "$zipdir/nexuizdebug$date$ext.zip" Nexuiz/gpl.txt Nexuiz/debuginfo/* Nexuiz/sources
255 ln -snf nexuizdebug$date$ext.zip "$zipdir/nexuizdebugNEWEST.zip"