… | |
… | |
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 |
… | |
… | |
16 | make install || exit |
18 | make install || exit |
17 | make clean |
19 | make clean |
18 | ) |
20 | ) |
19 | done |
21 | done |
20 | fi |
22 | fi |
|
|
23 | |
|
|
24 | if 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 |
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 |
|
|
104 | |
|
|
105 | fi |
|
|
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 | # now, the last third, putting all this into a dmg |
|
|
167 | |
|
|
168 | hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO ~user/"Deliantra_MORPG_Client-$VER".dmg |
|
|
169 | ls -l ~user/"Deliantra_MORPG_Client-$VER".dmg |
|
|
170 | rm -rf dmg |
99 | |
171 | |
100 | |
172 | |
|
|
173 | |