Last active
August 29, 2015 14:01
-
-
Save binarycrusader/a61a5662bee53cd33179 to your computer and use it in GitHub Desktop.
How to compile gzdoom on Windows 8.1 Pro with Visual Studio 2013
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(These notes are written assuming I've forgotten everything and are intended for | |
those not used to Windows development, so please don't take offence at the | |
seemingly obvious.) | |
Steps I used to compile gzdoom (current master branch) on Windows 8.1 Pro (this | |
assumes you've already downloaded and installed Visual Studio; I used Visual | |
Studio 2013 Express Desktop): | |
1) Download and install DirectX June 2010 SDK (use your own version at your | |
own risk, it may cause build failures) to default location: | |
http://www.microsoft.com/en-us/download/details.aspx?id=6812 | |
2) Download and install git configuring it to "Use git From Windows Command | |
Prompt" using default options for all other prompts: | |
http://git-scm.com/download/win | |
3) Download and install FMOD Ex Programmer's API to default location: | |
http://www.fmod.org/download/fmodex/api/Win/fmodapi44433win-installer.exe | |
4) Download and extract glew to your general development folder where you keep | |
workspaces (link is from http://glew.sourceforge.net/index.html): | |
https://sourceforge.net/projects/glew/files/glew/1.10.0/glew-1.10.0-win32.zip/download | |
5) Download and install CMake: | |
http://www.cmake.org/files/v2.8/cmake-2.8.12.2-win32-x86.exe | |
6) Download and install nasm: | |
http://www.nasm.us/pub/nasm/releasebuilds/2.11.04/win32/nasm-2.11.04-installer.exe | |
7) Clone gzdoom repository to your general development folder (if you've already | |
done this, I suggest removing the folder completely and starting again; | |
otherwise previous failed attempts may interfere): | |
(e.g. cd %DEVEL_FOLDER%; git clone https://github.com/coelckers/gzdoom.git) | |
8) Run cmake-gui.exe | |
* In "Where is the source code:" browse to the gzdoom folder from above | |
* In "Where to build the binaries:" use the same gzdoom folder | |
* Click configure | |
* Select "Visual Studio 12" (don't select win64 entries; obviously pick version of studio | |
that matches yours; I'll figure out why 64-bit is broke later) | |
* Click Finish | |
9) After cmake configure finishes, it will likely fail because it couldn't find | |
some things: | |
* set NASM_PATH browsing to folder where you installed nasm earlier and select | |
'nasm.exe' | |
* set FMOD_INCLUDE_DIR to 'api/inc' folder inside folder where you installed | |
fmod earlier | |
(e.g. C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\inc) | |
* set FMOD_LIBRARY to 'api/lib/fmodex_vc.lib' inside fmod folder | |
(e.g. C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\lib\fmodex_vc.lib) | |
* set GLEW_INCLUDE_DIR to 'include' directory inside glew folder | |
(e.g. C:/Users/Shawn/Devel/glew-1.10.0/include) | |
* set GLEW_LIBRARY to 'lib/Release/Win32/glew32.lib' inside glew folder you | |
extracted earlier | |
(e.g. C:/Users/Shawn/Devel/glew-1.10.0/lib/Release/Win32/glew32.lib) | |
10) Click 'Configure' | |
* If this fails with the message 'Could not find DirectX 9 libraries', you | |
likely have an older DirectX SDK or installed the SDK into a non-standard | |
location. To workaround this, you'll likely have to set the following cmake | |
variables manually in the cmake GUI dialog (following is only an example): | |
D3D_INCLUDE_DIR C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Include | |
DX_dinput8_LIBRARY C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/dinput8.lib | |
DX_dxguid_LIBRARY C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/dxguid.lib | |
11) Click 'Generate'. After this, cmake should have successfully created | |
'gzdoom.sln', 'zdoom.sln', and 'ALL_BUILD.vcxproj.user' files in the gzdoom | |
directory (look at timestamp on the files as a sanity check). If not, | |
something's gone wrong. | |
12) Close cmake | |
13) Open 'gzdoom.sln' file in the 'gzdoom' folder created earlier | |
(double-clicking or within VS makes no difference) | |
14) Press F7 or Click Build -> Build Solution | |
(NOTE: The build will fail if you have the Debug or Release folder inside | |
the gzdoom folder open due to one of the post-build steps.) | |
15) When the build successfully completes (there should be no failures): | |
* copy the bin/Release/Win32/glew32.dll file to the gzdoom/Debug folder | |
(e.g. cp C:\Users\Shawn\Devel\glew-1.10.0\bin\Release\Win32\glew32.dll C:\Users\Shawn\Devel\gzdoom\Debug) | |
* copy the 'fmodex.dll' to the gzdoom/Debug folder | |
(e.g. cp C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\fmodex.dll C:\Users\Shawn\Devel\gzdoom\Debug) | |
16) Now gzdoom.exe can be opened from the gzdoom/Debug folder, or from within | |
Visual Studio using Debug -> Start Debugging (F5) when the solution is | |
selected. Assuming it found your copy of installed Doom (which if you've | |
installed The Ultimate Doom from Steam, it will automatically), the | |
game should launch after a few moments and go to the main menu. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment