-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
263 lines (176 loc) · 9.83 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
/-------------------------------\
| |
| Dune Legacy 0.96 readme |
| ----------------------- |
| |
\-------------------------------/
IMPORTANT:
This software is provided as is, and you are running it at your own risk. I'm not responsible if any harm results
from you aquiring, or running this software. If you distribute this software, make sure this readme file is included.
The program Dune Legacy is an modernized clone of the excellent Westwood Studios game "Dune 2". It is ridiculusly easy to find
Dune2 on the net anyways, but I won't provide it. I think you can still even buy it from Westwood studios, so do that.
There exists a mod called Superdune 2. The PAK-Files Superdune 2 provides are nearly the same except SCENARIO.PAK.
This program would not have been created without the use of the excellent SDL library and its extensions. Thanks guys :).
Getting Started
---------------
The following PAK-files from the original Dune 2 are needed to play Dune Legacy:
HARK.PAK
ATRE.PAK
ORDOS.PAK
ENGLISH.PAK
DUNE.PAK
SCENARIO.PAK
MENTAT.PAK
VOC.PAK
MERC.PAK
FINALE.PAK
INTRO.PAK
INTROVOC.PAK
SOUND.PAK
GERMAN.PAK (for playing in German)
FRENCH.PAK (for playing in French)
It depends on your system and installation where to put these files. LEGACY.PAK is supplied with Dune Legacy and is already
in the data directory. All the other files should be copied there too. If you are not allowed to copy files there you may
copy these files inside the dunelegacy configuration directory (e.g. ~/.config/dunelegacy/data/ on unix).
Linux:
It depends on how the game was compiled. Normally you should put these files under /usr/share/dunelegacy/ or /usr/local/share/dunelegacy/ .
Just look for LEGACY.PAK. If you do not have root access to your system you should put them in your home directory under ~/.config/dunelegacy/data/ .
Windows:
The installer has already asked for the files and put them in the installation directory. If not put the PAK-files inside your installation folder or
if you do not have administrator privileges you should put them to C:\Documents and Settings\<YourName>\Application Data\dunelegacy\data\ .
MAC OS X:
The PAK-files have to be copied inside the application bundle. If you have followed the steps in the supplied dmg you have already copied them there.
Otherwise just right-click on the bundle and select "Show Bundle Content". Then navigate into "Contents" and then into "Resources". There you will
find LEGACY.PAK. Put the other PAK-files there too. Alternativly you can put them in your home directory under ~/.config/dunelegacy/data/ but putting
them inside the application bundle is the preferred way.
Keyboard Shortcuts
------------------
General Keyboard Shortcuts:
Escape - Go to menu
Space - Pause game
Alt + Enter - Toggle fullscreen
Alt + Tab - Switch to other application
Print Key or Ctrl + P - Save screenshot as ScreenshotX.bmp with increasing numbers for X
Enter - Start/Stop chatting
Key F1 - Zoomlevel x1
Key F2 - Zoomlevel x2
Key F3 - Zoomlevel x3
Key T - Toggle display of current game time
Key F10 - Toggle sound effects and voice
Key F11 - Toggle music
Key F12 - Toggle display of FPS
Key Up, Down, Left or Right - Move on the map
Key F5 - Skip 30 seconds (only in singleplayer)
Key F6 - Skip 2 minutes (only in singleplayer)
Key - - Decrease gamespeed (only in singleplayer)
Key + - Increase gamespeed (only in singleplayer)
Ctrl + (Key 1 to Key 9) - Save the list of selected units as unit group 1 to 9
Key 1 to Key 9 - Select units from unit group 1 to 9
Shift + (Key 1 to Key 9) - Add all units from unit group 1 to 9 to the list of currently selected units
Key 0 - Deselect all currently selected units
Ctrl + Key 0 - Remove currently selected units form all unit groups (group 1-9)
Key M - Order unit to move to some position
Key A - Order selected units to attack some unit, structure or position
Key R - Repair selected structure or return selected harvester
Key U - Upgrade selected structure
Key P - Place a structure (if a construction yard is selected)
Map Editor:
Print Key or Ctrl + P - Save a picture of the whole map as <Mapname>.bmp
Ctrl + Z - Undo last edit
Ctrl + Y - Redo last edit
Configuration file
------------------
If you want to fine tune the configuration of Dune Legacy you might want to take a look at the configuration file "Dune Legacy.ini". Depending on your system it
is either placed in ~/.config/dunelegacy (on Linux), ~/Library/Application Support/Dune Legacy (on Mac OS X) or in C:\Documents and Settings\<YourName>\Application Data\dunelegacy\ (on Windows).
Internet Game
-------------
To play online via Internet you have to manually enable port forwarding if you use a NAT Router. Forward the Dune Legacy Server Port (Default is 28747) from your NAT Router to your computer. Use the same port on your router as configured in Dune Legacy.
Example: If your machine has IP 192.168.123.1 and your using the default Dune Legacy Port, than forward port 28747 from your router to 192.168.123.1:28747.
--------------------------------------------------------------
IRC: #dunelegacy @ irc.freenode.net
Web: http://sourceforge.net/projects/dunelegacy
This file provides information on how to build and install Dune Legacy.
Prerequirements
---------------
- gcc or any other standard compliant C++ compiler
- autotools
- SDL 1.2
- SDL-mixer
Building
--------
Dune Legacy can read the needed data from different locations. If you want
to keep everything in one directory you should use the first method. You also
may decide to install Dune Legacy on your system. The use the second method.
Method 1: Data read from local directory
----------------------------------------
Extract the Dune Legacy source code and run at the top level directory
the following command:
autoreconf --install
./buildlocal.sh
This will configure and build Dune Legacy and you will find afterwards
a "dunelegacy" binary in the top level directory. The data is read from
the data subdirectory. There you shoud copy all the PAK-files from Dune 2
Method 2: Install Dune Legacy on your system
--------------------------------------------
Extract the Dune Legacy source code and run at the top level directory
the following commands:
autoreconf --install
./configure
make
make install
You may decide to change configure's default prefix to something else, e.g.
./configure --prefix=/usr
Updating localization
---------------------
Dune Legacy uses po files as generated by gettext. To update the template file data/locale/dunelegacy.pot and update the localizations in the *.po files run
./updatelocale.sh
To create a new locale run the following command (replacing "de" with your locale)
msginit --locale=de --input=dunelegacy.pot --output=German.de.po
Packaging/Distributions
------------
Source:
To package the source code go to the build directory and type
make dist-bzip2
This creates dunelegacy-?.tar.bz2. You might want to add a "src" to the name to get dunelegacy-?-src.tar.bz2
Debian/Ubuntu:
Make sure you have the following packages installed: build-essential, debhelper, autoconf, libsdl1.2-dev and libsdl-mixer1.2-dev
Extract the source code from the bz2 file and change inside the source root directory (which contains configure). From there you run the following command:
dpkg-buildpackage -rfakeroot
You will get a dunelegacy_0.96-1_*.deb file one directory above.
Fedora:
You need the source tarball (see Packaging/Source in this file) and the following packages: rpm-build, gcc, gcc-c++, libstdc++-devel, SDL-devel, SDL_mixer-devel. Then run the following command:
rpmbuild -tb dunelegacy-?-src.tar.bz2
Under ~/rpmbuild/RPMS/<arch> you will find the created rpm file.
Gentoo:
There is an ebuild available. Go to your local portage tree and create the directory games-strategy/dunelegacy. Put the ebuild there and run
ebuild dunelegacy-?.ebuild digest
emerge dunelegacy
Mac OS X:
Open the XCode-Project from IDE/xCode/Dune Legacy.xcodeproj and build Dune Legacy. The resulting bundle will be put under IDE/xCode/build/Release.
Now go to the folder MacOSX and extract Dune Legacy.dmg.zip and then mount Dune Legacy.dmg. Put the compiled Dune Legacy bundle into the mounted dmg and unmount it afterwards.
Zip the dmg again to save a lot of download bandwidth.
Windows:
Use Code::Blocks to build the exe which will be placed in the data directory. The following DLLs are needed to run dunelegacy.exe:
libogg-0.dll
libvorbis-0.dll
libvorbisfile-3.dll
SDL.dll
SDL_mixer.dll
smpeg.dll
Copy them in the data directory. To create a installer you need NSIS. Compile dunelegacy.nsi with the NSIS compiler to create the installer.
Cross-compiling Windows Version on Linux:
To compile the Windows version on Linux you need to setup the mingw cross-compiler. On Debian/Ubuntu install the packages gcc-mingw32 and nsis.
You need SDL and SDL-mixer development files for Windows (This is not the same as the development files for Linux):
http://www.libsdl.org/release/SDL-devel-1.2.15-mingw32.tar.gz
http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-devel-1.2.12-VC.zip
Put the headers under /usr/i686-mingw32msvc/include and the lib files under /usr/i686-mingw32msvc/lib.
To cross-compile and create a Windows installer for Dune Legacy run the following command:
./buildcrosswin32.sh
Running unit tests
------------------
To run the unit tests from the tests directory simply run the following script
./runUnitTests.sh
Running cppcheck
----------------
cppcheck is a static analysis. The following command will run it on the source and write all errors/warnings to cppcheck.log:
cppcheck -j 5 --suppress=cstyleCast --enable=all -I include . 2> cppcheck.log