ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/util/gendist
Revision: 1.2
Committed: Wed Jan 4 09:16:40 2012 UTC (12 years, 4 months ago) by root
Branch: MAIN
Changes since 1.1: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

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