This is a continuation of the project created by Unavowed and Gynvael Coldwind. It also incorporates one of the fixes discovered by mefistotelis related to structure packing. See http://swars.vexillium.org for details.
Usage: swars.exe [OPTIONS]
Available options:
--windowed=WxH Run in windowed mode at specified resolution. Default is 640x480
--fullwindow Run in fullscreen borderless window mode
--monitor=X Display on monitor X
--help Display the help message
- Download mingw-get-setup.exe and install it to
C:\MinGW
- In the MinGW Installation Manager, install the
mingw-developer-toolkit
package from Basic Setup - Run
C:\MinGW\msys\1.0\msys.bat
mingw-get install 'gcc=4.8.1.*'
(It's likely that a newer release would be fine but this was the version I used)mingw-get install 'libz=1.2.8.*'
- Close the
MINGW32
command prompt window - Download and extract http://swars.vexillium.org/files/swars-0.3.tar.bz2 to
C:\projects\swars-0.3
- Download
python-2.7.13.msi
from https://www.python.org/ and install it, ensuring that "Add python.exe to Path" is selected
- Download and extract the following:
- SDL-1.2.14 to
C:\projects\libs\SDL-1.2.14
- OpenAL-1.17.2 to
C:\projects\lib\openal-soft-1.17.2-bin
- libvorbis-1.3.5 to
C:\projects\lib\libvorbis-1.3.5
- libogg-1.3.2 to
C:\projects\libs\libogg-1.3.2
- libpng-1.2.37 to
C:\projects\lib\libpng-1.2.37-bin
- libpng-1.2.37 developer files to
C:\projects\lib\libpng-1.2.37-lib
- SDL-1.2.14 to
- Build and install
libogg
as described below - Build and install
libvorbis
as described below - Copy the contents of
C:\projects\lib\libpng-1.2.37-bin
toC:\mingw
- Copy the contents of
C:\projects\libs\libpng-1.2.37-lib
toC:\mingw
- Edit
C:\projects\libs\SDL-1.2.14\bin\sdl-config
and changeprefix=/usr/local
toprefix=C:/mingw
- Copy the directories
bin
,include
,lib
,man
, andshare
fromC:\projects\libs\SDL-1.2.14
toC:\mingw
- Copy
bin\Win32\soft_oal.dll
fromC:\projects\libs\openal-soft-1.17.2-bin
toC:\mingw\bin
- Copy the directory
C:\projects\libs\openal-soft-1.17.2-bin\include
toC:\mingw
- Copy the contents of
C:\projects\libs\openal-soft-1.17.2-bin\libs\Win32
toC:\mingw\lib
- Run
C:\MinGW\msys\1.0\msys.bat
cd C:/projects/libs/libogg-1.3.2
LDFLAGS='-mwindows' ./configure --prefix=c:/mingw --host=i686-w64-mingw32
make && make install
- Run
C:\MinGW\msys\1.0\msys.bat
cd C:/projects/libs/libvorbis-1.3.5
LDFLAGS='-mwindows' ./configure --prefix=c:/mingw --host=i686-w64-mingw32
make && make install
- Edit
C:\projects\swars-0.3\src\Makefile.windows
- Change the
LIBS
variable at the top to the following:
LIBS = -lmsvcrt $(shell sdl-config --libs) -lOpenAL32 -lvorbisfile -lvorbis -logg -lpng -lz
- Add
-mno-ms-bitfields
to the beginning ofCFLAGS
andCPPFLAGS
. This is required due to this bug related to structure packing - Delete
$(RES)
from theOBJ
list
- Edit
C:\projects\swars-0.3\src\windows.config.h
and uncommentHAVE_GETTIMEOFDAY
- Edit
C:\projects\swars-0.3\src\util.h
and add#include <sys/stat.h>
under#include <stdbool.h>
- Download the game speed patch to
C:\projects\swars-0.3
- Run
C:\MinGW\msys\1.0\msys.bat
cd c:/projects/swars-0.3
patch -p1 < 0001-Lower-max_fps-and-fix-overly-long-sleep-times.patch
- Run
C:\MinGW\msys\1.0\msys.bat
cd c:/projects/swars-0.3/src
make -f Makefile.windows
- Copy
swars.exe
fromC:\projects\swars-0.3\src
to the root of your Syndicate Wars install directory - Copy
C:\MinGW\bin\soft_oal.dll
to the root of your Syndicate Wars install directory and rename it toOpenAL32.dll
- Copy the following files from
C:\MinGW\bin
to the root of your Syndicate Wars install directory
libpng3.dll
zlib1.dll
libgcc_s_dw2-1.dll
SDL.dll
libvorbisfile-3.dll
libvorbis-0.dll
libogg-0.dll
- Follow the first section above to setup
mingw
& Python. Use the source code from this repository instead - Install all dependencies with the exception of SDL
- Install the SDL2 development library:
- Download and extract SDL2-2.0.5 to
C:\projects\libs\SDL2-2.0.5
- Edit
C:\projects\libs\SDL2-2.0.5\i686-w64-mingw32\bin\sdl2-config
and change theprefix
toprefix=C:/mingw
- Copy the contents of
C:\projects\libs\SDL2-2.0.5\i686-w64-mingw32
toC:\mingw
- Download and extract SDL2-2.0.5 to
- Skip the makefile changes
- Skip fixing up the source
- Compile and install but copy SDL2.dll instead of SDL.dll