ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/makebin.osx
(Generate patch)

Comparing deliantra/Deliantra-Client/makebin.osx (file contents):
Revision 1.2 by root, Wed Aug 20 00:46:12 2008 UTC vs.
Revision 1.17 by root, Sat Apr 24 06:27:40 2010 UTC

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#port install libsdl libsdl_mixer libsdl_image libvorbis libpng jpeg pango db46 libogg p5-libwww-perl p5-yaml
6# need to patch libSDL_image from /opt/local/lib/libjpeg.dylib to ./libjpeg.62.dylib
7# ln -s db46/db.h /opt/local/include
8# ln -s db46/libdb.dylib /opt/local/lib
9# /opt/local/bin/cpan Pod::POM
10
11#export MACOSX_DEPLOYMENT_TARGET=10.3 # maybe it helps
12#export MACOSX_DEPLOYMENT_TARGET=10.5 # nope
13
14cvs update
4 15
5PERL=/opt/local 16PERL=/opt/local
6PERLLIB=/usr/lib/perl5 17PERLLIB=/usr/lib/perl5
7PANGO=1.6.0
8 18
9umask 022 19umask 022
10 20
11if false; then 21if true; then
12 for mod in AnyEvent EV JSON-XS Deliantra Compress-LZF BDB; do 22 for mod in common-sense AnyEvent EV JSON-XS deliantra/Deliantra Compress-LZF BDB Guard; do
13 ( 23 (
24 mkdir -p /root/src/$mod || exit 77
14 cd /root/src/$mod 25 cd /root/src/$mod
26 set -x
27 pwd
28 rsync -avPessh 10.0.0.1:src/$mod/. . --del --exclude "*.tar.gz" --delete-excluded
15 $PERL/bin/perl Makefile.PL </dev/null 29 $PERL/bin/perl Makefile.PL </dev/null
16 make clean 30 make clean
17 $PERL/bin/perl Makefile.PL </dev/null 31 $PERL/bin/perl Makefile.PL </dev/null
18 make install || exit 32 make install || exit
19 make clean 33 make clean
20 ) 34 ) || exit
21 done 35 done
22fi 36fi
23 37
24if true; then 38if true; then
25 39
50 db-4.6 \ 64 db-4.6 \
51 glib-2.0.0 gobject-2.0.0 gmodule-2.0.0 \ 65 glib-2.0.0 gobject-2.0.0 gmodule-2.0.0 \
52 pango-1.0.0 pangoft2-1.0.0 \ 66 pango-1.0.0 pangoft2-1.0.0 \
53 SDL-1.2.0 SDL_mixer-1.2.0 SDL_image-1.2.0 \ 67 SDL-1.2.0 SDL_mixer-1.2.0 SDL_image-1.2.0 \
54 vorbisfile vorbis.0 ogg.0 \ 68 vorbisfile vorbis.0 ogg.0 \
55 png12 jpeg.62 z.1 \ 69 png12 jpeg.8 z.1 \
56 fontconfig.1 expat.1 freetype.6 intl.8 iconv.2; 70 fontconfig.1 expat.1 freetype.6 intl.8 iconv.2;
57 do 71 do
58 echo "/opt/local/lib/lib$lib.dylib;shlib/darwin-2level/lib$lib.dylib" 72 echo "/opt/local/lib/lib$lib.dylib;shlib/darwin-2level/lib$lib.dylib"
59 done 73 done
60 74
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>
81EOF
82 echo "fonts.conf;root/fonts.conf"
83
84) >addlist 75) >addlist
85 76
86#cat pango.modules;exit 77#cat pango.modules;exit
87 78
88trap "rm -f addlist pango.rc pango.modules fonts.conf" 0 79trap "rm -f addlist pango.rc pango.modules fonts.conf" 0
89 80
90cd /root/src/deliantra/Deliantra-Client 81cd /root/src/deliantra/Deliantra-Client
91 82
92#$PERL/bin/perl Makefile.PL 83$PERL/bin/perl Makefile.PL
93#make clean 84make clean
94#$PERL/bin/perl Makefile.PL 85$PERL/bin/perl Makefile.PL
95make install || exit 86make install || exit
96 87
97DYLD_LIBRARY_PATH=/opt/local/lib \ 88DYLD_LIBRARY_PATH=/opt/local/lib \
98$PERL/bin/pp -C \ 89$PERL/bin/pp -C \
99 -z 9 \ 90 -z 9 \
151 <key>LSMinimumSystemVersion</key> 142 <key>LSMinimumSystemVersion</key>
152 <string>10.5</string> 143 <string>10.5</string>
153 <key>NSAppleScriptEnabled</key> 144 <key>NSAppleScriptEnabled</key>
154 <false/> 145 <false/>
155 <key>NSHumanReadableCopyright</key> 146 <key>NSHumanReadableCopyright</key>
156 <string>Deliantra MORPG Client - Copyright 2008 The Deliantra Team</string> 147 <string>Deliantra MORPG Client - Copyright 2008,2009 The Deliantra Team</string>
157</dict> 148</dict>
158</plist> 149</plist>
159EOF 150EOF
160 151
161rm -rf dmg 152rm -rf dmg
162mkdir dmg 153mkdir dmg
163 154
164mv "$APP.app" dmg/ 155mv "$APP.app" dmg/
165 156
157cat >dmg/README.txt <<EOF
158Hello!
159
160This disk image contains the Deliantra MORPG game client.
161
162The client has been compiled for Intel systems only.
163
164The client uses a lot of right mouse button click pop-up menus, to emulate
165a right-click with a mouse that has only one button, use ctrl-click.
166
167To play it, simply double-click it, then select a good graphics resolution
168in the Setup => Graphics tab and then go to Setup => Login, enter a nickname
169(no spaces, only ASCII letters supported) and a password, then hit Login.
170
171You can also install the client application by dragging it onto your
172harddisk or anywhere else, but it should play perfectly fine from the disk
173image.
174
175The game stores configuration settings, map data, music and other resources
176in a hidden directory called .deliantra in your home directory.
177
178The script "Reset Configuration" will reset the configuration and delete
179any downloaded resources. You can use this when you no longer want to play
180Deliantra, or when you have problems with the settings (window too large
181etc.).
182
183Unfortunately, Mac OS X has quite buggy OpenGL support: make sure your
184monitor cable is plugged in correctly when you can't go into fullscreen or
185when the graphics look broken.
186
187See http://www.deliantra.net/ for more info.
188
189EOF
190
191cat >dmg/"Reset Configuration" <<EOF
192#!/bin/sh
193
194rm -rf ~/.deliantra
195
196echo
197echo
198echo
199echo
200echo
201echo Configuration/Cache Cleared
202
203EOF
204chmod 755 dmg/"Reset Configuration"
205
166# now, the last third, putting all this into a dmg 206# now, the last third, putting all this into a dmg
167 207
208DMG="Deliantra_MORPG_Client-$VER".dmg
209
168hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"Deliantra_MORPG_Client-$VER".dmg 210hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"$DMG"
169ls -l ~user/"Deliantra_MORPG_Client-$VER".dmg 211ls -l ~user/"$DMG"
170rm -rf dmg 212rm -rf dmg
171 213
214chmod 644 ~user/$DMG
215echo http://data.plan9.de/"$DMG"
216rsync -avPessh ~user/"$DMG" ruth:/var/www/data.plan9.de/.
172 217
173 218
219

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines