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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines