-
-
Save Davier/bf773344f64a5fe32f66 to your computer and use it in GitHub Desktop.
How to build Sigma on Windows https://github.com/adam4813/Sigma
This file contains 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
# This file describes the steps I did to build and run Sigma on Windows 8, Visual Studio 2013. | |
# It contains linux commands as I use cygwin, and instructions in comments. | |
# My goal (for now) is to show what to do, not to have and executable script. | |
# Make dependency directories | |
mkdir dep | |
mkdir dep/include | |
mkdir dep/lib | |
mkdir dep/bin | |
# Install GLEW | |
wget "http://downloads.sourceforge.net/project/glew/glew/1.10.0/glew-1.10.0-win32.zip" | |
7z x glew-1.10.0-win32.zip | |
cp glew-1.10.0/lib/Release/Win32/* dep/lib/ | |
cp glew-1.10.0/bin/Release/Win32/* dep/bin/ | |
cp -R glew-1.10.0/include/* dep/include/ | |
rm glew-1.10.0-win32.zip | |
rm -Rf glew-1.10.0 | |
# Install GLFW | |
wget "http://downloads.sourceforge.net/project/glfw/glfw/3.0.4/glfw-3.0.4.zip" | |
7z x glfw-3.0.4.zip | |
mkdir glfw-3.0.4/build | |
cd glfw-3.0.4/build | |
cmake .. | |
explorer . | |
# Open GLFW.sln, set the Release target, and build the project glfw | |
cd ../.. | |
cp glfw-3.0.4/build/src/Release/glfw3.lib dep/lib/ | |
cp -R glfw-3.0.4/include/GLFW/ dep/include/ | |
rm glfw-3.0.4.zip | |
rm -Rf glfw-3.0.4 | |
# Install GLM | |
wget "http://downloads.sourceforge.net/project/ogl-math/glm-0.9.5.2/glm-0.9.5.2.7z" | |
7z x glm-0.9.5.2.7z | |
cp -R glm/glm dep/include/ | |
rm glm-0.9.5.2.7z | |
rm -Rf glm | |
# Install SOIL | |
wget "http://www.lonesock.net/files/soil.zip" | |
7z x soil.zip | |
# Patch SOIL to work in OpenGL3 core | |
wget "https://gist.githubusercontent.com/Davier/9586253/raw/aacb5426778895288d9b810c539fb82ef7bb73ff/SOIL.c" | |
mv SOIL.c "Simple OpenGL Image Library/src/SOIL.c" | |
cd "Simple OpenGL Image Library/projects/VC9" | |
explorer . | |
# Open SOIL.sln | |
# Set the Release target, and select the SOIL project | |
# Click on PROJECT->Properties. Under "Configuration Properties->VC++ Directories", in "Include Directories" add your path to dep/include | |
# Build the project | |
cd ../../../ | |
cp "Simple OpenGL Image Library/projects/VC9/Release/SOIL.lib" dep/lib/ | |
mkdir dep/include/SOIL | |
cp "Simple OpenGL Image Library/src/SOIL.h" dep/include/SOIL | |
rm soil.zip | |
rm -Rf "Simple OpenGL Image Library" | |
# Install Bullet | |
wget "http://bullet.googlecode.com/files/bullet-2.82-r2704.zip" | |
7z x bullet-2.82-r2704.zip | |
cd bullet-2.82-r2704/build/ | |
explorer . | |
# Execute vs2010.bat. If you have an error here, extract the zip file with explorer instead. | |
# Open vs2010/0BulletSolution.sln | |
# Set the Release target, and select all projects | |
# Click on PROJECT->Properties. Under "Configuration Properties->C/C++->Code Generation", set "Runtime Library" to "Multi-threaded DLL" | |
# Build the projects BulletCollision, BulletDynamics, BulletSoftBody and LinearMath | |
cd ../.. | |
cp bullet-2.82-r2704/lib/BulletCollision_vs2010.lib dep/lib/BulletCollision.lib | |
cp bullet-2.82-r2704/lib/BulletDynamics_vs2010.lib dep/lib/BulletDynamics.lib | |
cp bullet-2.82-r2704/lib/BulletSoftBody_vs2010.lib dep/lib/BulletSoftBody.lib | |
cp bullet-2.82-r2704/lib/LinearMath_vs2010.lib dep/lib/LinearMath.lib | |
cp -R bullet-2.82-r2704/src/ dep/include/bullet | |
rm -Rf bullet-2.82-r2704 | |
rm bullet-2.82-r2704.zip | |
# Install OpenAL | |
wget "http://kcat.strangesoft.net/openal-soft-1.15.1-bin.zip" | |
7z x openal-soft-1.15.1-bin.zip | |
cp -R openal-soft-1.15.1-bin/include/AL dep/include/ | |
cp openal-soft-1.15.1-bin/lib/Win32/libOpenAL32.dll.a dep/lib/openal.lib | |
cp openal-soft-1.15.1-bin/Win32/soft_oal.dll dep/bin/OpenAL32.dll | |
rm -R openal-soft-1.15.1-bin | |
rm openal-soft-1.15.1-bin.zip | |
# Install OGG/Vorbis | |
wget "http://downloads.xiph.org/releases/ogg/libogg-1.3.1.zip" | |
wget "http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.zip" | |
7z x libogg-1.3.1.zip | |
7z x libvorbis-1.3.4.zip | |
cd libogg-1.3.1/win32/VS2010/ | |
explorer . | |
# Open libogg_dynamic.sln and build the libogg project with the Release target | |
cd ../../.. | |
cp libogg-1.3.1/win32/VS2010/Win32/Release/libogg.lib dep/lib/ | |
cp libogg-1.3.1/win32/VS2010/Win32/Release/libogg.dll dep/bin/ | |
cp -R libogg-1.3.1/include/ogg dep/include | |
cd libvorbis-1.3.4/win32/VS2010/ | |
explorer . | |
# Open libvorbis_dynamic.sln | |
# Set the Release target, and select all the projects | |
# Click on PROJECT->Properties | |
# Under "Configuration Properties->C/C++->Code Generation", set "Runtime Library" to "Multi-threaded Debug DLL" | |
# Under "Configuration Properties->VC++ Diretories", in "Include Directories" add your path to libogg-1.3.1/include | |
# in "Library Directory", add your path to libogg-1.3.1/win32/VS2010/Win32/Release | |
# Build all the project | |
cd ../../.. | |
cp libvorbis-1.3.4/win32/VS2010/Win32/Release/*.lib dep/lib/ | |
cp libvorbis-1.3.4/win32/VS2010/Win32/Release/*.dll dep/bin/ | |
cp libvorbis-1.3.4/win32/VS2010/Win32/Release/*.exe dep/bin/ | |
cp -R libvorbis-1.3.4/include/vorbis dep/include | |
rm libogg-1.3.1.zip | |
rm -Rf libogg-1.3.1 | |
rm libvorbis-1.3.4.zip | |
rm -Rf libvorbis-1.3.4 | |
# Download the assets | |
wget "https://s3-ap-southeast-2.amazonaws.com/trillek/assets/ms2_5assests.zip" | |
# Download Sigma | |
git clone https://github.com/adam4813/Sigma.git | |
cd Sigma | |
git checkout ecs | |
mkdir build | |
cd build | |
cmake-gui .. | |
# Add Entry: Name="CMAKE_PREFIX_PATH" Type="PATH" Value=<select your path to the dep directory> | |
# Click on Configure | |
# Unselect BUILD_LINK_CEF | |
# Click on Configure | |
# There should be no errors, click on Generate | |
explorer . | |
# Open Sigma.sln | |
# Select project Sigma, click on PROJECT->Properties. Under "Configuration Properties->Debugging", set "Working Directory" to "$(OutDir)" | |
# Select all the projects, click on PROJECT->Properties. Under "Configuration Properties->VC++ Diretories", in "Include Directories" add your path to dep/include | |
# Set project Sigma as StartUp project | |
# Build !!! | |
cd ../.. | |
# Copy the runtime files where needed (here for Debug target) | |
7z x ms2_5assests.zip | |
cp -R ms2_5assests/* Sigma/build/bin/Debug/ | |
rm -Rf ms2_5assests/ | |
cp -R dep/bin/* Sigma/build/bin/Debug/ | |
# Execute Sigma/build/bin/Debug/Sigma.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment