--- deliantra/Deliantra-Client/makebin.osx 2008/08/19 21:48:28 1.1 +++ deliantra/Deliantra-Client/makebin.osx 2009/03/29 22:28:12 1.12 @@ -2,23 +2,37 @@ # Convert a gtk2-perl program to a standalone OS X binary +# need to patch libSDL_image from /opt/local/lib/libjpeg.dylib to ./libjpeg.62.dylib + +#export MACOSX_DEPLOYMENT_TARGET=10.3 # maybe it helps +export MACOSX_DEPLOYMENT_TARGET=10.5 # nope + +cvs update + PERL=/opt/local PERLLIB=/usr/lib/perl5 -PANGO=1.6.0 -if false; then - for mod in AnyEvent EV JSON-XS Deliantra Compress-LZF BDB; do +umask 022 + +if true; then + for mod in AnyEvent EV JSON-XS deliantra/Deliantra Compress-LZF BDB Guard; do ( + mkdir -p /root/src/$mod || exit 77 cd /root/src/$mod + set -x + pwd + rsync -avPessh 10.0.0.1:src/$mod/. . --del $PERL/bin/perl Makefile.PL >fonts.conf < - - - - mono monospace - - sans serif sans-serif - - sans sans-serif - - fontconfig-cache - - - - 0x00200x00A00x00AD0x034F0x06000x06010x06020x06030x06DD0x070F0x115F0x11600x16800x17B40x17B50x180E0x20000x20010x20020x20030x20040x20050x20060x20070x20080x20090x200A0x200B0x200C0x200D0x200E0x200F0x20280x20290x202A0x202B0x202C0x202D0x202E0x202F0x205F0x20600x20610x20620x20630x206A0x206B0x206C0x206D0x206E0x206F0x28000x30000x31640xFEFF0xFFA00xFFF90xFFFA0xFFFB - - - - -EOF - echo "fonts.conf;root/fonts.conf" - ) >addlist #cat pango.modules;exit @@ -85,16 +76,140 @@ cd /root/src/deliantra/Deliantra-Client -#$PERL/bin/perl Makefile.PL -#make clean -#$PERL/bin/perl Makefile.PL +$PERL/bin/perl Makefile.PL +make clean +$PERL/bin/perl Makefile.PL make install || exit DYLD_LIBRARY_PATH=/opt/local/lib \ $PERL/bin/pp -C \ + -z 9 \ -M AnyEvent::Impl::EV \ -M attributes \ -a "blib/arch/auto/Deliantra/Client/Client.bundle;lib/auto/Deliantra/Client/Client.bundle" \ - -o deliantra-macosx-10.5.bin -A addlist bin/deliantra || exit + -o deliantra -A addlist bin/deliantra || exit + +fi + +# for other OS'es, we would be finished now, but for OS X, this is just one third of the process :/ +# create the app + +VER=$(perl -e 'require "DC.pm"; print $DC::VERSION') +APP="Deliantra MORPG Client $VER" + +rm -rf "Deliantra MORPG Client "*.app + +mkdir "$APP".app "$APP".app/Contents "$APP".app/Contents/MacOS "$APP".app/Contents/Resources + +ln deliantra "$APP".app/Contents/MacOS/run +ln osx/deliantra.icns "$APP".app/Contents/Resources/ + +cat >"$APP.app/Contents/Info.plist" < + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + Deliantra MORPG Client + CFBundleExecutable + run + CFBundleGetInfoString + Deliantra MORPG Client $VER (www.deliantra.net) + CFBundleIconFile + deliantra.icns + CFBundleIdentifier + net.deliantra.client + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Deliantra MORPG Client + CFBundlePackageType + APPL + CFBundleShortVersionString + $VER + CFBundleVersionString + $VER.$(date "+%Y.%m.%d.%H.%M.%S") + CFBundleSignature + ???? + LSHasLocalizedDisplayName + + LSMinimumSystemVersion + 10.5 + NSAppleScriptEnabled + + NSHumanReadableCopyright + Deliantra MORPG Client - Copyright 2008 The Deliantra Team + + +EOF + +rm -rf dmg +mkdir dmg + +mv "$APP.app" dmg/ + +cat >dmg/README.txt < Graphics tab and then go to Setup => Login, enter a nickname +(no spaces, only ASCII letters supported) and a password, then hit Login. + +You can also install the client application by dragging it onto your +harddisk or anywhere else, but it should play perfectly fine from the disk +image. + +The game stores configuration settings, map data, music and other resources +in a hidden directory called .deliantra in your home directory. + +The script "Reset Configuration" will reset the configuration and delete +any downloaded resources. You can use this when you no longer want to play +Deliantra, or when you have problems with the settings (window too large +etc.). + +Unfortunately, Mac OS X has quite buggy OpenGL support: make sure your +monitor cable is plugged in correctly when you can't go into fullscreen or +when the graphics look broken. + +See http://www.deliantra.net/ for more info. + +EOF + +cat >dmg/"Reset Configuration" <