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.1 by root, Tue Aug 19 21:48:28 2008 UTC vs.
Revision 1.2 by root, Wed Aug 20 00:46:12 2008 UTC

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
5PERL=/opt/local 5PERL=/opt/local
6PERLLIB=/usr/lib/perl5 6PERLLIB=/usr/lib/perl5
7PANGO=1.6.0 7PANGO=1.6.0
8
9umask 022
8 10
9if false; then 11if 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
16 make install || exit 18 make install || exit
17 make clean 19 make clean
18 ) 20 )
19 done 21 done
20fi 22fi
23
24if true; then
21 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"
90#$PERL/bin/perl Makefile.PL 94#$PERL/bin/perl Makefile.PL
91make install || exit 95make install || exit
92 96
93DYLD_LIBRARY_PATH=/opt/local/lib \ 97DYLD_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
104
105fi
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
110VER=$(perl -e 'require "DC.pm"; print $DC::VERSION')
111APP="Deliantra MORPG Client $VER"
112
113rm -rf "Deliantra MORPG Client "*.app
114
115mkdir "$APP".app "$APP".app/Contents "$APP".app/Contents/MacOS "$APP".app/Contents/Resources
116
117ln deliantra "$APP".app/Contents/MacOS/run
118ln osx/deliantra.icns "$APP".app/Contents/Resources/
119
120cat >"$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>
159EOF
160
161rm -rf dmg
162mkdir dmg
163
164mv "$APP.app" dmg/
165
166# now, the last third, putting all this into a dmg
167
168hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"Deliantra_MORPG_Client-$VER".dmg
169ls -l ~user/"Deliantra_MORPG_Client-$VER".dmg
170rm -rf dmg
99 171
100 172
173

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines