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 | |
|
|
7 | export MACOSX_DEPLOYMENT_TARGET=10.3 # maybe it helps |
4 | |
8 | |
5 | PERL=/opt/local |
9 | PERL=/opt/local |
6 | PERLLIB=/usr/lib/perl5 |
10 | PERLLIB=/usr/lib/perl5 |
7 | PANGO=1.6.0 |
|
|
8 | |
11 | |
9 | umask 022 |
12 | umask 022 |
10 | |
13 | |
11 | if false; then |
14 | if true; then |
12 | 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 |
13 | ( |
16 | ( |
14 | cd /root/src/$mod |
17 | cd /root/src/$mod |
|
|
18 | set -x |
|
|
19 | pwd |
|
|
20 | rsync -avPessh 10.0.0.1:src/$mod/. . --del |
15 | $PERL/bin/perl Makefile.PL </dev/null |
21 | $PERL/bin/perl Makefile.PL </dev/null |
16 | make clean |
22 | make clean |
17 | $PERL/bin/perl Makefile.PL </dev/null |
23 | $PERL/bin/perl Makefile.PL </dev/null |
18 | make install || exit |
24 | make install || exit |
19 | make clean |
25 | make clean |
20 | ) |
26 | ) || exit |
21 | done |
27 | done |
22 | fi |
28 | fi |
23 | |
29 | |
24 | if true; then |
30 | if true; then |
25 | |
31 | |
… | |
… | |
87 | |
93 | |
88 | trap "rm -f addlist pango.rc pango.modules fonts.conf" 0 |
94 | trap "rm -f addlist pango.rc pango.modules fonts.conf" 0 |
89 | |
95 | |
90 | cd /root/src/deliantra/Deliantra-Client |
96 | cd /root/src/deliantra/Deliantra-Client |
91 | |
97 | |
92 | #$PERL/bin/perl Makefile.PL |
98 | $PERL/bin/perl Makefile.PL |
93 | #make clean |
99 | make clean |
94 | #$PERL/bin/perl Makefile.PL |
100 | $PERL/bin/perl Makefile.PL |
95 | make install || exit |
101 | make install || exit |
96 | |
102 | |
97 | DYLD_LIBRARY_PATH=/opt/local/lib \ |
103 | DYLD_LIBRARY_PATH=/opt/local/lib \ |
98 | $PERL/bin/pp -C \ |
104 | $PERL/bin/pp -C \ |
99 | -z 9 \ |
105 | -z 9 \ |
… | |
… | |
147 | <key>CFBundleSignature</key> |
153 | <key>CFBundleSignature</key> |
148 | <string>????</string> |
154 | <string>????</string> |
149 | <key>LSHasLocalizedDisplayName</key> |
155 | <key>LSHasLocalizedDisplayName</key> |
150 | <false/> |
156 | <false/> |
151 | <key>LSMinimumSystemVersion</key> |
157 | <key>LSMinimumSystemVersion</key> |
152 | <string>10.5</string> |
158 | <string>10.3</string> |
153 | <key>NSAppleScriptEnabled</key> |
159 | <key>NSAppleScriptEnabled</key> |
154 | <false/> |
160 | <false/> |
155 | <key>NSHumanReadableCopyright</key> |
161 | <key>NSHumanReadableCopyright</key> |
156 | <string>Deliantra MORPG Client - Copyright 2008 The Deliantra Team</string> |
162 | <string>Deliantra MORPG Client - Copyright 2008 The Deliantra Team</string> |
157 | </dict> |
163 | </dict> |
… | |
… | |
161 | rm -rf dmg |
167 | rm -rf dmg |
162 | mkdir dmg |
168 | mkdir dmg |
163 | |
169 | |
164 | mv "$APP.app" dmg/ |
170 | mv "$APP.app" dmg/ |
165 | |
171 | |
|
|
172 | cat >dmg/README.txt <<EOF |
|
|
173 | Hello! |
|
|
174 | |
|
|
175 | This disk image contains the Deliantra MORPG game client. |
|
|
176 | |
|
|
177 | The client has been compiled for Intel systems only. |
|
|
178 | |
|
|
179 | The client uses a lot of right mouse button click pop-up menus, to emulate |
|
|
180 | a right-click with a mouse that has only one button, use ctrl-click. |
|
|
181 | |
|
|
182 | To play it, simply double-click it, then select a good graphics resolution |
|
|
183 | in 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 | |
|
|
186 | You can also install the client application by dragging it onto your |
|
|
187 | harddisk or anywhere else, but it should play perfectly fine from the disk |
|
|
188 | image. |
|
|
189 | |
|
|
190 | The game stores configuration settings, map data, music and other resources |
|
|
191 | in a hidden directory called .deliantra in your home directory. |
|
|
192 | |
|
|
193 | The script "Reset Configuration" will reset the configuration and delete |
|
|
194 | any downloaded resources. You can use this when you no longer want to play |
|
|
195 | Deliantra, or when you have problems with the settings (window too large |
|
|
196 | etc.). |
|
|
197 | |
|
|
198 | Unfortunately, Mac OS X has quite buggy OpenGL support: make sure your |
|
|
199 | monitor cable is plugged in correctly when you can't go into fullscreen or |
|
|
200 | when the graphics look broken. |
|
|
201 | |
|
|
202 | See http://www.deliantra.net/ for more info. |
|
|
203 | |
|
|
204 | EOF |
|
|
205 | |
|
|
206 | cat >dmg/"Reset Configuration" <<EOF |
|
|
207 | #!/bin/sh |
|
|
208 | |
|
|
209 | rm -rf ~/.deliantra |
|
|
210 | |
|
|
211 | echo |
|
|
212 | echo |
|
|
213 | echo |
|
|
214 | echo |
|
|
215 | echo |
|
|
216 | echo Configuration/Cache Cleared |
|
|
217 | |
|
|
218 | EOF |
|
|
219 | chmod 755 dmg/"Reset Configuration" |
|
|
220 | |
166 | # now, the last third, putting all this into a dmg |
221 | # now, the last third, putting all this into a dmg |
167 | |
222 | |
|
|
223 | DMG="Deliantra_MORPG_Client-$VER".dmg |
|
|
224 | |
168 | hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"Deliantra_MORPG_Client-$VER".dmg |
225 | hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"$DMG" |
169 | ls -l ~user/"Deliantra_MORPG_Client-$VER".dmg |
226 | ls -l ~user/"$DMG" |
170 | rm -rf dmg |
227 | rm -rf dmg |
171 | |
228 | |
|
|
229 | chmod 644 ~user/$DMG |
|
|
230 | echo http://data.plan9.de/"$DMG" |
|
|
231 | rsync -avPessh ~user/"$DMG" ruth:/var/www/data.plan9.de/. |
172 | |
232 | |
173 | |
233 | |
|
|
234 | |