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 | |
5 | PERL=/opt/local |
7 | PERL=/opt/local |
6 | PERLLIB=/usr/lib/perl5 |
8 | PERLLIB=/usr/lib/perl5 |
7 | PANGO=1.6.0 |
|
|
8 | |
9 | |
9 | umask 022 |
10 | umask 022 |
10 | |
11 | |
11 | if false; then |
12 | if true; then |
12 | 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 |
13 | ( |
14 | ( |
14 | cd /root/src/$mod |
15 | cd /root/src/$mod |
|
|
16 | rsync -avzPessh 10.0.0.1:/root/src/$mod . --del |
15 | $PERL/bin/perl Makefile.PL </dev/null |
17 | $PERL/bin/perl Makefile.PL </dev/null |
16 | make clean |
18 | make clean |
17 | $PERL/bin/perl Makefile.PL </dev/null |
19 | $PERL/bin/perl Makefile.PL </dev/null |
18 | make install || exit |
20 | make install || exit |
19 | make clean |
21 | make clean |
… | |
… | |
161 | rm -rf dmg |
163 | rm -rf dmg |
162 | mkdir dmg |
164 | mkdir dmg |
163 | |
165 | |
164 | mv "$APP.app" dmg/ |
166 | mv "$APP.app" dmg/ |
165 | |
167 | |
|
|
168 | cat >dmg/README.txt <<EOF |
|
|
169 | Hello! |
|
|
170 | |
|
|
171 | This disk image contains the Deliantra MORPG game client. |
|
|
172 | |
|
|
173 | The client has been compiled for Intel systems only. |
|
|
174 | |
|
|
175 | The client uses a lot of right mouse button click pop-up menus, to emulate |
|
|
176 | a right-click with a mouse that has only one button, use ctrl-click. |
|
|
177 | |
|
|
178 | To play it, simply double-click it, then select a good graphics resolution |
|
|
179 | in 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 | |
|
|
182 | You can also install the client application by dragging it onto your |
|
|
183 | harddisk or anywhere else, but it should play perfectly fine from the disk |
|
|
184 | image. |
|
|
185 | |
|
|
186 | The game stores configuration settings, map data, music and other resources |
|
|
187 | in a hidden directory called .deliantra in your home directory. |
|
|
188 | |
|
|
189 | The script "Reset Configuration" will reset the configuration and delete |
|
|
190 | any downloaded resources. You can use this when you no longer want to play |
|
|
191 | Deliantra, or when you have problems with the settings (window too large |
|
|
192 | etc.). |
|
|
193 | |
|
|
194 | Unfortunately, Mac OS X has quite buggy OpenGL support: make sure your |
|
|
195 | monitor cable is plugged in correctly when you can't go into fullscreen or |
|
|
196 | when the graphics look broken. |
|
|
197 | |
|
|
198 | See http://www.deliantra.net/ for more info. |
|
|
199 | |
|
|
200 | EOF |
|
|
201 | |
|
|
202 | cat >dmg/"Reset Configuration" <<EOF |
|
|
203 | #!/bin/sh |
|
|
204 | |
|
|
205 | rm -rf ~/.deliantra |
|
|
206 | |
|
|
207 | echo |
|
|
208 | echo |
|
|
209 | echo |
|
|
210 | echo |
|
|
211 | echo |
|
|
212 | echo Configuration/Cache Cleared |
|
|
213 | |
|
|
214 | EOF |
|
|
215 | chmod 755 dmg/"Reset Configuration" |
|
|
216 | |
166 | # now, the last third, putting all this into a dmg |
217 | # now, the last third, putting all this into a dmg |
167 | |
218 | |
|
|
219 | DMG="Deliantra_MORPG_Client-$VER".dmg |
|
|
220 | |
168 | hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"Deliantra_MORPG_Client-$VER".dmg |
221 | hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"$DMG" |
169 | ls -l ~user/"Deliantra_MORPG_Client-$VER".dmg |
222 | ls -l ~user/"$DMG" |
170 | rm -rf dmg |
223 | rm -rf dmg |
171 | |
224 | |
|
|
225 | chmod 644 ~user/$DMG |
|
|
226 | echo http://data.plan9.de/"$DMG" |
|
|
227 | rsync -avPessh ~user/"$DMG" ruth:/var/www/data.plan9.de/. |
172 | |
228 | |
173 | |
229 | |
|
|
230 | |