-
Notifications
You must be signed in to change notification settings - Fork 13
Compilation guide (Windows)
Compiling SSNES for Windows is done with the MinGW toolchain. Both 32-bit and 64-bit variants should work.
Download and run MSYSGit, and you should be presented with a bash shell with Git working. You'll also need the MinGW toolchain with make installed. Then you can check out the source tree:
git clone git://github.com/Themaister/SSNES.git
cd SSNES
Now we need to download the library pack and the headers pack, and extract them into the top directory of SSNES. Pick one of these depending on if you're compiling for 32-bit or 64-bit:
https://github.com/downloads/Themaister/SSNES/SSNES-win32-libs.zip (32-bit)
https://github.com/downloads/Themaister/SSNES/SSNES-win64-libs.zip (64-bit)
https://github.com/downloads/Themaister/SSNES/SSNES-win32-headers.zip (32-bit)
https://github.com/downloads/Themaister/SSNES/SSNES-win64-headers.zip (64-bit)
Note that you might have to install dsound.h
and dinput.h
DirectX headers in a place where MinGW can see them. This is typically C:/MinGW/include
or something like that.
Now build:
mingw32-make -f Makefile.win # If your compiler isn't called gcc/g++, you can set the proper compiler name with CC= and CXX=, standard Unix fare. You might also need to set WINDRES= if needed.
Since the command-line isn't very comfortable on Windows, you will most likely want SSNES-Phoenix unless you're planning to launch via XBMC or something like that.
git clone git://github.com/Themaister/SSNES-Phoenix.git
cd SSNES-Phoenix
mingw32-make -f Makefile.win32 # Will work for 64-bit as well :)
Then you can move the ssnes-phoenix.exe
into the folder you built SSNES to make your life easier :)
Building with a cross chain on Linux is probably the most convenient option. You should have unzip
and wget
installed for maximum laziness! :D
You might need to install DirectX headers (dinput.h
, dsound.h
) properly.
git clone git://github.com/Themaister/SSNES.git
cd SSNES
make -f Makefile.win libs_x86 # libs_x86_64 if you're cross building for x64 Windows.
make -f Makefile.win CC=i486-mingw32-gcc CXX=i486-mingw32-g++ # Cross-chain might be called differently on your distro.
Nothing unexpected here:
git clone git://github.com/Themaister/SSNES-Phoenix.git
cd SSNES-Phoenix
make -f Makefile.win32 CC=i486-mingw32-gcc CXX=i486-mingw32-g++ WINDRES=i486-mingw32-windres # Will work for 64-bit as well :)
If you want to make distribution builds you can use the ssnes-mingw-build.sh
script included in the top directory.
It will checkout the latest sources, download libraries, and build distributable .zip files for both 32-bit and 64-bit in "slim" and "full" variants as found in the downloads section. It will also include the GUI:
NOBUILD_64BIT=1 MINGW32_BASE=i486-mingw32 ./ssnes-mingw-build.sh # Build for just 32-bit.
NOBUILD_32BIT=1 MINGW64_BASE=x86_64-w64-mingw32 ./ssnes-mingw-build.sh # Build for just 64-bit.
MINGW32_BASE=i486-mingw32 MINGW64_BASE=x86_64-w64-mingw32 ./ssnes-mingw32-build.sh # Build for both.
The names of the cross chains vary from distro to distro.