… | |
… | |
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 | |
5 | PERL=/opt/local |
5 | PERL=/opt/local |
6 | PERLLIB=/usr/lib/perl5 |
6 | PERLLIB=/usr/lib/perl5 |
7 | PANGO=1.6.0 |
7 | PANGO=1.6.0 |
|
|
8 | |
|
|
9 | umask 022 |
8 | |
10 | |
9 | if false; then |
11 | if 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 |
20 | fi |
22 | fi |
21 | |
23 | |
|
|
24 | if 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 |
91 | make install || exit |
95 | make install || exit |
92 | |
96 | |
93 | DYLD_LIBRARY_PATH=/opt/local/lib \ |
97 | DYLD_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 | |
|
|
105 | fi |
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 | |
|
|
110 | VER=$(perl -e 'require "DC.pm"; print $DC::VERSION') |
|
|
111 | APP="Deliantra MORPG Client $VER" |
|
|
112 | |
|
|
113 | rm -rf "Deliantra MORPG Client "*.app |
|
|
114 | |
|
|
115 | mkdir "$APP".app "$APP".app/Contents "$APP".app/Contents/MacOS "$APP".app/Contents/Resources |
|
|
116 | |
|
|
117 | ln deliantra "$APP".app/Contents/MacOS/run |
|
|
118 | ln osx/deliantra.icns "$APP".app/Contents/Resources/ |
|
|
119 | |
|
|
120 | cat >"$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> |
|
|
159 | EOF |
|
|
160 | |
|
|
161 | rm -rf dmg |
|
|
162 | mkdir dmg |
|
|
163 | |
|
|
164 | mv "$APP.app" dmg/ |
|
|
165 | |
|
|
166 | cat >dmg/README.txt <<EOF |
|
|
167 | Hello! |
|
|
168 | |
|
|
169 | This disk image contains the Deliantra MORPG game client. |
|
|
170 | |
|
|
171 | To play it, simply double-click it, then select a good graphics resolution |
|
|
172 | in the Setup => Graphics tab and then go to Setup => Login, enter a nickname |
|
|
173 | (no spaces, only ASCII letters supported) and a password, then hit Login. |
|
|
174 | |
|
|
175 | You can also install the client application by dragging it onto your |
|
|
176 | harddisk or anywhere else, but it should play perfectly fine from the disk |
|
|
177 | image. |
|
|
178 | |
|
|
179 | The game stores configuration settings, map data, music and other resources |
|
|
180 | in a hidden directory called .deliantra in your home directory. |
|
|
181 | |
|
|
182 | The script "Reset Configuration" will reset the configuration and delete |
|
|
183 | any downloaded resources. You can use this when you no longer want to play |
|
|
184 | Deliantra, or when you have problems with the settings (window too large |
|
|
185 | etc.). |
|
|
186 | |
|
|
187 | Unfortunately, Mac OS X has quite buggy OpenGL support: make sure your |
|
|
188 | monitor cable is plugged in correctly when you can't go into fullscreen or |
|
|
189 | when the graphics look broken. |
|
|
190 | |
|
|
191 | See http://www.deliantra.net/ for more info. |
|
|
192 | |
|
|
193 | EOF |
|
|
194 | |
|
|
195 | cat >dmg/"Reset Configuration" <<EOF |
|
|
196 | #!/bin/sh |
|
|
197 | |
|
|
198 | rm -rf ~/.deliantra |
|
|
199 | |
|
|
200 | echo |
|
|
201 | echo |
|
|
202 | echo |
|
|
203 | echo |
|
|
204 | echo |
|
|
205 | echo Configuration/Cache Cleared |
|
|
206 | |
|
|
207 | EOF |
|
|
208 | chmod 755 dmg/"Reset Configuration" |
|
|
209 | |
|
|
210 | # now, the last third, putting all this into a dmg |
|
|
211 | |
|
|
212 | DMG="Deliantra_MORPG_Client-$VER".dmg |
|
|
213 | |
|
|
214 | hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"$DMG" |
|
|
215 | ls -l ~user/"$DMG" |
|
|
216 | rm -rf dmg |
|
|
217 | |
|
|
218 | chmod 644 ~user/$DMG |
|
|
219 | echo http://data.plan9.de/"$DMG" |
|
|
220 | rsync -avPessh ~user/"$DMG" ruth:/var/www/data.plan9.de/. |
|
|
221 | |
|
|
222 | |
|
|
223 | |