-
Notifications
You must be signed in to change notification settings - Fork 4
/
BUILD-VC2015.txt
66 lines (39 loc) · 4.63 KB
/
BUILD-VC2015.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
BUILDING SIGIL FROM SOURCE USING VISUAL STUDIO 14 2015 IN WINDOWS
-----------------------------------------------------------------
SIGIL uses CMake, which is a cross-platform build tool. You will need to download and run the CMake "Windows Installer" (.msi). When the installer asks, make sure you add CMake to your PATH variable. You can download the installer from:
https://cmake.org/download/
Next, download SIGIL. If you have git, you can use a command prompt:
git clone https://gitlab.com/geoff-nagy/sigil.git
Otherwise, you can download the source code as a .zip file from:
https://gitlab.com/geoff-nagy/sigil
Navigate to SIGIL's root directory, and enter the "deps" folder. This is where CMake-based dependencies of SIGIL are located. We will use Git to acquire GLFW and Freetype2. (You can ignore the "pigu" folder---it is used for Raspberry Pi builds.)
Type the following:
git clone https://github.com/glfw/glfw.git
git clone http://git.savannah.gnu.org/cgit/freetype/freetype2.git
SIGIL depends on the OpenGL Extension Wrangler (GLEW) library. Headers and pre-compiled libs are included with SIGIL in the /glew folder. Copy and paste the following files into the appropriate locations as below:
sigil/glew/lib/msvc32/glew32.lib ---> C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/lib/glew32.lib
sigil/glew/include/GL/*.h ---> C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/GL/*.h
We need OpenAL for audio. Download the "OpenAL 1.1 Core SDK (zip)" file from
https://www.openal.org/downloads/
and extract and run the installer. When prompted, you should also run the OpenAL redistributable, which will place the OpenAL DLLs into your system folder. After all of this, copy the OpenAL header and library files into the proper locations:
C:\Program Files (x86)\OpenAL 1.1 SDK\include\*.h ---> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\*.h
C:\Program Files (x86)\OpenAL 1.1 SDK\libs\Win32\OpenAL32.lib ---> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\OpenAL32.lib
Next, we can start building SIGIL. Enter the directory "sigil" and create a folder called "build-vc2015".
Open CMake-GUI. For "Where is the source code", browse to the root directory "sigil". For "Where to build the binaries", browse to the directory "build-vc2015" that you created in the previous step.
Click "Configure". When prompted, select the "Visual Studio 14 2015" generator (not the IA64 or Win64 versions) from the drop-down list. Select "Use default native compilers", and click "Finish".
Depending on your system configuration, CMake may have trouble finding the required dependencies. For your reference, these are the values that I use to compile SIGIL.
GLEW_INCLUDE_DIR: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include
GLEW_LIBRARY: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/lib/glew32.lib
OPENAL_INCLUDE_DIR: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include
OPENAL_LIBRARY: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/lib/OpenAL32.lib
If errors occur, not all of the above variables may be immediately present. You'll need to fix any existing errors and click "Configure" again for the remaining variables to appear. Repeat this process until the configuration completes without errors---you should only have to do this once or twice if you've set everything up correctly. (It's also possible that CMake will assign the correct values to all of these variables on the first try; it depends on your system configuration.)
If no errors occurred during configuration (a message box will appear if there are errors), you can click "Generate". This will create the Visual Studio 2015 project file that can be used to build SIGIL. Navigate to "build-vc2015" and open the solution "sigil.sln".
In Visual Studio, select the build type "Release", and then click "Build -> Build Solution" from the top menu. This will create the files
sigil/build-vc2015/Release/sigil.dll
sigil/build-vc2015/Release/sigil.lib
It's probably now a good idea to put all of the necessary SIGIL files in a common location for you to copy into your SIGIL projects later on. This is the same process that I use when building and distributing SIGIL.
C:/Windows/System32/OpenAL32.dll ---> sigil/sigil-vc2015/OpenAL32.dll
sigil/glew/lib/msvc32/glew32.dll ---> sigil/sigil-vc2015/glew32.dll
sigil/build-vc2015/Release/sigil.dll ---> sigil/sigil-vc2015/sigil.dll
sigil/build-vc2015/Release/sigil.lib ---> sigil/sigil-vc2015/lib/sigil.lib
And you're done! Example projects for every supported compiler are provided in the "examples" folder.