2011-06-17 13:11:19 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2011-07-20 23:04:20 +00:00
|
|
|
# build debug/release x86/x64/ppc versions of mapster32 and eduke32 on OSX
|
2011-06-17 13:11:19 +00:00
|
|
|
|
|
|
|
if [ `uname -s` != Darwin ]; then
|
|
|
|
echo This script is for OSX only.
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
onlyzip=0
|
|
|
|
|
|
|
|
if [ $1 ]; then
|
|
|
|
if [ $1 == onlyzip ]; then
|
|
|
|
onlyzip=1
|
|
|
|
else
|
|
|
|
echo usage: osxbuild [onlyzip]
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $onlyzip -eq 0 ]; then
|
2011-07-20 23:04:20 +00:00
|
|
|
# make veryclean
|
|
|
|
# WITHOUT_GTK=1 RELEASE=0 BUILD32_ON_64=0 make -j 3
|
|
|
|
# if [ $? ]; then
|
|
|
|
# echo 64-bit debug build succeeded.
|
|
|
|
# cp mapster32 mapster32.debug.x64
|
|
|
|
# cp eduke32 eduke32.debug.x64
|
|
|
|
# else
|
|
|
|
# echo 64-bit debug build failed.
|
|
|
|
# fi
|
2011-06-17 13:11:19 +00:00
|
|
|
|
|
|
|
make veryclean
|
2011-10-11 16:53:52 +00:00
|
|
|
WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 USE_LIBVPX=1 make -j 3
|
2011-06-17 13:11:19 +00:00
|
|
|
if [ $? ]; then
|
|
|
|
echo 64-bit release build succeeded.
|
|
|
|
cp mapster32 mapster32.x64
|
|
|
|
cp eduke32 eduke32.x64
|
|
|
|
else
|
|
|
|
echo 64-bit release build failed.
|
|
|
|
fi
|
|
|
|
|
2011-07-20 23:04:20 +00:00
|
|
|
# make veryclean
|
|
|
|
# WITHOUT_GTK=1 RELEASE=0 BUILD32_ON_64=1 make -j 3
|
|
|
|
# if [ $? ]; then
|
|
|
|
# echo 32-bit debug build succeeded.
|
|
|
|
# cp mapster32 mapster32.debug.x86
|
|
|
|
# cp eduke32 eduke32.debug.x86
|
|
|
|
# else
|
|
|
|
# echo 32-bit debug build failed.
|
|
|
|
# fi
|
2011-06-17 13:11:19 +00:00
|
|
|
|
|
|
|
make veryclean
|
2011-10-11 16:53:52 +00:00
|
|
|
WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=1 USE_LIBVPX=0 make -j 3
|
2011-06-17 13:11:19 +00:00
|
|
|
if [ $? ]; then
|
|
|
|
echo 32-bit release build succeeded.
|
|
|
|
cp mapster32 mapster32.x86
|
|
|
|
cp eduke32 eduke32.x86
|
|
|
|
else
|
|
|
|
echo 32-bit release build failed.
|
|
|
|
fi
|
2011-07-20 23:04:20 +00:00
|
|
|
|
|
|
|
# make veryclean
|
|
|
|
# ARCH='-arch ppc' WITHOUT_GTK=1 RELEASE=0 BUILD32_ON_64=0 make -j 3
|
|
|
|
# if [ $? ]; then
|
|
|
|
# echo PowerPC debug build succeeded.
|
|
|
|
# cp mapster32 mapster32.debug.ppc
|
|
|
|
# cp eduke32 eduke32.debug.ppc
|
|
|
|
# else
|
|
|
|
# echo PowerPC debug build failed.
|
|
|
|
# fi
|
|
|
|
|
|
|
|
make veryclean
|
2011-10-11 16:53:52 +00:00
|
|
|
ARCH='-arch ppc' WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 USE_LIBVPX=0 make -j 3
|
2011-07-20 23:04:20 +00:00
|
|
|
if [ $? ]; then
|
|
|
|
echo PowerPC release build succeeded.
|
|
|
|
cp mapster32 mapster32.ppc
|
|
|
|
cp eduke32 eduke32.ppc
|
|
|
|
else
|
|
|
|
echo PowerPC release build failed.
|
|
|
|
fi
|
2011-06-17 13:11:19 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Almost done...
|
2011-07-20 23:04:20 +00:00
|
|
|
if [ -f mapster32.x64 ] && [ -f eduke32.x86 ] && [ -f eduke32.ppc ]; then
|
2011-06-17 13:11:19 +00:00
|
|
|
echo Creating fat binaries.
|
2011-07-20 23:04:20 +00:00
|
|
|
lipo -create mapster32.x64 mapster32.x86 mapster32.ppc -output mapster32
|
|
|
|
# lipo -create mapster32.debug.x64 mapster32.debug.x86 -output mapster32.debug
|
|
|
|
lipo -create eduke32.x64 eduke32.x86 eduke32.ppc -output eduke32
|
|
|
|
# lipo -create eduke32.debug.x64 eduke32.debug.x86 -output eduke32.debug
|
2011-06-17 13:11:19 +00:00
|
|
|
rev=`svn info | grep Revision | awk '{ print $2 }'`
|
|
|
|
arfilename="eduke32-osx-$rev.zip"
|
|
|
|
echo "This archive was produced from revision $rev by the osxbuild.sh script." > README.OSX
|
2011-07-20 23:04:20 +00:00
|
|
|
echo "EDuke32 home: http://www.eduke32.com" >> README.OSX
|
|
|
|
echo "OSX build discussion on Duke4.net: http://forums.duke4.net/topic/4242-building-eduke-on-mac-os-x/" >> README.OSX
|
2011-11-17 21:10:18 +00:00
|
|
|
echo "The 64-bit build in this archive has LibVPX (http://www.webmproject.org/code/)" >> README.OSX
|
|
|
|
echo "from MacPorts (http://www.macports.org/) statically linked into it." >> README.OSX
|
2011-06-17 13:11:19 +00:00
|
|
|
rm -f "$arfilename"
|
|
|
|
zip "$arfilename" mapster32 eduke32 README.OSX
|
|
|
|
fi
|