ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/makebin.osx
(Generate patch)

Comparing deliantra/Deliantra-Client/makebin.osx (file contents):
Revision 1.1 by root, Tue Aug 19 21:48:28 2008 UTC vs.
Revision 1.11 by root, Wed Jan 14 23:55:39 2009 UTC

1#!/bin/bash 1#!/bin/bash
2 2
3# Convert a gtk2-perl program to a standalone OS X binary 3# Convert a gtk2-perl program to a standalone OS X binary
4
5# need to patch libSDL_image from /opt/local/lib/libjpeg.dylib to ./libjpeg.62.dylib
6
7#export MACOSX_DEPLOYMENT_TARGET=10.3 # maybe it helps
8export MACOSX_DEPLOYMENT_TARGET=10.5 # nope
9
10cvs update
4 11
5PERL=/opt/local 12PERL=/opt/local
6PERLLIB=/usr/lib/perl5 13PERLLIB=/usr/lib/perl5
7PANGO=1.6.0
8 14
9if false; then 15umask 022
16
17if true; then
10 for mod in AnyEvent EV JSON-XS Deliantra Compress-LZF BDB; do 18 for mod in AnyEvent EV JSON-XS deliantra/Deliantra Compress-LZF BDB Guard; do
11 ( 19 (
20 mkdir -p /root/src/$mod || exit 77
12 cd /root/src/$mod 21 cd /root/src/$mod
22 set -x
23 pwd
24 rsync -avPessh 10.0.0.1:src/$mod/. . --del
13 $PERL/bin/perl Makefile.PL </dev/null 25 $PERL/bin/perl Makefile.PL </dev/null
14 make clean 26 make clean
15 $PERL/bin/perl Makefile.PL </dev/null 27 $PERL/bin/perl Makefile.PL </dev/null
16 make install || exit 28 make install || exit
17 make clean 29 make clean
18 ) 30 ) || exit
19 done 31 done
20fi 32fi
33
34if true; then
21 35
22( 36(
23 perl -ne '/^(resources\/.*)/ and print "$1;root/Deliantra/Client/private/$1\n"' <MANIFEST 37 perl -ne '/^(resources\/.*)/ and print "$1;root/Deliantra/Client/private/$1\n"' <MANIFEST
24 38
25 echo "docwiki.pst;root/Deliantra/Client/private/resources/docwiki.pst" 39 echo "docwiki.pst;root/Deliantra/Client/private/resources/docwiki.pst"
83 97
84trap "rm -f addlist pango.rc pango.modules fonts.conf" 0 98trap "rm -f addlist pango.rc pango.modules fonts.conf" 0
85 99
86cd /root/src/deliantra/Deliantra-Client 100cd /root/src/deliantra/Deliantra-Client
87 101
88#$PERL/bin/perl Makefile.PL 102$PERL/bin/perl Makefile.PL
89#make clean 103make clean
90#$PERL/bin/perl Makefile.PL 104$PERL/bin/perl Makefile.PL
91make install || exit 105make install || exit
92 106
93DYLD_LIBRARY_PATH=/opt/local/lib \ 107DYLD_LIBRARY_PATH=/opt/local/lib \
94$PERL/bin/pp -C \ 108$PERL/bin/pp -C \
109 -z 9 \
95 -M AnyEvent::Impl::EV \ 110 -M AnyEvent::Impl::EV \
96 -M attributes \ 111 -M attributes \
97 -a "blib/arch/auto/Deliantra/Client/Client.bundle;lib/auto/Deliantra/Client/Client.bundle" \ 112 -a "blib/arch/auto/Deliantra/Client/Client.bundle;lib/auto/Deliantra/Client/Client.bundle" \
98 -o deliantra-macosx-10.5.bin -A addlist bin/deliantra || exit 113 -o deliantra -A addlist bin/deliantra || exit
99 114
115fi
100 116
117# for other OS'es, we would be finished now, but for OS X, this is just one third of the process :/
118# create the app
119
120VER=$(perl -e 'require "DC.pm"; print $DC::VERSION')
121APP="Deliantra MORPG Client $VER"
122
123rm -rf "Deliantra MORPG Client "*.app
124
125mkdir "$APP".app "$APP".app/Contents "$APP".app/Contents/MacOS "$APP".app/Contents/Resources
126
127ln deliantra "$APP".app/Contents/MacOS/run
128ln osx/deliantra.icns "$APP".app/Contents/Resources/
129
130cat >"$APP.app/Contents/Info.plist" <<EOF
131<?xml version="1.0" encoding="UTF-8"?>
132<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
133<plist version="1.0">
134<dict>
135 <key>CFBundleDevelopmentRegion</key>
136 <string>English</string>
137 <key>CFBundleDisplayName</key>
138 <string>Deliantra MORPG Client</string>
139 <key>CFBundleExecutable</key>
140 <string>run</string>
141 <key>CFBundleGetInfoString</key>
142 <string>Deliantra MORPG Client $VER (www.deliantra.net)</string>
143 <key>CFBundleIconFile</key>
144 <string>deliantra.icns</string>
145 <key>CFBundleIdentifier</key>
146 <string>net.deliantra.client</string>
147 <key>CFBundleInfoDictionaryVersion</key>
148 <string>6.0</string>
149 <key>CFBundleName</key>
150 <string>Deliantra MORPG Client</string>
151 <key>CFBundlePackageType</key>
152 <string>APPL</string>
153 <key>CFBundleShortVersionString</key>
154 <string>$VER</string>
155 <key>CFBundleVersionString</key>
156 <string>$VER.$(date "+%Y.%m.%d.%H.%M.%S")</string>
157 <key>CFBundleSignature</key>
158 <string>????</string>
159 <key>LSHasLocalizedDisplayName</key>
160 <false/>
161 <key>LSMinimumSystemVersion</key>
162 <string>10.5</string>
163 <key>NSAppleScriptEnabled</key>
164 <false/>
165 <key>NSHumanReadableCopyright</key>
166 <string>Deliantra MORPG Client - Copyright 2008 The Deliantra Team</string>
167</dict>
168</plist>
169EOF
170
171rm -rf dmg
172mkdir dmg
173
174mv "$APP.app" dmg/
175
176cat >dmg/README.txt <<EOF
177Hello!
178
179This disk image contains the Deliantra MORPG game client.
180
181The client has been compiled for Intel systems only.
182
183The client uses a lot of right mouse button click pop-up menus, to emulate
184a right-click with a mouse that has only one button, use ctrl-click.
185
186To play it, simply double-click it, then select a good graphics resolution
187in the Setup => Graphics tab and then go to Setup => Login, enter a nickname
188(no spaces, only ASCII letters supported) and a password, then hit Login.
189
190You can also install the client application by dragging it onto your
191harddisk or anywhere else, but it should play perfectly fine from the disk
192image.
193
194The game stores configuration settings, map data, music and other resources
195in a hidden directory called .deliantra in your home directory.
196
197The script "Reset Configuration" will reset the configuration and delete
198any downloaded resources. You can use this when you no longer want to play
199Deliantra, or when you have problems with the settings (window too large
200etc.).
201
202Unfortunately, Mac OS X has quite buggy OpenGL support: make sure your
203monitor cable is plugged in correctly when you can't go into fullscreen or
204when the graphics look broken.
205
206See http://www.deliantra.net/ for more info.
207
208EOF
209
210cat >dmg/"Reset Configuration" <<EOF
211#!/bin/sh
212
213rm -rf ~/.deliantra
214
215echo
216echo
217echo
218echo
219echo
220echo Configuration/Cache Cleared
221
222EOF
223chmod 755 dmg/"Reset Configuration"
224
225# now, the last third, putting all this into a dmg
226
227DMG="Deliantra_MORPG_Client-$VER".dmg
228
229hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"$DMG"
230ls -l ~user/"$DMG"
231rm -rf dmg
232
233chmod 644 ~user/$DMG
234echo http://data.plan9.de/"$DMG"
235rsync -avPessh ~user/"$DMG" ruth:/var/www/data.plan9.de/.
236
237
238

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines