Syndicate Wars Port, alternative binary for the classic Bullfrog game.
This is continuation of the project created by Unavowed and Gynvael Coldwind.
Syndicate Wars Port is a port of the 1996 DOS game Syndicate Wars to modern operating systems. In particular, it runs on GNU, Mac OS and Windows, but it should also work on any system supported by the SDL library on the i386 architecture.
The port was created by disassembling the original DOS executable and replacing the DOS-specific parts with platform-independent code, using SDL for input and video display, Vorbis for music and OpenAL for sound.
Only the modernised executable is provided with this port. This means that game data are not included. To install the Syndicate Wars Port, you will need to have the original data from either Syndicate Wars CD, or digital distribution.
If you wish to discuss the Syndicate Wars Port or if you have any problems, you may post to the Google group syndicate-wars-port (you don't need to be a member to post).
To install Syndicate Wars Port, you will need either the original Syndicate Wars CD, or digital distribution of the game. There were several physical versions released. The multi-lingual version was tested and will definitely work, other version were not tested. Only releases for PC can be used.
The CD version which you use narrows the range of available languages.
eng
fre
ita
spa
swe
,ger
,eng
fre
jap
, but asian fonts
are not supported by the port.The steps you need to take vary depending on your operating system.
If you're installing on GNU or UNIX, you will have to compile from source. The steps are:
make install
in the directory where build
commands were executed, to copy built files into an installation folder
(/usr/local/share/swars
by default)/media/cdrom
)util/install -f SOURCE -t TARGET -l LANG
, where
/media/cdrom
,/usr/local/share/swars
,eng
fre
ger
ita
spa
swe
.If all went well, you can now play the game.
There is support for creating Mac OS X bundles. While you can just install the game into the UNIX directory structure, using a bundle is a cleaner solution.
If you build an application bundle, you can install the game by just drag-and-drop into your Applications directory.
You can create the bundle by following these instructions:
./data
(in case you wonder, the CD drive should be mounted under
/Volumes/SYN WARS QA 9.0
)util/mkbundle ./data
(replacing ./data
with the directory
you installed the data to); this will produce an application bundle named
Syndicate Wars.app
in the current directoryres/swars.icns
to Syndicate Wars.app/Contents/Resources
There are two ways to install Syndicate Wars Port on Windows - either download the installer, or download the source code and compile it by hand. It is recommended to use the installer!
The installer requires the original Syndicate Wars CD to be present in the CD-ROM drive. It will copy the files from the original Syndicate Wars CD and optionally encode the game music from the CD to ogg files used by this port.
The Syndicate Wars CD is not required to play the game, it is used only during the installation process.
If you've decided on the hand-compilation option, proceed with the following steps:
Game
directory within the Syndicate Wars CD to the location of your
desire, say SWarsLocation
.sound.dat
, from the game\language\LANGUAGE\
from
the Syndicate Wars CD to the SWarsLocation\Data
directory, where LANGUAGE
stands for the appropriate subdirectory fo the language you wantsound.dat
file (from the directory stated above) to the
SWarsLocation\sound
directorytrack_{1,2,3}.ogg
(vorbis)SWarsLocation\music
directory and copy the
previously encoded ogg files thereswars.exe
and conf
folder to your
SWarsLocation
directorylang
directory to SWarsLocation
and
rename it to language
, so that ie. files for english are within
SWarsLocation\language\eng\
If instead ob the above points you prefer more technical description on what to
copy and where, read the script util/install
which is used to perform
installation on GNU or UNIX systems. If your Windows has a Linux subsystem
istalled, you may even use it to perform the installation automatically - see
GNU or UNIX chapter for details.
You can now launch swars.exe
and have fun!
Note that you can oly build the port for x86 architecture, and you either need 32-bit OS, or 64-bit OS with 32-bit user space libraries available.
To build Syndicate Wars Port, you will need the following:
Once you've made sure you have the above, proceed with the following steps:
swars
source release (containing conf
, doc
, src
etc.)autoreconf -if
to create build scripts from templates./configure
to make the build scripts find required toolchain and librariesmake
to compile the executable fileYou should now have a working src/swars
executable file.
Here are specific commands required to compile the executable on Ubuntu linux.
Install the dependencies - remember that some must be 32-bit (i386):
sudo apt install gcc-multilib g++-multilib lib32z1
sudo apt install python3 python3-polib
sudo apt install vorbis-tools
sudo apt install cdparanoia
sudo apt install libsdl1.2-dev:i386
sudo apt install libopenal-dev:i386
sudo apt install libvorbis-dev:i386 libvorbisfile3:i386
sudo apt install libogg-dev:i386
sudo apt install libwildmidi-dev:i386
Now as our host is ready, we can start working on the actual swars
sources.
Go to that folder, and generate build scripts from templates using autotools:
autoreconf -ivf
Next, proceed with the build steps; we will do that in a separate folder.
mkdir -p release; cd release
PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig" CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" ../configure --without-sdl2
make V=1
Providing PKG_CONFIG_PATH
allows us to tell pkg-config
command where to
search for 32-bit packages (it would use a path to 64-bit ones by default).
The V=1
variable makes make
print each command it executes, which makes
diagnosing issues easier.
In case you also want a debug build:
mkdir -p debug; cd debug
PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig" CPPFLAGS="-DDEBUG -D__DEBUG" CFLAGS="-m32 -g -O0 -Wall" CXXFLAGS="-m32 -g -O0 -Wall" LDFLAGS="-m32 -g -O0 -Wall" ../configure --without-sdl2
make V=1
Explanation of the parameters:
-g -O0
flags make it easier to use a debugger like GDB with the
binary, by storing symbols and disabling code optimizations.-Wall
flags enable displaying more warnings during compilation.-DDEBUG -D__DEBUG
defines make the binary store more information in
error.log
file. First one enables verbose logging from application code,
second does the same for libraries used.CPP
), compilers (C
, CXX
)
and linker (LD
). See GNU Automake documentation
for details on that.Some tests to verify the build are included in the project. To execute them:
make V=1 check
Using Minimal System and the MinGW toolchain available within, it is possible to build the executable using the same way as for UNIX systems, with bash and autotools.
First install the dependencies - mingw32, since we need 32-bit toolchain:
pacman -S mingw-w64-i686-binutils mingw-w64-i686-pkgconf mingw-w64-i686-make mingw-w64-i686-gcc
pacman -S mingw-w64-i686-libpng
pacman -S mingw-w64-i686-SDL
pacman -S mingw-w64-i686-openal
pacman -S mingw-w64-i686-libvorbis
pacman -S mingw-w64-i686-libogg
The WildMIDI library is not available as MSYS2 pacman package, install manually:
pacman -S unzip
wget https://github.com/Mindwerks/wildmidi/releases/download/wildmidi-0.4.5/wildmidi-0.4.5-win32.zip
unzip wildmidi-0.4.5-win32.zip
cp wildmidi-0.4.5-win32/*.h /mingw32/include/
cp wildmidi-0.4.5-win32/*.a /mingw32/lib/
cp wildmidi-0.4.5-win32/*.dll /mingw32/bin/
The Python interpeter needs to have an additional module installed:
pip install polib
Make sure the modules are installed on the Python version used during build - with MSYS2,
you often get separate i686
and x86_64
versions of Python. For both of them, you
can separately install pip
package, and then add any missing modules through it.
To select specific python3
or pip
at command line, alter the PATH
variable,
like in some commands in later part of the instructions.
Now as our host is ready, we can start working on the actual swars
sources.
We will still have to provide paths to 32-bit configuration - MSYS will prefer
folders with data for 64-bit building.
Go to the swars
folder, and generate build scripts from templates using autotools:
autoreconf -ivf --include=/mingw32/share/aclocal/
Next, proceed with the build steps; we will do that in a separate folder. Note how we are modifying PATH and PKG_CONFIG_PATH environment variables to make shell search for mingw32 binaries and pkg-config search for mingw32 packages before the default mingw64 ones:
mkdir -p release; cd release
PATH="/mingw32/bin:$PATH" PKG_CONFIG_PATH="/mingw32/lib/pkgconfig" CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" ../configure --prefix=/mingw32 --without-sdl2
PATH="/mingw32/bin:$PATH" make V=1
Mac OS X is at its core a UNIX system. To build the Syndicate Wars Port it is enough to follow the general building instructions.
The GCC compiler for Mac OS X comes as part of XCode, which you can get from Apple's web site. You can also make your life a lot easier by using Fink or MacPorts to install the required packages for you, instead of having to download and compile them manually.
If you have Mac OS 10.6 ("Snow Leopard") or newer, you will need to make sure
that your libraries contain code for the i386 architecture. In MacPorts this
is achieved by using the +universal
variant (e.g. port -vu install libsdl +universal
).
When you configure your compilation toolchain and location of libraries,
you will need to pass CFLAGS="-arch i386"
, like so:
./configure CFLAGS="-arch i386"
If you are planning to create Mac OS app bundle,
you will also need to pass data-path
, so youf final command will be:
./configure --with-data-path="Syndicate Wars.app/Contents/Resources" CFLAGS="-arch i386"
Then, do make
as the general building instructions tell.
That's all. Have a nice play!