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.5 by root, Mon Sep 1 09:17:46 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
171The client has been compiled for Intel systems only.
172
173The client uses a lot of right mouse button click pop-up menus, to emulate
174a right-click with a mouse that has only one button, use ctrl-click.
175
176To play it, simply double-click it, then select a good graphics resolution
177in the Setup => Graphics tab and then go to Setup => Login, enter a nickname
178(no spaces, only ASCII letters supported) and a password, then hit Login.
179
180You can also install the client application by dragging it onto your
181harddisk or anywhere else, but it should play perfectly fine from the disk
182image.
183
184The game stores configuration settings, map data, music and other resources
185in a hidden directory called .deliantra in your home directory.
186
187The script "Reset Configuration" will reset the configuration and delete
188any downloaded resources. You can use this when you no longer want to play
189Deliantra, or when you have problems with the settings (window too large
190etc.).
191
192Unfortunately, Mac OS X has quite buggy OpenGL support: make sure your
193monitor cable is plugged in correctly when you can't go into fullscreen or
194when the graphics look broken.
195
196See http://www.deliantra.net/ for more info.
197
198EOF
199
200cat >dmg/"Reset Configuration" <<EOF
201#!/bin/sh
202
203rm -rf ~/.deliantra
204
205echo
206echo
207echo
208echo
209echo
210echo Configuration/Cache Cleared
211
212EOF
213chmod 755 dmg/"Reset Configuration"
214
215# now, the last third, putting all this into a dmg
216
217DMG="Deliantra_MORPG_Client-$VER".dmg
218
219hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"$DMG"
220ls -l ~user/"$DMG"
221rm -rf dmg
222
223chmod 644 ~user/$DMG
224echo http://data.plan9.de/"$DMG"
225rsync -avPessh ~user/"$DMG" ruth:/var/www/data.plan9.de/.
226
227
228

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines