Difference between revisions of "Building CEED for Windows"

From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
Jump to: navigation, search
(Installing boost binaries)
 
(35 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{VersionBadge|0.8}}
 +
 
'''Written by Ident (Lukas Meindl) & Nickenstein79 (Working correctly as of 11th June, 2014)'''
 
'''Written by Ident (Lukas Meindl) & Nickenstein79 (Working correctly as of 11th June, 2014)'''
  
 
The following instructions need to be done in the presented order and are created for the currently available version of CEED and could therefore be outdated at some point. Please notify us if you think this is outdated.
 
The following instructions need to be done in the presented order and are created for the currently available version of CEED and could therefore be outdated at some point. Please notify us if you think this is outdated.
 
 
== Cloning the CEED repository ==
 
 
Using source-version-control software compatible with mercurial databases (I use TortoiseHG) clone the following CEED repository, and verify that you are on the v0-8 branch.
 
https://bitbucket.org/cegui/ceed
 
  
  
 
== Installing the prerequisites ==
 
== Installing the prerequisites ==
  
When downloading/installing binaries, be sure to get the version which matches your version of visual studio, for instance choose the 32-bit and VC9 (visual studio 2008) versions of the binaries if that is what you are using to build. (or VC10 / VC11 / VC12 if you are building with those.)
+
When downloading/installing binaries, be sure to get the version which matches your version of visual studio, for instance choose the 32-bit and VC10 (visual studio 2010) versions of the binaries if that is what you are using to build. (or VC9 / VC11 / VC12 / ... if you are building with those.) If you use VC14 and not for example VC9 then be sure that the paths also match this. Don't get confused about the '''paths''' listed in this article, they are '''exemplatory''' and based on VC9. '''Do not mix VC9 binaries with VC10 or VC11, etc.''' We recommend using VC9 to build CEED because this one is assured to work.
 
+
  
 
== Installing Python ==
 
== Installing Python ==
* Get Python 2.7.7 (32 bit version) for Windows  and install it: https://www.python.org/downloads/
+
* Get Python 2.7.12 (32 bit version) for Windows  and install it:  
 +
    https://www.python.org/downloads/
 
* Add your Python install folder path to the PATH variable in your Windows environment variables, e.g.: C:Projects\Python27
 
* Add your Python install folder path to the PATH variable in your Windows environment variables, e.g.: C:Projects\Python27
 
* Now add the Scripts folder to the PATH environment variable, e.g.: C:\Projects\Python27\Scripts & C:\Projects\Python27\Tools\Scripts (depending on which of those folders exists in your install)
 
* Now add the Scripts folder to the PATH environment variable, e.g.: C:\Projects\Python27\Scripts & C:\Projects\Python27\Tools\Scripts (depending on which of those folders exists in your install)
* Open up a dos-command-prompt (cmd.exe) with admin rights and type "python" - See if you get something written into the console, such as "Python 2.7.6 (default [...]", if this is the case then the install worked.
+
* Open up a dos-command-prompt (cmd.exe) with admin rights and type "python" - See if you get something written into the console, such as "Python 2.7.12 (default [...]", if this is the case then the install worked.
 
+
  
 
== Installing pip ==
 
== Installing pip ==
* Install the latest pip distribution: First download get-pip.py : http://pip.readthedocs.org/en/latest/installing.html
+
* Install the latest pip distribution: First download get-pip.py:  
 +
    http://pip.readthedocs.org/en/latest/installing.html
 
* Open up a dos-command-prompt (cmd.exe) with admin rights, change to the folder to which you downloaded "get-pip.py" by using the "cd" command, e.g.: cd "A:/Downloads/Not porn"
 
* Open up a dos-command-prompt (cmd.exe) with admin rights, change to the folder to which you downloaded "get-pip.py" by using the "cd" command, e.g.: cd "A:/Downloads/Not porn"
 
* Type "python get-pip.py" and click enter in the dos-command-prompt
 
* Type "python get-pip.py" and click enter in the dos-command-prompt
Line 36: Line 32:
  
 
== Installing pyOpenGL ==
 
== Installing pyOpenGL ==
* pip install requires a C compiler for this and some other things. We suggest just installing pyOpenGL on Windows from this installer: https://pypi.python.org/packages/any/P/PyOpenGL/PyOpenGL-3.0.2.win32.exe
+
* Install pyOpenGL on Windows with this installer:  
 +
    https://pypi.python.org/packages/any/P/PyOpenGL/PyOpenGL-3.0.2.win32.exe
  
  
 
== Installing boost binaries ==
 
== Installing boost binaries ==
* We also need to install boost. You can use an .exe file for this that will install the necessary binaries from this download page: http://sourceforge.net/projects/boost/files/boost-binaries/1.55.0-build2/ (Be sure to get the version which matches the version of msvc you intend to build with. If you you use MSVC2008, then get the download with 'msvc-9.0' in the name, if you use MSVC2010 get the version with 'msvc-10.0' in the name, etc...)
+
* We also need to install boost. We recommend using version boost 1.55, later versions are known to cause issues. You can use an .exe file for this that will install the necessary binaries from this download page:
 
+
    http://sourceforge.net/projects/boost/files/boost-binaries/1.55.0-build2/  
* Note : If you have multiple version of MSVS on your machine, it is safe to install different versions of these boost distributions into the same folder, as the *.h and *.hpp files are all identical, and the compiled binary libs all go into sub-folders specific to that version of msvc. (It is these lib folders that we will pointing cmake to in the next section.)
+
(Be sure to get the version which matches the version of msvc you intend to build with. If use MSVC2008, then get the download with 'msvc-9.0' in the name, if you use MSVC2010 get the version with 'msvc-10.0' in the name, etc...)
  
 +
* Note : If you have multiple versions of MSVS on your machine, it is safe to install different versions of these boost distributions into the same root folder (e.g C:/boost_1_55_0/), as the *.h and *.hpp files are all identical, and the pre-compiled binary libs all get installed to sub-folders specific to different versions of msvc. (It is these folders and libs that we will be manually pointing cmake to in the next section.)
  
 
== Configuring a PyCEGUI build with cmake ==  
 
== Configuring a PyCEGUI build with cmake ==  
  
* Clone CEGUI v0-8 from the CEGUI repository to a new local folder https://bitbucket.org/cegui/cegui/branch/v0-8 , e.g. to C:/cegui-v0-8
+
* Clone CEGUI v0-8 from the CEGUI repository to a new local folder from here:
 +
    https://bitbucket.org/cegui/cegui/branch/v0-8
 +
e.g. to C:/cegui-v0-8
 
* Check that the branch of your working directory is really v0-8 after cloning, if not then update to the latest v0-8 commit
 
* Check that the branch of your working directory is really v0-8 after cloning, if not then update to the latest v0-8 commit
 
* Add the CEGUI dependencies folder into the CEGUI_v0_8 repository folder that you just cloned.
 
* Add the CEGUI dependencies folder into the CEGUI_v0_8 repository folder that you just cloned.
Line 53: Line 53:
 
* Set the tick-boxes 'Advanced' and 'Grouped' to true. It makes it much easier to manage variables within cmake.
 
* Set the tick-boxes 'Advanced' and 'Grouped' to true. It makes it much easier to manage variables within cmake.
  
* Now click 'configure'. CMake will now auto-detect most of the build requirements. However it will probably fail to auto-detect boost, and so the following paths _MUST_ be set manually by the user:
+
''[The following two steps are optional but will make finding boost libraries a lot more comfortable: If you, for whatever reason, can not or do not want to add or modify environment variables, you can directly specify all of the paths manually in CMake, by setting the variables to path values analogously to those used in the boost path examples below]''
 +
* Set the following windows environment variables:
 +
 
 +
    * 'BOOST_INCLUDEDIR'  (Where the boost *.hpp files are)
 +
    * 'BOOST_LIBRARYDIR'  (Where the platform/compiler specific libs are)
 +
    * 'BOOST_ROOT'        (Set this to the root folder which contains the above two folders.)
 +
 
 +
* Now click 'configure'. CMake will now auto-detect most of the build requirements. <br />It 'should' now correctly auto-detect boost, However, if it failed to find any bost components, then you need to set them manually:
  
 
These are directory-paths and file-paths to locations inside the boost and Python distributions that you installed in the previous steps.
 
These are directory-paths and file-paths to locations inside the boost and Python distributions that you installed in the previous steps.
Line 69: Line 76:
  
  
CMake may correctly auto-find the following Python variables, but if it may fail. So inspect them, and if they were not found, you need to set them manually.  
+
CMake may correctly auto-find the following Python variables, but it may fail. So be sure to inspect them, and if they were not found, you need to set them manually.  
 +
 
 
Here are examples of mine:
 
Here are examples of mine:
  
Line 80: Line 88:
  
  
* Unselect Building the samples and select only OpenGL3 and OpenGL out of the available renderers to build
+
* Unselect Building the CEGUI samples and select only OpenGL3 and OpenGL out of the available renderers to build
 
* Select CEGUI_BUILD_PYTHON_MODULES so that this option is checked
 
* Select CEGUI_BUILD_PYTHON_MODULES so that this option is checked
 
* Click 'configure' again, and then click 'generate', this should now work without errors and generate a solution-file in the binary folder that you specified as your build location.
 
* Click 'configure' again, and then click 'generate', this should now work without errors and generate a solution-file in the binary folder that you specified as your build location.
 
  
 
== Building PyCEGUI ==
 
== Building PyCEGUI ==
  
* Open the generated solution in the build folder and build it (You need 'Release' mode only)
+
* Open the generated solution using MSVC and build the ALL_BUILDS project (You need 'Release' mode only)
* Go for a very long walk along a very long beach. Building pyCEGUI & pyCEGUI_Renderer will take quite a long time.
+
* Go for a very long walk along a very long beach. Building PyCEGUI & PyCEGUI_OpenGLRenderer is very slow.
  
  
== Setting up the pyCEGUI dll dependencies ==
+
== Setting up the PyCEGUI dll dependencies ==
 
* Put the following dependencies of CEGUI into your build's bin folder, e.g.: C:/cegui-v0-8/build/bin
 
* Put the following dependencies of CEGUI into your build's bin folder, e.g.: C:/cegui-v0-8/build/bin
 
** From your CEGUI dependencies folder (e.g.: C:/cegui-v0-8/dependencies) :
 
** From your CEGUI dependencies folder (e.g.: C:/cegui-v0-8/dependencies) :
Line 99: Line 106:
 
** From the boost binaries folder (e.g.: A:\Programs\boost_1_55_0\lib32-msvc-9.0 )
 
** From the boost binaries folder (e.g.: A:\Programs\boost_1_55_0\lib32-msvc-9.0 )
 
*** boost_python-vc90-mt-1_55.dll  (Or higher, depending on your version of MSVS & the boost lib folder you are using.)
 
*** boost_python-vc90-mt-1_55.dll  (Or higher, depending on your version of MSVS & the boost lib folder you are using.)
 +
 +
 +
== Cloning the CEED repository ==
 +
* clone the following CEED repository, and verify that you are on the v0-8 branch.
 +
    https://bitbucket.org/cegui/ceed
  
  
 
== Running CEED ==
 
== Running CEED ==
* Go to your CEED bin folder (this is the folder that you cloned in the very first step)
+
* Go to your CEED\bin folder (the bin folder inside the folder that you just cloned CEED to)
* Edit runwrapper.bat so that the relative path CEGUI_BUILD_PATH matches the folder you just compiled to PyCEGUI to
+
* Edit runwrapper.bat so that the relative path CEGUI_BUILD_PATH matches the folder you just compiled PyCEGUI to
 
* Run the batch file, and the CEED editor should be launched (if not, start the guide again. If it still fails, ask for help on the CEGUI forums)
 
* Run the batch file, and the CEED editor should be launched (if not, start the guide again. If it still fails, ask for help on the CEGUI forums)
  
  
== Using CEED-Migrate ==
+
== Using Python-CEED-Migrate ==
You can also migrate your old CEGUI_0.7.x data files to be compatible with CEGUI_0_8 by running "python ceed-migrate [params]" or by creating a batch file similar to runwrapper.bat to process all of your old data files into the new format.
+
You can also use the ceed-migrate tool for convert your old cegui-datafiles to the newer formats. See this page for some examples of the parameters ceed-migrate takes: [[Using CEED-Migrate]]
 +
 
  
=== Python ceed-migrate examples ===
+
[[Using CEED-Migrate]]
    python ceed-migrate --sourceType "CEGUI layout 3" --targetType "CEGUI layout 4" layout MainMenu_0_7.layout MainMenu_0_8.layout
+
[[Category:HowTo]]
    python ceed-migrate scheme TaharezLook.scheme TaharezLook_0_8.scheme
+
[[Category:Tutorials]]
    python ceed-migrate looknfeel TaharezLook.looknfeel TaharezLook_0_8.looknfeel
+
    python ceed-migrate font TimesNewRoman_12.font TimesNewRoman_12___V_0_8.font
+

Latest revision as of 12:20, 2 October 2016

Written for CEGUI 0.8


Works with versions 0.8.x (stable)

Works with latest CEGUI stable!

Written by Ident (Lukas Meindl) & Nickenstein79 (Working correctly as of 11th June, 2014)

The following instructions need to be done in the presented order and are created for the currently available version of CEED and could therefore be outdated at some point. Please notify us if you think this is outdated.


Installing the prerequisites

When downloading/installing binaries, be sure to get the version which matches your version of visual studio, for instance choose the 32-bit and VC10 (visual studio 2010) versions of the binaries if that is what you are using to build. (or VC9 / VC11 / VC12 / ... if you are building with those.) If you use VC14 and not for example VC9 then be sure that the paths also match this. Don't get confused about the paths listed in this article, they are exemplatory and based on VC9. Do not mix VC9 binaries with VC10 or VC11, etc. We recommend using VC9 to build CEED because this one is assured to work.

Installing Python

  • Get Python 2.7.12 (32 bit version) for Windows and install it:
    https://www.python.org/downloads/
  • Add your Python install folder path to the PATH variable in your Windows environment variables, e.g.: C:Projects\Python27
  • Now add the Scripts folder to the PATH environment variable, e.g.: C:\Projects\Python27\Scripts & C:\Projects\Python27\Tools\Scripts (depending on which of those folders exists in your install)
  • Open up a dos-command-prompt (cmd.exe) with admin rights and type "python" - See if you get something written into the console, such as "Python 2.7.12 (default [...]", if this is the case then the install worked.

Installing pip

  • Install the latest pip distribution: First download get-pip.py:
    http://pip.readthedocs.org/en/latest/installing.html
  • Open up a dos-command-prompt (cmd.exe) with admin rights, change to the folder to which you downloaded "get-pip.py" by using the "cd" command, e.g.: cd "A:/Downloads/Not porn"
  • Type "python get-pip.py" and click enter in the dos-command-prompt
  • pip should now be installed
  • Afterwards enter "pip" and click enter. You should get some sort of information about pip now, if the install succeeded.


Installing pyside

  • Now you can install pyside easily with the following command: "pip install -U PySide"
  • You should get a console output notifying you of a successful install


Installing pyOpenGL

  • Install pyOpenGL on Windows with this installer:
    https://pypi.python.org/packages/any/P/PyOpenGL/PyOpenGL-3.0.2.win32.exe


Installing boost binaries

  • We also need to install boost. We recommend using version boost 1.55, later versions are known to cause issues. You can use an .exe file for this that will install the necessary binaries from this download page:
    http://sourceforge.net/projects/boost/files/boost-binaries/1.55.0-build2/ 

(Be sure to get the version which matches the version of msvc you intend to build with. If use MSVC2008, then get the download with 'msvc-9.0' in the name, if you use MSVC2010 get the version with 'msvc-10.0' in the name, etc...)

  • Note : If you have multiple versions of MSVS on your machine, it is safe to install different versions of these boost distributions into the same root folder (e.g C:/boost_1_55_0/), as the *.h and *.hpp files are all identical, and the pre-compiled binary libs all get installed to sub-folders specific to different versions of msvc. (It is these folders and libs that we will be manually pointing cmake to in the next section.)

Configuring a PyCEGUI build with cmake

  • Clone CEGUI v0-8 from the CEGUI repository to a new local folder from here:
   https://bitbucket.org/cegui/cegui/branch/v0-8

e.g. to C:/cegui-v0-8

  • Check that the branch of your working directory is really v0-8 after cloning, if not then update to the latest v0-8 commit
  • Add the CEGUI dependencies folder into the CEGUI_v0_8 repository folder that you just cloned.
  • Open CMake and set the source code folder to your new local folder, e.g.: C:/cegui-v0-8 and the binaries to for example: C:/cegui-v0-8/build
  • Set the tick-boxes 'Advanced' and 'Grouped' to true. It makes it much easier to manage variables within cmake.

[The following two steps are optional but will make finding boost libraries a lot more comfortable: If you, for whatever reason, can not or do not want to add or modify environment variables, you can directly specify all of the paths manually in CMake, by setting the variables to path values analogously to those used in the boost path examples below]

  • Set the following windows environment variables:
    * 'BOOST_INCLUDEDIR'   (Where the boost *.hpp files are)
    * 'BOOST_LIBRARYDIR'   (Where the platform/compiler specific libs are)
    * 'BOOST_ROOT'         (Set this to the root folder which contains the above two folders.)
  • Now click 'configure'. CMake will now auto-detect most of the build requirements.
    It 'should' now correctly auto-detect boost, However, if it failed to find any bost components, then you need to set them manually:

These are directory-paths and file-paths to locations inside the boost and Python distributions that you installed in the previous steps.

(Here are examples of what they are set to on my machine)

cmake Boost path examples


    • Boost_PYTHON_LIBRARY_DEBUG C:/boost_1_55_0/lib32-msvc-9.0/boost_python-vc90-mt-gd-1_55.lib
    • Boost_PYTHON_LIBRARY_RELEASE C:/boost_1_55_0/lib32-msvc-9.0/boost_python-vc90-mt-1_55.lib
    • Boost_SYSTEM_LIBRARY_DEBUG C:/boost_1_55_0/lib32-msvc-9.0/boost_system-vc90-mt-gd-1_55.lib
    • Boost_SYSTEM_LIBRARY_RELEASE C:/boost_1_55_0/lib32-msvc-9.0/boost_system-vc90-mt-1_55.lib
    • Boost_INCLUDE_DIR C:/boost_1_55_0


CMake may correctly auto-find the following Python variables, but it may fail. So be sure to inspect them, and if they were not found, you need to set them manually.

Here are examples of mine:

cmake Python path examples


    • PYTHON_INCLUDE_DIR C:/Python27/include
    • PYTHON_LIBRARY C:/Python27/libs/python27.lib
    • PYTHON_EXECUTABLE C:/Python27/python.exe


  • Unselect Building the CEGUI samples and select only OpenGL3 and OpenGL out of the available renderers to build
  • Select CEGUI_BUILD_PYTHON_MODULES so that this option is checked
  • Click 'configure' again, and then click 'generate', this should now work without errors and generate a solution-file in the binary folder that you specified as your build location.

Building PyCEGUI

  • Open the generated solution using MSVC and build the ALL_BUILDS project (You need 'Release' mode only)
  • Go for a very long walk along a very long beach. Building PyCEGUI & PyCEGUI_OpenGLRenderer is very slow.


Setting up the PyCEGUI dll dependencies

  • Put the following dependencies of CEGUI into your build's bin folder, e.g.: C:/cegui-v0-8/build/bin
    • From your CEGUI dependencies folder (e.g.: C:/cegui-v0-8/dependencies) :
      • freetype.dll
      • glew.dll
      • pcre.dll
    • From the boost binaries folder (e.g.: A:\Programs\boost_1_55_0\lib32-msvc-9.0 )
      • boost_python-vc90-mt-1_55.dll (Or higher, depending on your version of MSVS & the boost lib folder you are using.)


Cloning the CEED repository

  • clone the following CEED repository, and verify that you are on the v0-8 branch.
   https://bitbucket.org/cegui/ceed


Running CEED

  • Go to your CEED\bin folder (the bin folder inside the folder that you just cloned CEED to)
  • Edit runwrapper.bat so that the relative path CEGUI_BUILD_PATH matches the folder you just compiled PyCEGUI to
  • Run the batch file, and the CEED editor should be launched (if not, start the guide again. If it still fails, ask for help on the CEGUI forums)


Using Python-CEED-Migrate

You can also use the ceed-migrate tool for convert your old cegui-datafiles to the newer formats. See this page for some examples of the parameters ceed-migrate takes: Using CEED-Migrate


Using CEED-Migrate