20 version='$1'$versiontag
21 versiontag=$versiontag
25 basepk3=$base/data20060905.pk3
27 dpdir=$base/darkplaces
29 zipdir=/home/polzer/UT/distfiles/nex/
30 buildfiles=$base/buildfiles
31 mingwdlls=$buildfiles/w32
32 osxapps=$buildfiles/osx
33 copystrip=$buildfiles/copystrip
34 fteqcc="fteqcc.bin -O2"
35 mingw=/home/polzer/mingw32
38 osxtemp=/Users/rpolzer/Darkplaces.build
39 osxsave=/tmp/Nexuiz.osx
45 : ${date:=`date +%Y%m%d`}
47 echo "date stamp: $date"
51 rsync --exclude "*.o" --exclude "*.d" --exclude "nexuiz-*" --delete-excluded --delete -zvaSHP . $copystrip "$osxhost:$osxtemp"
52 ssh "$osxhost" ". ~/.profile && cd $osxtemp && PATH=$osxtemp/copystrip:\$PATH make CC=\"gcc -g -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk\" clean $*"
53 if [ -d "$osxsave" ]; then
56 rsync --exclude "*.o" --exclude "*.d" --delete-excluded --delete -zvaSHP "$osxhost:$osxtemp/." .
58 cp nexuiz-* "$osxsave"/
63 PATH=$copystrip:$PATH make CC="gcc -g" "$@"
68 PATH=$copystrip:$PATH make CC="gcc -g -I$ia32/usr/include -I$ia32/usr/X11R6/include -L$ia32/usr/lib -L$ia32/usr/X11R6/lib -m32" DP_MACHINE=i686 "$@"
73 PATH=$copystrip:$mingw/bin:$PATH make CC="gcc -g" DP_MAKE_TARGET=mingw "$@"
80 cp -r "$osxapps"/*.app "$tmpdir"
81 mkdir "$tmpdir/debuginfo"
82 rm -f *.exe nexuiz-* *-withdebug
85 buildosx sdl-nexuiz cl-nexuiz sv-nexuiz
86 cp nexuiz-agl "$tmpdir/Nexuiz.app/Contents/MacOS/nexuiz-osx-ppc-agl-bin"
87 cp nexuiz-dedicated "$tmpdir/nexuiz-osx-ppc-dedicated"
88 cp nexuiz-sdl "$tmpdir/Nexuiz-SDL.app/Contents/MacOS/nexuiz-osx-ppc-sdl-bin"
89 cp nexuiz-agl-withdebug "$tmpdir/debuginfo/nexuiz-osx-ppc-agl-bin"
90 cp nexuiz-dedicated-withdebug "$tmpdir/debuginfo/nexuiz-osx-ppc-dedicated-bin"
91 cp nexuiz-sdl-withdebug "$tmpdir/debuginfo/nexuiz-osx-ppc-sdl-bin"
95 for x in -dedicated -sdl ''; do
96 cp nexuiz$x.exe "$tmpdir/nexuiz$x.exe"
97 cp nexuiz$x.exe-withdebug "$tmpdir/debuginfo/nexuiz$x.exe"
102 for x in dedicated sdl glx; do
103 cp nexuiz-$x "$tmpdir/nexuiz-linux-686-$x"
104 cp nexuiz-$x-withdebug "$tmpdir/debuginfo/nexuiz-linux-686-$x"
109 for x in dedicated sdl glx; do
110 cp nexuiz-$x "$tmpdir/nexuiz-linux-x86_64-$x"
111 cp nexuiz-$x-withdebug "$tmpdir/debuginfo/nexuiz-linux-x86_64-$x"
114 cp "$nexdir/nexuiz-linux-sdl.sh" "$tmpdir/"
115 cp "$nexdir/nexuiz-linux-glx.sh" "$tmpdir/"
116 cp "$nexdir/gpl.txt" "$tmpdir/"
119 rm -f *.exe nexuiz-* *-withdebug '.#'*
122 svn export . "$tmpdir/data"
125 svn export . "$tmpdir/Docs"
128 mkdir -p "$tmpdir/sources"
129 #zip -9r ../sources/gamesource$date.zip qcsrc
130 7za a -mx=9 -tzip ../sources/gamesource$date.zip qcsrc
137 #zip -9r "$tmpdir/sources/enginesource$date.zip" "${dpdir##*/}"
138 7za a -mx=9 -tzip "$tmpdir/sources/enginesource$date.zip" "${dpdir##*/}"
140 cd "$tmpdir/data/qcsrc/menu"
143 cd "$tmpdir/data/qcsrc/server"
146 rm -rf "$tmpdir/data/qcsrc"
149 perl -pi -e '/^#---SET nexversion=([0-9.]*)$/ and $_ = "#---SET nexversion='$version'\n"' FAQ.aft
150 perl -pi -e '/^\s*Version ([0-9.]*)<\/div>$/ and $_ = "Version '$version'</div>\n"' Readme.htm
156 mv common-spog.pk3 ..
157 perl -pi -e '/^set g_nexuizversion "([0-9.]*)[^"]*"/ and $_ = "set g_nexuizversion \"'$version'\"\n"' default.cfg
158 if [ -n "$versiontag" ]; then
159 perl -pi -e '/^set g_nexuizversion/ and $_ = "showbrand 1\n$_"' default.cfg
160 cp "$buildfiles/brand/$versiontag.tga" gfx/brand.tga
162 7za a -mx=7 -tzip ../data.pk3 .
167 mv data.pk3 data/data$date.pk3
168 mv common-spog.pk3 data/
170 cp -r "$mingwdlls"/* .
172 chmod 644 *.dll *.exe
177 find . -name .svn -exec rm -rf {} \; -prune
179 rm -f "$zipdir/nexuiz$date$ext.zip"
180 zip -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
181 rm -f "$zipdir/nexuizengineonly$date$ext.zip"
182 zip -9yr "$zipdir/nexuizengineonly$date$ext.zip" Nexuiz/gpl.txt Nexuiz/nexuiz* Nexuiz/Nexuiz* Nexuiz/*.dll
183 rm -f "$zipdir/nexuizsource$date$ext.zip"
184 zip -9yr "$zipdir/nexuizsource$date$ext.zip" Nexuiz/gpl.txt Nexuiz/sources
186 zipdiff -o "Nexuiz/data/datapatch$date.pk3" -f "$basepk3" -t Nexuiz/data/data$date.pk3
188 if unzip "Nexuiz/data/data$date.pk3" gfx/brand.tga; then
189 zip -9r "Nexuiz/data/datapatch$date.pk3" gfx/brand.tga
193 rm -f "$zipdir/nexuizpatch$date$ext.zip"
194 zip -9yr "$zipdir/nexuizpatch$date$ext.zip" Nexuiz/gpl.txt Nexuiz/nexuiz* Nexuiz/Nexuiz* Nexuiz/*.dll Nexuiz/sources Nexuiz/Docs Nexuiz/data/datapatch$date.pk3
196 rm -f "$zipdir/nexuizdebug$date$ext.zip"
197 zip -9yr "$zipdir/nexuizdebug$date$ext.zip" Nexuiz/gpl.txt Nexuiz/debuginfo/*