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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines