1 |
root |
1.1 |
#!/bin/bash |
2 |
|
|
|
3 |
|
|
# Convert a gtk2-perl program to a standalone OS X binary |
4 |
|
|
|
5 |
root |
1.6 |
# need to patch libSDL_image from /opt/local/lib/libjpeg.dylib to ./libjpeg.62.dylib |
6 |
|
|
|
7 |
root |
1.10 |
#export MACOSX_DEPLOYMENT_TARGET=10.3 # maybe it helps |
8 |
|
|
export MACOSX_DEPLOYMENT_TARGET=10.5 # nope |
9 |
root |
1.9 |
|
10 |
root |
1.11 |
cvs update |
11 |
|
|
|
12 |
root |
1.1 |
PERL=/opt/local |
13 |
|
|
PERLLIB=/usr/lib/perl5 |
14 |
|
|
|
15 |
root |
1.2 |
umask 022 |
16 |
|
|
|
17 |
root |
1.7 |
if true; then |
18 |
root |
1.11 |
for mod in AnyEvent EV JSON-XS deliantra/Deliantra Compress-LZF BDB Guard; do |
19 |
root |
1.1 |
( |
20 |
root |
1.11 |
mkdir -p /root/src/$mod || exit 77 |
21 |
root |
1.1 |
cd /root/src/$mod |
22 |
root |
1.9 |
set -x |
23 |
|
|
pwd |
24 |
|
|
rsync -avPessh 10.0.0.1:src/$mod/. . --del |
25 |
root |
1.1 |
$PERL/bin/perl Makefile.PL </dev/null |
26 |
|
|
make clean |
27 |
|
|
$PERL/bin/perl Makefile.PL </dev/null |
28 |
|
|
make install || exit |
29 |
|
|
make clean |
30 |
root |
1.9 |
) || exit |
31 |
root |
1.1 |
done |
32 |
|
|
fi |
33 |
|
|
|
34 |
root |
1.2 |
if true; then |
35 |
|
|
|
36 |
root |
1.1 |
( |
37 |
|
|
perl -ne '/^(resources\/.*)/ and print "$1;root/Deliantra/Client/private/$1\n"' <MANIFEST |
38 |
|
|
|
39 |
|
|
echo "docwiki.pst;root/Deliantra/Client/private/resources/docwiki.pst" |
40 |
|
|
|
41 |
|
|
#pangoversion;root/pangoversion |
42 |
|
|
#/opt/local/lib/libglib-2.0.so.0;shlib/darwin-2level/libglib-2.0.dylib |
43 |
|
|
#/lib/libgcc_s.so.1;shlib/darwin-2level/libgcc_s.so.1 |
44 |
|
|
#/opt/local/lib/libstdc++.so.6;shlib/darwin-2level/libstdc++.so.6 |
45 |
|
|
#/opt/local/lib/libaudio.so.2;shlib/darwin-2level/libaudio.so.2 |
46 |
|
|
|
47 |
|
|
( echo "[Pango]"; echo "ModuleFiles = pango.modules" ) > pango.rc |
48 |
|
|
echo "pango.rc;root/pango.rc" |
49 |
|
|
|
50 |
|
|
( |
51 |
|
|
grep ^/opt /opt/local/etc/pango/pango.modules | while read so rest; do |
52 |
|
|
base=$(basename "$so") |
53 |
|
|
echo "$so;root/$base" |
54 |
|
|
echo "$base $rest" >&5 |
55 |
|
|
done |
56 |
|
|
) 5>pango.modules |
57 |
|
|
echo "pango.modules;root/pango.modules" |
58 |
|
|
|
59 |
|
|
for lib in \ |
60 |
|
|
db-4.6 \ |
61 |
|
|
glib-2.0.0 gobject-2.0.0 gmodule-2.0.0 \ |
62 |
|
|
pango-1.0.0 pangoft2-1.0.0 \ |
63 |
|
|
SDL-1.2.0 SDL_mixer-1.2.0 SDL_image-1.2.0 \ |
64 |
|
|
vorbisfile vorbis.0 ogg.0 \ |
65 |
|
|
png12 jpeg.62 z.1 \ |
66 |
|
|
fontconfig.1 expat.1 freetype.6 intl.8 iconv.2; |
67 |
|
|
do |
68 |
|
|
echo "/opt/local/lib/lib$lib.dylib;shlib/darwin-2level/lib$lib.dylib" |
69 |
|
|
done |
70 |
|
|
|
71 |
|
|
cat >>fonts.conf <<EOF |
72 |
|
|
<?xml version="1.0"?> |
73 |
|
|
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> |
74 |
|
|
<fontconfig> |
75 |
|
|
|
76 |
|
|
<match target="pattern"> <test qual="any" name="family"> <string>mono</string> </test> <edit name="family" mode="assign"> <string>monospace</string> </edit> </match> |
77 |
|
|
|
78 |
|
|
<match target="pattern"> <test qual="any" name="family"> <string>sans serif</string> </test> <edit name="family" mode="assign"> <string>sans-serif</string> </edit> </match> |
79 |
|
|
|
80 |
|
|
<match target="pattern"> <test qual="any" name="family"> <string>sans</string> </test> <edit name="family" mode="assign"> <string>sans-serif</string> </edit> </match> |
81 |
|
|
|
82 |
|
|
<cachedir>fontconfig-cache</cachedir> |
83 |
|
|
|
84 |
|
|
<config> |
85 |
|
|
<blank> |
86 |
|
|
<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> |
87 |
|
|
</blank> |
88 |
|
|
</config> |
89 |
|
|
|
90 |
|
|
</fontconfig> |
91 |
|
|
EOF |
92 |
|
|
echo "fonts.conf;root/fonts.conf" |
93 |
|
|
|
94 |
|
|
) >addlist |
95 |
|
|
|
96 |
|
|
#cat pango.modules;exit |
97 |
|
|
|
98 |
|
|
trap "rm -f addlist pango.rc pango.modules fonts.conf" 0 |
99 |
|
|
|
100 |
|
|
cd /root/src/deliantra/Deliantra-Client |
101 |
|
|
|
102 |
root |
1.9 |
$PERL/bin/perl Makefile.PL |
103 |
|
|
make clean |
104 |
|
|
$PERL/bin/perl Makefile.PL |
105 |
root |
1.1 |
make install || exit |
106 |
|
|
|
107 |
|
|
DYLD_LIBRARY_PATH=/opt/local/lib \ |
108 |
|
|
$PERL/bin/pp -C \ |
109 |
root |
1.2 |
-z 9 \ |
110 |
root |
1.1 |
-M AnyEvent::Impl::EV \ |
111 |
|
|
-M attributes \ |
112 |
|
|
-a "blib/arch/auto/Deliantra/Client/Client.bundle;lib/auto/Deliantra/Client/Client.bundle" \ |
113 |
root |
1.2 |
-o deliantra -A addlist bin/deliantra || exit |
114 |
|
|
|
115 |
|
|
fi |
116 |
|
|
|
117 |
|
|
# for other OS'es, we would be finished now, but for OS X, this is just one third of the process :/ |
118 |
|
|
# create the app |
119 |
|
|
|
120 |
|
|
VER=$(perl -e 'require "DC.pm"; print $DC::VERSION') |
121 |
|
|
APP="Deliantra MORPG Client $VER" |
122 |
|
|
|
123 |
|
|
rm -rf "Deliantra MORPG Client "*.app |
124 |
|
|
|
125 |
|
|
mkdir "$APP".app "$APP".app/Contents "$APP".app/Contents/MacOS "$APP".app/Contents/Resources |
126 |
|
|
|
127 |
|
|
ln deliantra "$APP".app/Contents/MacOS/run |
128 |
|
|
ln osx/deliantra.icns "$APP".app/Contents/Resources/ |
129 |
|
|
|
130 |
|
|
cat >"$APP.app/Contents/Info.plist" <<EOF |
131 |
|
|
<?xml version="1.0" encoding="UTF-8"?> |
132 |
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
133 |
|
|
<plist version="1.0"> |
134 |
|
|
<dict> |
135 |
|
|
<key>CFBundleDevelopmentRegion</key> |
136 |
|
|
<string>English</string> |
137 |
|
|
<key>CFBundleDisplayName</key> |
138 |
|
|
<string>Deliantra MORPG Client</string> |
139 |
|
|
<key>CFBundleExecutable</key> |
140 |
|
|
<string>run</string> |
141 |
|
|
<key>CFBundleGetInfoString</key> |
142 |
|
|
<string>Deliantra MORPG Client $VER (www.deliantra.net)</string> |
143 |
|
|
<key>CFBundleIconFile</key> |
144 |
|
|
<string>deliantra.icns</string> |
145 |
|
|
<key>CFBundleIdentifier</key> |
146 |
|
|
<string>net.deliantra.client</string> |
147 |
|
|
<key>CFBundleInfoDictionaryVersion</key> |
148 |
|
|
<string>6.0</string> |
149 |
|
|
<key>CFBundleName</key> |
150 |
|
|
<string>Deliantra MORPG Client</string> |
151 |
|
|
<key>CFBundlePackageType</key> |
152 |
|
|
<string>APPL</string> |
153 |
|
|
<key>CFBundleShortVersionString</key> |
154 |
|
|
<string>$VER</string> |
155 |
|
|
<key>CFBundleVersionString</key> |
156 |
|
|
<string>$VER.$(date "+%Y.%m.%d.%H.%M.%S")</string> |
157 |
|
|
<key>CFBundleSignature</key> |
158 |
|
|
<string>????</string> |
159 |
|
|
<key>LSHasLocalizedDisplayName</key> |
160 |
|
|
<false/> |
161 |
|
|
<key>LSMinimumSystemVersion</key> |
162 |
root |
1.10 |
<string>10.5</string> |
163 |
root |
1.2 |
<key>NSAppleScriptEnabled</key> |
164 |
|
|
<false/> |
165 |
|
|
<key>NSHumanReadableCopyright</key> |
166 |
|
|
<string>Deliantra MORPG Client - Copyright 2008 The Deliantra Team</string> |
167 |
|
|
</dict> |
168 |
|
|
</plist> |
169 |
|
|
EOF |
170 |
|
|
|
171 |
|
|
rm -rf dmg |
172 |
|
|
mkdir dmg |
173 |
|
|
|
174 |
|
|
mv "$APP.app" dmg/ |
175 |
|
|
|
176 |
root |
1.3 |
cat >dmg/README.txt <<EOF |
177 |
|
|
Hello! |
178 |
|
|
|
179 |
|
|
This disk image contains the Deliantra MORPG game client. |
180 |
|
|
|
181 |
root |
1.5 |
The client has been compiled for Intel systems only. |
182 |
|
|
|
183 |
|
|
The client uses a lot of right mouse button click pop-up menus, to emulate |
184 |
|
|
a right-click with a mouse that has only one button, use ctrl-click. |
185 |
|
|
|
186 |
root |
1.3 |
To play it, simply double-click it, then select a good graphics resolution |
187 |
|
|
in the Setup => Graphics tab and then go to Setup => Login, enter a nickname |
188 |
|
|
(no spaces, only ASCII letters supported) and a password, then hit Login. |
189 |
|
|
|
190 |
|
|
You can also install the client application by dragging it onto your |
191 |
|
|
harddisk or anywhere else, but it should play perfectly fine from the disk |
192 |
|
|
image. |
193 |
|
|
|
194 |
|
|
The game stores configuration settings, map data, music and other resources |
195 |
|
|
in a hidden directory called .deliantra in your home directory. |
196 |
|
|
|
197 |
|
|
The script "Reset Configuration" will reset the configuration and delete |
198 |
|
|
any downloaded resources. You can use this when you no longer want to play |
199 |
|
|
Deliantra, or when you have problems with the settings (window too large |
200 |
|
|
etc.). |
201 |
|
|
|
202 |
|
|
Unfortunately, Mac OS X has quite buggy OpenGL support: make sure your |
203 |
|
|
monitor cable is plugged in correctly when you can't go into fullscreen or |
204 |
|
|
when the graphics look broken. |
205 |
|
|
|
206 |
|
|
See http://www.deliantra.net/ for more info. |
207 |
|
|
|
208 |
|
|
EOF |
209 |
|
|
|
210 |
|
|
cat >dmg/"Reset Configuration" <<EOF |
211 |
|
|
#!/bin/sh |
212 |
|
|
|
213 |
|
|
rm -rf ~/.deliantra |
214 |
|
|
|
215 |
|
|
echo |
216 |
|
|
echo |
217 |
|
|
echo |
218 |
|
|
echo |
219 |
|
|
echo |
220 |
|
|
echo Configuration/Cache Cleared |
221 |
|
|
|
222 |
|
|
EOF |
223 |
|
|
chmod 755 dmg/"Reset Configuration" |
224 |
|
|
|
225 |
root |
1.2 |
# now, the last third, putting all this into a dmg |
226 |
|
|
|
227 |
root |
1.4 |
DMG="Deliantra_MORPG_Client-$VER".dmg |
228 |
|
|
|
229 |
|
|
hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"$DMG" |
230 |
|
|
ls -l ~user/"$DMG" |
231 |
root |
1.2 |
rm -rf dmg |
232 |
|
|
|
233 |
root |
1.4 |
chmod 644 ~user/$DMG |
234 |
|
|
echo http://data.plan9.de/"$DMG" |
235 |
|
|
rsync -avPessh ~user/"$DMG" ruth:/var/www/data.plan9.de/. |
236 |
|
|
|
237 |
root |
1.1 |
|
238 |
|
|
|