Difference between revisions of "Installation"

From KlayGE
Jump to: navigation, search
Line 1: Line 1:
Before compiling [[KlayGE]], some [[Third-party Libraries and Tools|third-party libraries and tools]] must be installed.
+
Before compiling [[KlayGE]], you can run build_external.py to build and install [[Third-party Libraries and Tools|third-party libraries and tools]].
  
Since [[KlayGE]] 3.10.0, include and lib paths are set up inside the project files. After extraction, just open the corresponding project file under "Build" directory, [[KlayGE/en|KlayGE]]itself can be built directly. If you need to use the engine to develop your own projects, you need to do some additional setup:
+
Since [[KlayGE]] 3.12.0, include and lib paths are set up inside the project files. After extraction, just open the corresponding project file under "Build" directory, [[KlayGE/en|KlayGE]] itself can be built directly. Or you can run build_all.py to do that job.
 
+
# Run the env_vars.py under KlayGE directory. The script sets the environment variable "KLAYGE_HOME", and adds the "bin" directory into OS's PATH
+
# environment variable. If you do not have pywin32 installed, you may need to manually modify the environment variables, or restart your computer.
+
# Set the pathes. Taking Visual Studio 2008 as an example (for other IDEs, please refer to their own help files):
+
## Open "Tools"->"Options"->"Projects and Solutions"->"VC++ Directories", select "Include files" in "Show directories for:" drop-down box, adds $(KLAYGE_HOME)\Core\Include and $(KLAYGE_HOME)\Plugins\Include.
+
## Select "Library files" in "Show directories for:", adds $(KLAYGE_HOME)\lib\Win32(For x64 version, replace "Win32" by "x64").
+
## Click "OK". It's recommended to restart Visual Studio in order to ensure the environment settings have been saved properly.
+
  
 
'''Notes for MinGW users:'''
 
'''Notes for MinGW users:'''

Revision as of 09:34, 30 June 2011

Before compiling KlayGE, you can run build_external.py to build and install third-party libraries and tools.

Since KlayGE 3.12.0, include and lib paths are set up inside the project files. After extraction, just open the corresponding project file under "Build" directory, KlayGE itself can be built directly. Or you can run build_all.py to do that job.

Notes for MinGW users:

There are some incompatibilities between new versions of the Windows SDK/DirectX SDK and MinGW. When compiling the DirectSound plug-in, and the compiler will report sal.h cannot be found. VC's "sal.h" needs to be copied to "MinGW/include". Then open "MinGW/lib/gcc/mingw32/4.4.1/include/stddef.h", replace "#define NULL __null" by "#define NULL 0". Otherwise, sal.h will define __null to some other token incorrectly.