-
Notifications
You must be signed in to change notification settings - Fork 0
/
gigalomania_source.txt
231 lines (131 loc) · 9.81 KB
/
gigalomania_source.txt
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
This source has been tested with Visual C++ Express 2012 for Desktop under Windows 8, GCC under Linux (Ubuntu 14.04 64 bit) and AROS x86 (Icaros 1.5), XCode under OS X, on a Nokia N900 for Maemo, and a Nokia N950 for Meego.
Linux
=====
You need to install the following libraries: SDL2 ( http://www.libsdl.org/ ), SDL2_Image ( http://www.libsdl.org/projects/SDL_image/ ), SDL2_Mixer ( http://www.libsdl.org/projects/SDL_mixer/ ).
Note that since v0.27, Gigalomania uses SDL 2 rather than SDL 1.2.
On Ubuntu and Debian, you can install the required libraries with:
sudo apt-get install libsdl2-dev
sudo apt-get install libsdl2-image-dev
sudo apt-get install libsdl2-mixer-dev
To compile Gigalomania, open a terminal window in the Gigalomania folder, and type: make
This will produce the Gigalomania executable, which you can run with: ./gigalomania
To run in windowed mode, run:
./gigalomania windowed
Linux installation:
You can install Gigalomania by typing (still from the source directory): sudo make install
This means that you can then run the game by typing gigalomania at a terminal (without being in the source directory).
It will also (at least in GNOME) add shortcuts to the menu Applications/Games/.
Uninstallation can be done with: sudo make uninstall
Packages can also be created using debuild.
If SDL 2 isn't available on your distribution, you can also compile with SDL 1.2, though some changes are required:
* The #include directories in stdafx.h, image.h, sound.h need to be changed from SDL2/ to SDL/ .
* References to sdl2-config in the makefile should be changed to sdl-config, and should link to "-lSDL_image -lSDL_mixer" instead of "-lSDL2_image -lSDL2_mixer".
On Ubuntu and Debian, you can install the required libraries for SDL 1.2 with:
sudo apt-get install libsdl1.2-dev
sudo apt-get install libsdl-image1.2-dev
sudo apt-get install libsdl-mixer1.2-dev
Windows
=======
You need additional files to compile this program:
SDL2: sdl2.lib . See http://www.libsdl.org/ .
SDL2_image: sdl_image2.lib . See http://www.libsdl.org/projects/SDL_image/ .
SDL2_mixer: sdl_mixer2.lib . See http://www.libsdl.org/projects/SDL_mixer/ .
When built on Visual Studio in Release mode, you can use the makewindowsarchive.bat script to create the binary folder (in c:\temp\ ).
Note that the "VC++ Directories" section of the Gigalomania projects is set to refer to the location of the SDL 2 headers on my system, so you should update this for your setup. Gigalomania can also be compiled with SDL 1.2, though SDL 2 is preferred.
OS X
====
To compile on OS X, you need XCode (from http://dev.apple.com/ ) and port (from http://www.macports.org/ ). You can then install the required libraries with:
sudo port install libsdl
sudo port install libsdl_image
sudo port install libsdl_gfx
sudo port install libsdl_mixer
To build, type:
make
And to run:
./gigalomania
Maemo
=====
Gigalomania can be compiled on Maemo devices (e.g., Nokia N900). The method should be similar to Linux (see above). One difference is that (un)installation should be performed with the commands:
sudo make install_maemo
sudo make uninstall_maemo
When running from the command line, you'll need to do:
./gigalomania fullscreen onemousebutton mobile_ui
to get the correct options for mobile touchscreen devices. When installed and launched from the applications menu, this should happen automatically.
If SDL2 isn't available, follow the instructions for compiling with SDL 1.2 on Linux, above.
Meego
=====
The method should be the same as for Maemo (see above), but with the installation commands:
sudo make install_meego
sudo make uninstall_meego
AROS
====
AROS ( http://aros.sourceforge.net/ ) is an Open Source operating system compatible with AmigaOS. The distribution Icaros ( http://vmwaros.blogspot.co.uk/ ) makes it easy to run on a virtual machine on an x86 PC.
A different makefile is needed for AROS, so use the command:
make -f makefile_aros
This will produce the Gigalomania executable, which you can run with: gigalomania
Or run fullscreen with: gigalomania fullscreen
Note that Gigalomania requires a large stack - it seems to work okay with the AROS Shell default of 1024000 bytes.
After building, you can use the makearosarchive script to create the binary folder (in RAM: ). This makes use of icons in the aros/ folder.
Hopefully this should work on any AROS platform, but I've only tested this on x86.
MorphOS
=======
As with AROS, a different makefile is needed for MorphOS, so use the command:
make -f makefile_aros
This will produce the Gigalomania executable, which you can run with: gigalomania
Or run fullscreen with: gigalomania fullscreen
As with AROS, a large stack may be required (e.g., 1024000 bytes).
Note that some stability problems have been reported, which is why this is still a source-only release for MorphOS - please let me know if you have any solutions/ideas (or alternatively, if it runs fine on your system).
If you want to make a binary archive, there are some icons to use in the aros/ folder.
AmigaOS 4
=========
As with AROS, a different makefile is needed for AmigaOS 4, so use the command:
make -f makefile_aos4
This will produce the Gigalomania executable, which you can run with: gigalomania
Or run fullscreen with: gigalomania fullscreen
As with AROS, a large stack may be required (e.g., 1024000 bytes).
If you want to make a binary archive, there are some icons to use in the amigaos4/ folder.
Android
=======
You need the source archives of:
SDL2: sdl2.lib . See http://www.libsdl.org/ .
SDL2_image: sdl_image2.lib . See http://www.libsdl.org/projects/SDL_image/ .
SDL2_mixer: sdl_mixer2.lib . See http://www.libsdl.org/projects/SDL_mixer/ .
I've tested this with version 2.0.0 of the SDL, SDL_image and SDL_mixer sources.
See README-android.txt in the SDL source archive for some information. You need to obtain the Android SDK and Android NDK. Then create the Gigalomania folder as follows:
1. Copy the android/Gigalomania project into your workspace.
2. Copy the Gigalomania source files (*.cpp, *.h) into jni/src/
3. Copy the gfx/, islands/, music/ and sound/ folders into assets/
4. Copy the source from SDL2, SDL2_image, SDL2_mixer into jni/ (so you have folders jni/SDL/, jni/SDL_image/, jni/SDL_mixer/; each of these folders should be the root folder for the SDL sources - e.g., so inside jni/SDL/ will be folders such as acinclude/, include/, src/ etc).
5. You need to configure the file jni/SDL_image/Android.mk: comment out the lines SUPPORT_WEBP and WEBP_LIBRARY_PATH (by adding a # to the start of the lines).
6. You need to configure the file jni/SDL_mixer/Android.mk: comment out the lines SUPPORT_MOD_MODPLUG, MODPLUG_LIBRARY_PATH, SUPPORT_MOD_MIKMOD, MIKMOD_LIBRARY_PATH, SUPPORT_MP3_SMPEG and SMPEG_LIBRARY_PATH (by adding a # to the start of the lines).
7. Before running from Eclipse, the native C++ files need to be compiled. On Windows, this can be done from the command prompt by cd-ing to the Gigalomania folder, and running the ndk-build.cmd command from the Android NDK (e.g.: C:\android-ndk-r9\ndk-build.cmd ). Note that this needs to be done every time you change one of the native C++ files.
Note that versions 0.26 an earlier used Qt/necessitas for Android. Now Android is compiled using SDL 2.
Symbian
=======
Versions 0.26 and earlier supported Symbian (via Qt), but this has now been dropped for 0.27 onwards.
Source Control
==============
Since version 0.23, I've released the source online using Git, at https://sourceforge.net/p/gigalomania/code . Note that I work with the auto crlf turned off (otherwise it converts all the Linux line endings into Windows format, since I develop on Windows, which messes things up for the Linux source release). If you want to work on the source, please check out the latest version from the repository.
History
=======
Note, this history is only for changes related to the source code. See the Gigalomania readme or homepage for a full history.
Version 0.27, Windows version now compiled with Visual C++ 2012 Express Edition. Also now using SDLmain.lib instead of SDL_main.c on Windows, and compiled with SDL 2. Linux version now compiles with SDL 2. Android port now compiled using SDL 2 instead of Qt/necessitas. Symbian port now dropped.
Version 0.26 adds the MorphOS and AmigaOS 4 ports.
Version 0.25 adds the AROS port. Also no longer using Resource files for the Qt versions.
Version 0.24 adds the Android port.
Version 0.23 adds online Git repository.
Version 0.22 adds support for Qt (primarily for Nokia Symbian smartphone support). Also ported to Maemo and Meego.
Version 0.19 onwards supports installation on Linux rather than just running from the source folder.
Version 0.18 onwards uses SDL_Mixer instead of FMOD. Windows version now compiled with Visual C++ 2010 Express Edition.
Version 0.16 fixed the includes for FMOD to look in the fmodex/ folder (if you had things set up to compile with previous versions, you may need to fix the FMOD install - see the instructions above).
Version 0.13 onwards requires at least SDL 1.2.10 on Linux (for current_w/current_h in SDL_VideoInfo).
Version 0.11 onwards uses FMOD 4 instead of the earlier FMOD 3.x versions.
Versions 0.6 and earlier compiled under Borland C++ Builder Pro 4, but support for this is now removed.
Versions 0.4 and earlier used FreeImage, but this has been replaced with SDL_image.
Licence
=======
Gigalomania is released under the GPL v2 or later.
Please contact me if you have suggestions, bug fixes or whatever: mark dot harman at ntlworld dot com .
Homepage: http://homepage.ntlworld.com/mark.harman/comp_gigalomania.html
More info on OS X port: http://www.herzig-net.de/prog/?page=prog-macgiga
Mark Harman 27 April 2014