I've got a new PC and jumped on the
2.1
train. I know that several people already posted some info, but I decided to describe the process step by step. I've added it to the forum and not on the wiki, because I expect that things will change:
Preconditions:
Base system is Windows 10
Visual Studio Community Free 2015 is used for compilation (64 bit)
These instructions only apply to Ogre3D V2.1
DirectX:
If you want to use DirectX in Ogre3D, the 'Windows Software Development Kit (SDK) for Windows 10' is required.
Mandatory for compiling SDL2 however, is the use of the DirectX Software Development Kit 'DirectX 9 SDK (DX SDK June 2010)'; this version is not used by
Ogre3D V2.1 (because it doesn't use DirectX 9 anymore), but it is only used for SDL2
1. Get the Windows Software Development Kit (SDK) for Windows 10 from
https://dev.windows.com/en-us/downloads/windows-10-sdk
2. Download 'sdksetup.exe' and install the SDK (this will take some time)
3. Get the DirectX Software Development Kit from
https://www.microsoft.com/en-us/download/confirmation.aspx?id=6812
; this is the 'DirectX 9 SDK (DX SDK June 2010)'
4. Run the downloaded 'DXSDK_Jun10.exe'
5. This results in an error 'Setup failed'. Just ignore it and press 'Finish'.
Get Visual Studio Community Free 2015 and install it:
1. Download 'Visual Studio Community Free' from
https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx
2. Run 'vs_community_ENU.exe' (installation takes about half and hour)
Get Ogre 3D V2.1:
The easiest way to download Ogre3D is to grab the zip file directly from Bitbucket.
1. Go to
https://bitbucket.org/sinbad/ogre/downloads
2. Select the tab 'Branches'
3. Download branch 'v2-1'
4. This downloads file 'sinbad-
ogre
-xxxxxxxxxxxx.zip'
5. Create a subdirectory in 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects' named 'Ogre2.1'
Use your own name as a replacement for 'LoggedInUser'
6. Extract the zip file (everything in 'sinbad-
ogre
-xxxxxxxxxxxx') in the directory 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1'
So, do not include 'sinbad- ogre -xxxxxxxxxxxx'.
Get the dependencies:
1. Make a subdirectory in 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1' named 'Dependencies'
2. Download the dependencies from 'https://bitbucket.org/cabalistic/ogredeps/downloads'
3. Select the tab 'Branches'
4. Download 'default'; this downloads the file 'cabalistic-ogredeps-zzzzzzzzzzzz.zip'
5. Extract the content of this file in 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies'
6. Get SDL from 'https://www.libsdl.org/download-2.0.php'. To be sure, compile it yourself. Download 'SDL2-2.0.3.zip - GPG signed' (this is currently the highest version)
5. Extract the content of this file in 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\src'
6. Rename the subdir 'SDL2-2.0.3' to 'SDL2' to please
CMake
The structure in 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\src\' is:
Get CMake and install it:
1. Download
CMake
from
https://cmake.org/
2. No 64 bit installer was provided, so the 32 bit version was downloaded (
cmake
-3.4.1-win32-x86.exe)
3. Install '
cmake
-3.4.1-win32-x86.exe'
Compile the dependencies:
1. Start
CMake
2. Fill in for 'where is the source code' the path 'C:/Users/LoggedInUser/Documents/Visual Studio 2015/Projects/Ogre2.1/Dependencies'
3. Fill in for 'where to build the binaries' the path 'C:/Users/LoggedInUser/Documents/Visual Studio 2015/Projects/Ogre2.1/Dependencies'
4. Press button 'Configure'
5. Select for 'Specify the generator for this project' the appropriate compiler; in this case it is 'Visual Studio 14 2015 Win 64'
6. Set radiobutton to 'use default native compilers' and press button 'Finish' (if you get errors because it cannot find the compiler (CMAKE_CXX_COMPILER), use 'specify native compilers')
7. Notice that all lines are red. Just press 'Configure' again. The lines are blank now
8. Press button 'Generate'
9. Start 'Visual Studio 2015'
10. Open the solution located in 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\OGREDEPS.sln'
11. Build the solution (both Debug and Release, both in x64).
12. OIS_d.dll and OIS.dll are in C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\bin\... When running an Ogre3D sample, this results in an error, because it cannot find the dll files.
For convenience, copy the 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\bin\' directory to 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\bin\src\'
Compile SDL2 separately:
SDL2 is not compiled as part of the compilation of the OGREDEPS.sln solution. Just compile it separately:
1. Start 'Visual Studio 2015' (if not yet started)
2. Open the solution located in 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\src\SDL2\VisualC\SDL_VS2013.sln'
3. Visual Studio 2015 automatically upgrades the 2013 solution
4. Build the solution (both Debug and Release, both in x64).
Compile Ogre3D:
1. Start
CMake
(do not forget to clear the cache by means of File > Delete Cache)
2. Fill in for 'where is the source code' the path 'C:/Users/LoggedInUser/Documents/Visual Studio 2015/Projects/Ogre2.1'
3. Fill in for 'where to build the binaries' the path 'C:/Users/LoggedInUser/Documents/Visual Studio 2015/Projects/Ogre2.1/VCBuild'
4. Press button 'Configure'. Choose for button 'Yes' on the question 'Build directory does not exist; should I create it?'
5. Select for 'Specify the generator for this project' the appropriate compiler; in this case it is 'Visual Studio 14 2015 Win 64'
6. Set radiobutton to 'use default native compilers' and press button 'Finish'
7. Notice that some lines are red and an error is displayed 'error in configuration process; project files may be invalid'. This is because it cannot find SDL2MAIN_LIBRARY, SDL2_INCLUDE_DIR and SDL2_LIBRARY_TEMP
8. Check 'OGRE_BUILD_SAMPLES2'
9. Uncheck 'OGRE_INSTALL_SAMPLES'
10. Press 'Configure' until all lines are blank
11. Press button 'Generate'
12. Start 'Visual Studio 2015' (if not yet started)
13. Open the solution located in 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\VCBuild\
OGRE
.sln'
14. Build the solution (both Debug and Release, both in x64).
Run Ogre3D:
1. Apparently, SDL2.dll was not copied, so manually copy 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\src\SDL2\VisualC\SDL\x64\Release\SDL2.dll' to
'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\VCBuild\bin\Debug\' and 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\VCBuild\bin\Release\'
2. Run the samples in 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\VCBuild\bin\Release\'
Preconditions:
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
DirectX:
If you want to use DirectX in Ogre3D, the 'Windows Software Development Kit (SDK) for Windows 10' is required.
Mandatory for compiling SDL2 however, is the use of the DirectX Software Development Kit 'DirectX 9 SDK (DX SDK June 2010)'; this version is not used by
Ogre3D V2.1 (because it doesn't use DirectX 9 anymore), but it is only used for SDL2
![Sad :(](https://i-blog.csdnimg.cn/blog_migrate/234ee57ac41e487b817731e2b49992aa.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
Get Visual Studio Community Free 2015 and install it:
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
Get Ogre 3D V2.1:
The easiest way to download Ogre3D is to grab the zip file directly from Bitbucket.
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
Use your own name as a replacement for 'LoggedInUser'
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
So, do not include 'sinbad- ogre -xxxxxxxxxxxx'.
Get the dependencies:
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
The structure in 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\src\' is:
Get CMake and install it:
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
Compile the dependencies:
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
For convenience, copy the 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\bin\' directory to 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\bin\src\'
Compile SDL2 separately:
SDL2 is not compiled as part of the compilation of the OGREDEPS.sln solution. Just compile it separately:
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
Compile Ogre3D:
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
-
CODE:
SELECT ALL
-
Set the following values to these items: SDL2MAIN_LIBRARY = C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\src\SDL2\VisualC\SDLmain\x64\Release\SDL2main.lib SDL2_INCLUDE_DIR = C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\src\SDL2\include SDL2_LIBRARY_TEMP = C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\Dependencies\src\SDL2\VisualC\SDL\x64\Release\SDL2.lib
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
Run Ogre3D:
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)
'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\VCBuild\bin\Debug\' and 'C:\Users\LoggedInUser\Documents\Visual Studio 2015\Projects\Ogre2.1\VCBuild\bin\Release\'
![Arrow :arrow:](https://i-blog.csdnimg.cn/blog_migrate/430a2b7627eb829f9f5f80a3d3822386.gif)