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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines