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.4 by root, Wed Aug 27 20:28:12 2008 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines