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 |
|
|
8 | export MACOSX_DEPLOYMENT_TARGET=10.5 # nope |
|
|
9 | |
|
|
10 | cvs update |
4 | |
11 | |
5 | PERL=/opt/local |
12 | PERL=/opt/local |
6 | PERLLIB=/usr/lib/perl5 |
13 | PERLLIB=/usr/lib/perl5 |
7 | PANGO=1.6.0 |
|
|
8 | |
14 | |
9 | umask 022 |
15 | umask 022 |
10 | |
16 | |
11 | if false; then |
17 | if true; then |
12 | for mod in AnyEvent EV JSON-XS Deliantra Compress-LZF BDB; do |
18 | for mod in common-sense AnyEvent EV JSON-XS deliantra/Deliantra Compress-LZF BDB Guard; do |
13 | ( |
19 | ( |
|
|
20 | mkdir -p /root/src/$mod || exit 77 |
14 | cd /root/src/$mod |
21 | cd /root/src/$mod |
|
|
22 | set -x |
|
|
23 | pwd |
|
|
24 | rsync -avPessh 10.0.0.1:src/$mod/. . --del |
15 | $PERL/bin/perl Makefile.PL </dev/null |
25 | $PERL/bin/perl Makefile.PL </dev/null |
16 | make clean |
26 | make clean |
17 | $PERL/bin/perl Makefile.PL </dev/null |
27 | $PERL/bin/perl Makefile.PL </dev/null |
18 | make install || exit |
28 | make install || exit |
19 | make clean |
29 | make clean |
20 | ) |
30 | ) || exit |
21 | done |
31 | done |
22 | fi |
32 | fi |
23 | |
33 | |
24 | if true; then |
34 | if true; then |
25 | |
35 | |
… | |
… | |
56 | fontconfig.1 expat.1 freetype.6 intl.8 iconv.2; |
66 | fontconfig.1 expat.1 freetype.6 intl.8 iconv.2; |
57 | do |
67 | do |
58 | echo "/opt/local/lib/lib$lib.dylib;shlib/darwin-2level/lib$lib.dylib" |
68 | echo "/opt/local/lib/lib$lib.dylib;shlib/darwin-2level/lib$lib.dylib" |
59 | done |
69 | done |
60 | |
70 | |
61 | cat >>fonts.conf <<EOF |
|
|
62 | <?xml version="1.0"?> |
|
|
63 | <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> |
|
|
64 | <fontconfig> |
|
|
65 | |
|
|
66 | <match target="pattern"> <test qual="any" name="family"> <string>mono</string> </test> <edit name="family" mode="assign"> <string>monospace</string> </edit> </match> |
|
|
67 | |
|
|
68 | <match target="pattern"> <test qual="any" name="family"> <string>sans serif</string> </test> <edit name="family" mode="assign"> <string>sans-serif</string> </edit> </match> |
|
|
69 | |
|
|
70 | <match target="pattern"> <test qual="any" name="family"> <string>sans</string> </test> <edit name="family" mode="assign"> <string>sans-serif</string> </edit> </match> |
|
|
71 | |
|
|
72 | <cachedir>fontconfig-cache</cachedir> |
|
|
73 | |
|
|
74 | <config> |
|
|
75 | <blank> |
|
|
76 | <int>0x0020</int><int>0x00A0</int><int>0x00AD</int><int>0x034F</int><int>0x0600</int><int>0x0601</int><int>0x0602</int><int>0x0603</int><int>0x06DD</int><int>0x070F</int><int>0x115F</int><int>0x1160</int><int>0x1680</int><int>0x17B4</int><int>0x17B5</int><int>0x180E</int><int>0x2000</int><int>0x2001</int><int>0x2002</int><int>0x2003</int><int>0x2004</int><int>0x2005</int><int>0x2006</int><int>0x2007</int><int>0x2008</int><int>0x2009</int><int>0x200A</int><int>0x200B</int><int>0x200C</int><int>0x200D</int><int>0x200E</int><int>0x200F</int><int>0x2028</int><int>0x2029</int><int>0x202A</int><int>0x202B</int><int>0x202C</int><int>0x202D</int><int>0x202E</int><int>0x202F</int><int>0x205F</int><int>0x2060</int><int>0x2061</int><int>0x2062</int><int>0x2063</int><int>0x206A</int><int>0x206B</int><int>0x206C</int><int>0x206D</int><int>0x206E</int><int>0x206F</int><int>0x2800</int><int>0x3000</int><int>0x3164</int><int>0xFEFF</int><int>0xFFA0</int><int>0xFFF9</int><int>0xFFFA</int><int>0xFFFB</int> |
|
|
77 | </blank> |
|
|
78 | </config> |
|
|
79 | |
|
|
80 | </fontconfig> |
|
|
81 | EOF |
|
|
82 | echo "fonts.conf;root/fonts.conf" |
|
|
83 | |
|
|
84 | ) >addlist |
71 | ) >addlist |
85 | |
72 | |
86 | #cat pango.modules;exit |
73 | #cat pango.modules;exit |
87 | |
74 | |
88 | trap "rm -f addlist pango.rc pango.modules fonts.conf" 0 |
75 | trap "rm -f addlist pango.rc pango.modules fonts.conf" 0 |
89 | |
76 | |
90 | cd /root/src/deliantra/Deliantra-Client |
77 | cd /root/src/deliantra/Deliantra-Client |
91 | |
78 | |
92 | #$PERL/bin/perl Makefile.PL |
79 | $PERL/bin/perl Makefile.PL |
93 | #make clean |
80 | make clean |
94 | #$PERL/bin/perl Makefile.PL |
81 | $PERL/bin/perl Makefile.PL |
95 | make install || exit |
82 | make install || exit |
96 | |
83 | |
97 | DYLD_LIBRARY_PATH=/opt/local/lib \ |
84 | DYLD_LIBRARY_PATH=/opt/local/lib \ |
98 | $PERL/bin/pp -C \ |
85 | $PERL/bin/pp -C \ |
99 | -z 9 \ |
86 | -z 9 \ |
… | |
… | |
161 | rm -rf dmg |
148 | rm -rf dmg |
162 | mkdir dmg |
149 | mkdir dmg |
163 | |
150 | |
164 | mv "$APP.app" dmg/ |
151 | mv "$APP.app" dmg/ |
165 | |
152 | |
|
|
153 | cat >dmg/README.txt <<EOF |
|
|
154 | Hello! |
|
|
155 | |
|
|
156 | This disk image contains the Deliantra MORPG game client. |
|
|
157 | |
|
|
158 | The client has been compiled for Intel systems only. |
|
|
159 | |
|
|
160 | The client uses a lot of right mouse button click pop-up menus, to emulate |
|
|
161 | a right-click with a mouse that has only one button, use ctrl-click. |
|
|
162 | |
|
|
163 | To play it, simply double-click it, then select a good graphics resolution |
|
|
164 | in the Setup => Graphics tab and then go to Setup => Login, enter a nickname |
|
|
165 | (no spaces, only ASCII letters supported) and a password, then hit Login. |
|
|
166 | |
|
|
167 | You can also install the client application by dragging it onto your |
|
|
168 | harddisk or anywhere else, but it should play perfectly fine from the disk |
|
|
169 | image. |
|
|
170 | |
|
|
171 | The game stores configuration settings, map data, music and other resources |
|
|
172 | in a hidden directory called .deliantra in your home directory. |
|
|
173 | |
|
|
174 | The script "Reset Configuration" will reset the configuration and delete |
|
|
175 | any downloaded resources. You can use this when you no longer want to play |
|
|
176 | Deliantra, or when you have problems with the settings (window too large |
|
|
177 | etc.). |
|
|
178 | |
|
|
179 | Unfortunately, Mac OS X has quite buggy OpenGL support: make sure your |
|
|
180 | monitor cable is plugged in correctly when you can't go into fullscreen or |
|
|
181 | when the graphics look broken. |
|
|
182 | |
|
|
183 | See http://www.deliantra.net/ for more info. |
|
|
184 | |
|
|
185 | EOF |
|
|
186 | |
|
|
187 | cat >dmg/"Reset Configuration" <<EOF |
|
|
188 | #!/bin/sh |
|
|
189 | |
|
|
190 | rm -rf ~/.deliantra |
|
|
191 | |
|
|
192 | echo |
|
|
193 | echo |
|
|
194 | echo |
|
|
195 | echo |
|
|
196 | echo |
|
|
197 | echo Configuration/Cache Cleared |
|
|
198 | |
|
|
199 | EOF |
|
|
200 | chmod 755 dmg/"Reset Configuration" |
|
|
201 | |
166 | # now, the last third, putting all this into a dmg |
202 | # now, the last third, putting all this into a dmg |
167 | |
203 | |
|
|
204 | DMG="Deliantra_MORPG_Client-$VER".dmg |
|
|
205 | |
168 | hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"Deliantra_MORPG_Client-$VER".dmg |
206 | hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"$DMG" |
169 | ls -l ~user/"Deliantra_MORPG_Client-$VER".dmg |
207 | ls -l ~user/"$DMG" |
170 | rm -rf dmg |
208 | rm -rf dmg |
171 | |
209 | |
|
|
210 | chmod 644 ~user/$DMG |
|
|
211 | echo http://data.plan9.de/"$DMG" |
|
|
212 | rsync -avPessh ~user/"$DMG" ruth:/var/www/data.plan9.de/. |
172 | |
213 | |
173 | |
214 | |
|
|
215 | |