Linux
=====

(The source has been tested on Ubuntu 16.04.3 LTS 64-bit.)

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 g++
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

If when compiling you set a #define of DATADIR, then Gigalomania will look there for data (note it will still try first in the same directory as the executable, but if the data isn't there, it will then check DATADIR). This can be useful for packaging, if you want to store the data in a different directory. E.g., pass the define in the makefile as (note both single and double quotes):

-DDATADIR='"/usr/share/games/gigalomania"'

If SDL 2 isn't available on your distribution, it should also be possible to compile with SDL 1.2, though this is no longer tested. You'll need to make some modifications to the code (changing includes from SDL2/ to SDL/ ). Also 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
=======

(The source has been tested using Visual Studio Community Edition 2017 on Windows 10 64 bit.)

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\ ).

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

For more info on the OS X port, see http://www.herzig-net.de/prog/?page=prog-macgiga .

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.

(The source has been tested on AROS x86 with Icaros 2.0.3.)

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.5 of SDL, 2.0.1 of SDL_image and 2.0.1 of SDL_mixer.

See README-android.txt in the SDL source archive for some information. You need to obtain the Android SDK (Android Studio). Then see instructions at https://developer.android.com/studio/projects/add-native-code.html for how to install/enable the NDK in Android Studio (note, Gigalomania/SDL uses ndk-build rather than CMake).

Then create the Gigalomania folder as follows:

1. Copy the android/Gigalomania project into your Android Studio projects folder.
2. Copy the Gigalomania source files (*.cpp, *.h, and the TinyXML subfolder) into app/src/main/jni/src/ .
3. Copy the source from SDL2, SDL2_image, SDL2_mixer into app/src/main/jni/ (so you have folders app/src/main/jni/SDL/, app/src/main/jni/SDL_image/, app/src/main/jni/SDL_mixer/; each of these folders should be the root folder for the SDL sources - e.g., so inside app/src/main/jni/SDL/ will be folders such as acinclude/, include/, src/ etc). 
4. Copy the gfx/, islands/, music/ and sound/ folders into app/src/main/assets/ .
4b. Copy the files inside gfx_android_extras/ into assets/gfx/ (so you have assets/gfx/starfield.png etc). Optionally, the files starfield.jpg and stars.jpg can be deleted. (This is because JPEG support in SDL_image 2 on Android is currently broken.)
5. Configure the file jni/SDL_image/Android.mk: ensure that SUPPORT_JPG and SUPPORT_WEBP set to false.
6. You need to configure the file jni/SDL_mixer/Android.mk: set SUPPORT_MOD_MODPLUG, SUPPORT_MOD_MIKMOD and SUPPORT_MP3_SMPEG to false.

Then open the project in Android Studio. It will take some moments to initialise the project. When you run, the project will build - note that it can take several minutes to build the complete project.

Note that versions 0.27 and 0.28 used Eclipse instead of Android Studio. Versions 0.26 and earlier used Qt/necessitas for Android instead of SDL 2.

Symbian
=======

Versions 0.26 and earlier supported Symbian (via Qt), but this has now been dropped for 0.27 onwards.

Qt Creator
==========

Qt Creator can also be used as an IDE. (Note that this means using the Qt environment purely as an IDE, not for its APIs/libraries.)

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 1.0 uses Android Studio instead of Eclipse for Android.

Version 0.28 adds support for Qt Creator as an IDE. Debian and Maemo/Meego packaging info was removed from main source archive.

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 DOT apps AT gmail DOT com  .

Homepage: http://gigalomania.sourceforge.net/

Mark Harman 4 January 2018
