ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/util/gendist
Revision: 1.5
Committed: Sun Mar 11 13:25:53 2012 UTC (12 years, 1 month ago) by root
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +6 -3 lines
Log Message:
*** empty log message ***

File Contents

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