1 |
#!/bin/sh |
2 |
|
3 |
umask 022 |
4 |
|
5 |
export EXE_VER=A$(printf "%08x" $(( $(date +%s) - 1325129120))) |
6 |
|
7 |
echo "$EXE_VER" >dist/exe_ver |
8 |
|
9 |
mkdir -p dist/bin |
10 |
|
11 |
for dist in dist/*.vars; do |
12 |
dist="${dist##*/}" |
13 |
dist="${dist%.vars}" |
14 |
|
15 |
echo "$dist" |
16 |
. dist/"$dist".vars |
17 |
|
18 |
urlader-util --urlader urlader/prebuilt/$G_URLADER --windows-icon util/client.ico \ |
19 |
--pack deliantra_S-$G_OS-$G_ARCHNAME $EXE_VER dist/"$dist" \ |
20 |
$G_ENVVARS $G_COMMAND \ |
21 |
>dist/"$dist".bin |
22 |
chmod 755 dist/"$dist".bin |
23 |
done |
24 |
|
25 |
rm -f urlader.exe |
26 |
|
27 |
# linux 'wants' .tar.gz |
28 |
|
29 |
for arch in x86 amd64; do |
30 |
( |
31 |
cd dist || exit |
32 |
ln -f linux-$arch.bin deliantra-gnu-linux-$arch |
33 |
tar cf deliantra-gnu-linux-$arch.tar deliantra-gnu-linux-$arch |
34 |
rm -f deliantra-gnu-linux-$arch |
35 |
gzip -9vf deliantra-gnu-linux-$arch.tar |
36 |
mv deliantra-gnu-linux-$arch.tar.gz bin |
37 |
) || exit |
38 |
done |
39 |
|
40 |
# windows is just the exe |
41 |
|
42 |
ln -f dist/windows-x86.bin dist/bin/deliantra.exe |
43 |
|
44 |
# os x demands extra stuff |
45 |
|
46 |
rm -rf dist/dmg |
47 |
mkdir dist/dmg |
48 |
|
49 |
APP="Deliantra MORPG Client" |
50 |
|
51 |
mkdir dist/dmg/"$APP".app dist/dmg/"$APP".app/Contents dist/dmg/"$APP".app/Contents/MacOS dist/dmg/"$APP".app/Contents/Resources |
52 |
|
53 |
ln dist/darwin-x86.bin dist/dmg/"$APP".app/Contents/MacOS/run |
54 |
ln util/deliantra.icns dist/dmg/"$APP".app/Contents/Resources/ |
55 |
|
56 |
cat >dist/dmg/"$APP.app/Contents/Info.plist" <<EOF |
57 |
<?xml version="1.0" encoding="UTF-8"?> |
58 |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
59 |
<plist version="1.0"> |
60 |
<dict> |
61 |
<key>CFBundleDevelopmentRegion</key> |
62 |
<string>English</string> |
63 |
<key>CFBundleDisplayName</key> |
64 |
<string>Deliantra MORPG Client</string> |
65 |
<key>CFBundleExecutable</key> |
66 |
<string>run</string> |
67 |
<key>CFBundleGetInfoString</key> |
68 |
<string>Deliantra MORPG Client (www.deliantra.net)</string> |
69 |
<key>CFBundleIconFile</key> |
70 |
<string>deliantra.icns</string> |
71 |
<key>CFBundleIdentifier</key> |
72 |
<string>net.deliantra.client</string> |
73 |
<key>CFBundleInfoDictionaryVersion</key> |
74 |
<string>6.0</string> |
75 |
<key>CFBundleName</key> |
76 |
<string>Deliantra MORPG Client</string> |
77 |
<key>CFBundlePackageType</key> |
78 |
<string>APPL</string> |
79 |
<key>CFBundleShortVersionString</key> |
80 |
<string>$(date "+%Y.%m.%d.%H.%M.%S")</string> |
81 |
<key>CFBundleVersionString</key> |
82 |
<string>$(date "+%Y.%m.%d.%H.%M.%S")</string> |
83 |
<key>LSHasLocalizedDisplayName</key> |
84 |
<false/> |
85 |
<key>LSMinimumSystemVersion</key> |
86 |
<string>10.5</string> |
87 |
<key>NSAppleScriptEnabled</key> |
88 |
<false/> |
89 |
<key>NSHumanReadableCopyright</key> |
90 |
<string>Deliantra MORPG Client - Copyright 2008,2009,2010,2011,2012 The Deliantra Team</string> |
91 |
</dict> |
92 |
</plist> |
93 |
EOF |
94 |
|
95 |
cat >dist/dmg/README.txt <<EOF |
96 |
Hello! |
97 |
|
98 |
This disk image contains the Deliantra MORPG game client. |
99 |
|
100 |
The client has been compiled for Intel systems only. |
101 |
|
102 |
The client uses a lot of right mouse button click pop-up menus, to emulate |
103 |
a right-click with a mouse that has only one button, use ctrl-click. |
104 |
|
105 |
To play it, simply double-click it, then select a good graphics resolution |
106 |
in the Setup => Graphics tab and then go to Setup => Login, enter a nickname |
107 |
(no spaces, only ASCII letters supported) and a password, then hit Login. |
108 |
|
109 |
You can also install the client application by dragging it onto your |
110 |
harddisk or anywhere else, but it should play perfectly fine from the disk |
111 |
image. |
112 |
|
113 |
The game stores configuration settings, map data, music and other resources |
114 |
in a hidden directory called .deliantra in your home directory. |
115 |
|
116 |
The script "Reset Configuration" will reset the configuration and delete |
117 |
any downloaded resources. You can use this when you no longer want to play |
118 |
Deliantra, or when you have problems with the settings (window too large |
119 |
etc.). |
120 |
|
121 |
Unfortunately, Mac OS X has quite buggy OpenGL support: make sure your |
122 |
monitor cable is plugged in correctly when you can't go into fullscreen or |
123 |
when the graphics look broken. |
124 |
|
125 |
See http://www.deliantra.net/ for more info. |
126 |
|
127 |
EOF |
128 |
|
129 |
cat >dist/dmg/"Reset Configuration" <<EOF |
130 |
#!/bin/sh |
131 |
|
132 |
rm -rf ~/.deliantra |
133 |
|
134 |
echo |
135 |
echo |
136 |
echo |
137 |
echo |
138 |
echo |
139 |
echo Configuration/Cache Cleared |
140 |
|
141 |
EOF |
142 |
chmod 755 dist/dmg/"Reset Configuration" |
143 |
|
144 |
# now, the last third, putting all this into a dmg |
145 |
|
146 |
#DMG="Deliantra_MORPG_Client".dmg |
147 |
#hdiutil create -srcfolder dmg -volname "Deliantra MORPG Client" -ov -format UDZO "$DMG" |
148 |
#rm -rf dmg |
149 |
|
150 |
genisoimage -D -V "Deliantra MORPG Client" -no-pad -r -apple -o dist/bin/Deliantra_MORPG_Client.dmg dist/dmg |
151 |
rm -rf dist/dmg |
152 |
|
153 |
# libdmg-hfsplus - generates broken checksum |
154 |
#if dmg dmg dist/bin/Deliantra_MORPG_Client.dmg dist/bin/Deliantra_MORPG_Client.dmg~; then |
155 |
# mv dist/bin/Deliantra_MORPG_Client.dmg~ dist/bin/Deliantra_MORPG_Client.dmg |
156 |
#fi |
157 |
|
158 |
|