Packaging Dune Legacy
Source Code
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.14-mingw32.tar.gz
http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-devel-1.2.11-VC.zip
Put the headers under /usr/i586-mingw32msvc/include and the lib files under /usr/i586-mingw32msvc/lib.
To cross-compile and create a Windows installer for Dune Legacy run the following command:
./buildcrosswin32.sh