16 : ${date:=`date +%Y%m%d`}
18 echo "date stamp: $date"
20 version=2-svntest-$date
22 defaultcfg="cl_nettimesyncmode 6"
24 basepk3=$base/data20060905.pk3
26 dpdir=$base/darkplaces
28 zipdir=/home/polzer/UT/distfiles/nex/
29 buildfiles=$base/buildfiles
30 mingwdlls=$buildfiles/w32
31 osxapps=$buildfiles/osx
32 copystrip=$buildfiles/copystrip
33 fteqcc="fteqcc.bin -O2"
34 mingw=/home/polzer/mingw32
37 osxtemp=/Users/rpolzer/Darkplaces.build
38 osxsave=/tmp/Nexuiz.osx
44 conflicts=`find "$dpdir" "$nexdir" -name '*.orig' -o -name '*.rej' -o -name '*.mine' -o -name '.#*' -o -name '.*~'`
45 if [ -n "$conflicts" ]; then
46 echo "CONFLICTS OR UNNEEDED FILES HAVE BEEN FOUND!"
57 rsync --exclude "*.o" --exclude "*.d" --exclude "nexuiz-*" --delete-excluded --delete -zvaSHP . $copystrip "$osxhost:$osxtemp"
58 ssh "$osxhost" ". ~/.profile && cd $osxtemp && PATH=$osxtemp/copystrip:\$PATH make CC=\"gcc -g -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk\" clean $*"
59 rmdir "$osxsave" || true
60 if [ -d "$osxsave" ]; then
63 rsync --exclude "*.o" --exclude "*.d" --delete-excluded --delete -zvaSHP "$osxhost:$osxtemp/." .
65 cp nexuiz-* "$osxsave"/
70 PATH=$copystrip:$PATH make CC="/opt/gcc-4.1.1/bin/gcc -g" "$@"
75 PATH=$copystrip:$PATH make CC="/opt/gcc-4.1.1/bin/gcc -g -I$ia32/usr/include -I$ia32/usr/X11R6/include -L$ia32/usr/lib -L$ia32/usr/X11R6/lib -m32" DP_MACHINE=i686 "$@"
80 PATH=$copystrip:$mingw/bin:$PATH make CC="gcc -g" DP_MAKE_TARGET=mingw "$@"
89 cp -r "$osxapps"/*.app "$tmpdir"
90 mkdir "$tmpdir/debuginfo"
91 rm -f *.exe nexuiz-* *-withdebug
94 buildosx sdl-nexuiz cl-nexuiz sv-nexuiz
95 cp nexuiz-agl "$tmpdir/Nexuiz.app/Contents/MacOS/nexuiz-osx-ppc-agl-bin"
96 cp nexuiz-dedicated "$tmpdir/nexuiz-osx-ppc-dedicated"
97 cp nexuiz-sdl "$tmpdir/Nexuiz-SDL.app/Contents/MacOS/nexuiz-osx-ppc-sdl-bin"
98 cp nexuiz-agl-withdebug "$tmpdir/debuginfo/nexuiz-osx-ppc-agl-bin"
99 cp nexuiz-dedicated-withdebug "$tmpdir/debuginfo/nexuiz-osx-ppc-dedicated-bin"
100 cp nexuiz-sdl-withdebug "$tmpdir/debuginfo/nexuiz-osx-ppc-sdl-bin"
104 for x in -dedicated -sdl ''; do
105 cp nexuiz$x.exe "$tmpdir/nexuiz$x.exe"
106 cp nexuiz$x.exe-withdebug "$tmpdir/debuginfo/nexuiz$x.exe"
111 for x in dedicated sdl glx; do
112 cp nexuiz-$x "$tmpdir/nexuiz-linux-686-$x"
113 cp nexuiz-$x-withdebug "$tmpdir/debuginfo/nexuiz-linux-686-$x"
118 for x in dedicated sdl glx; do
119 cp nexuiz-$x "$tmpdir/nexuiz-linux-x86_64-$x"
120 cp nexuiz-$x-withdebug "$tmpdir/debuginfo/nexuiz-linux-x86_64-$x"
123 cp "$nexdir/"nexuiz-*.{sh,bat} "$tmpdir/"
124 cp "$nexdir/gpl.txt" "$tmpdir/"
127 rm -f *.exe nexuiz-* *-withdebug '.#'*
130 svn export . "$tmpdir/data"
133 svn export . "$tmpdir/Docs"
136 mkdir -p "$tmpdir/sources"
137 #zip -9r ../sources/gamesource$date.zip qcsrc
138 7za a -mx=9 -tzip ../sources/gamesource$date.zip qcsrc
141 svn export . "$tmpdir/darkplaces"
142 svn info > "$tmpdir/darkplaces/nexuiz-base-revision.txt"
143 svn diff > "$tmpdir/darkplaces/nexuiz-engine-changes.diff"
144 svn log > "$tmpdir/darkplaces/ChangeLog"
147 7za a -mx=9 -tzip "$tmpdir/sources/enginesource$date.zip" "darkplaces"
150 cd "$tmpdir/data/qcsrc/menu"
153 cd "$tmpdir/data/qcsrc/server"
156 rm -rf "$tmpdir/data/qcsrc"
159 perl -pi -e '/^#---SET nexversion=([0-9.]*)$/ and $_ = "#---SET nexversion='$version'\n"' FAQ.aft
160 perl -pi -e '/^\s*Version ([0-9.]*)<\/div>$/ and $_ = "Version '$version'</div>\n"' Readme.htm
166 mv common-spog.pk3 ..
167 perl -pi -e '/^set g_nexuizversion "([0-9.]*)[^"]*"/ and $_ = "set g_nexuizversion \"'$version'\"\n"' default.cfg
168 if [ -n "$versiontag" ]; then
169 perl -pi -e '/^set g_nexuizversion/ and $_ = "showbrand 7\n$_"' default.cfg
170 cp "$buildfiles/brand/$versiontag.tga" gfx/brand.tga
173 echo "$defaultcfg" >> default.cfg
174 7za a -mx=7 -tzip ../data.pk3 .
179 mv data.pk3 data/data$date.pk3
180 mv common-spog.pk3 data/
182 cp -r "$mingwdlls"/* .
184 chmod 644 *.dll *.exe
189 find . -name .svn -exec rm -rf {} \; -prune
191 rm -f "$zipdir/nexuiz$date$ext.zip"
192 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
193 rm -f "$zipdir/nexuizengineonly$date$ext.zip"
194 zip $zipflags -9yr "$zipdir/nexuizengineonly$date$ext.zip" Nexuiz/gpl.txt Nexuiz/nexuiz* Nexuiz/Nexuiz* Nexuiz/*.dll
195 rm -f "$zipdir/nexuizsource$date$ext.zip"
196 zip $zipflags -9yr "$zipdir/nexuizsource$date$ext.zip" Nexuiz/gpl.txt Nexuiz/sources
198 zipdiff -o "Nexuiz/data/datapatch$date.pk3" -f "$basepk3" -t Nexuiz/data/data$date.pk3
200 if unzip "Nexuiz/data/data$date.pk3" gfx/brand.tga; then
201 zip $zipflags -9r "Nexuiz/data/datapatch$date.pk3" gfx/brand.tga
205 rm -f "$zipdir/nexuizpatch$date$ext.zip"
206 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
208 rm -f "$zipdir/nexuizdebug$date$ext.zip"
209 zip $zipflags -9yr "$zipdir/nexuizdebug$date$ext.zip" Nexuiz/gpl.txt Nexuiz/debuginfo/*