Difference between revisions of "Building CEED for Windows"

From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
Jump to: navigation, search
(Build pyCEGUI)
(Modified by Nickenstein79)
Line 1: Line 1:
 
'''(Written by Ident (Lukas Meindl). Works to date: 9. June, 2014)'''  
 
'''(Written by Ident (Lukas Meindl). Works to date: 9. June, 2014)'''  
 +
'''(Modified by Nickenstein79 on 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.
 +
 +
== Clone CEED repository ==
 +
 +
Using whatever source-control software you use (I'm using TortoiseHG) clone the following CEED repository, and verify that you are on the v0-8 branch.
 +
TODO - LINK NEEDED HERE!
  
  
 
== Installing the prerequisites ==
 
== Installing the prerequisites ==
  
When downloading/installing binaries, always choose the 32-bit and VC9 (visual studio 2008) versions of the binaries
+
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.)
 +
 
 
=== Installing Python ===
 
=== Installing Python ===
* Get Python 2.7.6 (32 bit version) for Windows  and install it: https://www.python.org/downloads/
+
* Get Python 2.7.7 (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.: A:\Programs\Python27
+
* Add your Python install folder path to the PATH variable in your Windows environment variables, e.g.: C:Projects\Programs\Python27
* Now add the Scripts folder to the PATH environment variable, e.g.: A:\Programs\Python27\Scripts
+
* 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 Windows PowerShell 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.6 (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 Windows PowerShell 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 Windows PowerShell 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 Windows PowerShell
+
* Type "python get-pip.py" and click enter in the dos-command-prompt
* PowerShell should now install pip
+
* pip should now be installed
* Afterwards write "pip" and click enter. You should get some sort of information about pip now, if the install succeeded.
+
* Afterwards enter "pip" and click enter. You should get some sort of information about pip now, if the install succeeded.
  
 
=== Installing pyside ===
 
=== Installing pyside ===
Line 28: Line 35:
  
 
=== 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. Since you have to use VS2008, you should install the 32bit VC9 binaries from the downloads page: http://sourceforge.net/projects/boost/files/boost-binaries/1.55.0-build2/ (At the moment the recommended install file name is: boost_1_55_0-msvc-9.0-32.exe newer boost releases should work as well)
+
* 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...)
 
+
=== Run CEED ===
+
 
+
* Go to your CEED bin folder, e.g.: A:\Programs\CEED\bin
+
* Edit runwrapper.bat so that the relative path CEGUI_BUILD_PATH matches your CEGUI folder
+
* Run the batch file
+
* Type "python ceed-gui" and click enter, which should startup CEED
+
  
 
== Build pyCEGUI ==
 
== Build pyCEGUI ==
Line 42: Line 42:
 
* Add the usual CEGUI dependencies to their usual spot (dependencies folder)
 
* Add the usual CEGUI dependencies to their usual spot (dependencies folder)
 
* 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
 
* 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 paths to your Python and boost '''.lib files''' and and '''include directories''' in CMake (Boost_PYTHON_LIBRARY_DEBUG, Boost_PYTHON_LIBRARY_RELEASE, Boost_SYSTEM_LIBRARY_DEBUG, Boost_SYSTEM_LIBRARY_RELEASE, Boost_INCLUDE_DIR, PYTHON_INCLUDE_DIR, PYTHON_LIBRARY, PYTHON_EXECUTABLE)
+
 
** The boost.find stuff is usually unreliable and I do not personally know how to solve this and unfortunately have no time to look at it at all. Also, as of now, setting your directory doesnt help at all unfortunately.<br/>What I suggest to do is to set these paths manually:<br/><br/>Open up the CMake GUI for your build and check the "Grouped" and "Advanced" checkoxes (which i btw always recommend to have checked). To limit the displayed results you can enter "boost" into the "Search" filter. You should see a group called "Boost". Now open up the group "Boost" by clicking on it. There you will see all described variables. Click on the right field for each and then on the "..." button to open a dialogue for selecting your directory or path. Some of the variables ask for directories: usually those are variables ending with "_DIR". The other variables look for files, in this case it should be the ones ending with "_DEBUG" and "_RELEASE". Be sure you link to the right files and directories.<br/><br/>Examples on my setup:
+
** When you hit 'configure' in cmake, it will fail to automatically detect boost, and so the following paths _MUST_ be set manually by the user:
*** Boost_LIBRARY_DIR = A:/Programs/boost_1_55_0/lib32-msvc-9.0
+
 
*** Boost_PYTHON_LIBRARY_RELEASE = A:/Programs/boost_1_55_0/lib32-msvc-9.0/boost_python-vc90-mt-1_55.lib
+
These are directory paths and file-paths to location inside the boost and Python distribution you installed in a previous step.
*** The library files for debug contain a "gd" in their name before the version numbers, according to boost's conventions. Since you can run CEED with only a pyCEGUI Release build, you can leave out all Debug files if you want.
+
(Here are examples of what they are set to on my machine)
 +
 
 +
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
 +
 
 +
The following variables may auto-find correctly cmake, but if not, here are examples of mine:
 +
 +
PYTHON_INCLUDE_DIR                C:/Python27/include
 +
PYTHON_LIBRARY                    C:/Python27/libs/python27.lib
 +
PYTHON_EXECUTABLE                  C:/Python27/python.exe
 +
 
 
* Unselect Building the samples and select only OpenGL3 and OpenGL out of the available renderers to build
 
* Unselect Building the 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 and generate, it should work without errors
 
* Click configure and generate, it should work without errors
 
* Open the generated solution in the build folder and build it (You need 'Release' mode only)
 
* Open the generated solution in the build folder and build it (You need 'Release' mode only)
 +
** Go for a long walk along a beach. Building pyCEGUI & pyCEGUI_Renderer will take quite a long time.
  
 
== Setup pyCEGUI dll dependencies ==
 
== Setup pyCEGUI dll dependencies ==
Line 59: Line 73:
 
*** pcre.dll
 
*** pcre.dll
 
** 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
+
*** boost_python-vc90-mt-1_55.dll (Or higher, depending on your version of MSVS & the boost lib folder you are using.)
 +
 
 +
=== Run CEED ===
 +
* Go to your CEED bin folder, e.g.: A:\Programs\CEED\bin
 +
* Edit runwrapper.bat so that the relative path CEGUI_BUILD_PATH matches your CEGUI folder
 +
* Run the batch file
 +
 
 +
=== CEED-Migrate ===
 +
You can also migrate your old CEGUI_0.7.x data files by running "Python ceed-migrate [params]" or by creating a batch file similar to to runwrapper.bat to process all of your old data files.

Revision as of 05:49, 11 June 2014

(Written by Ident (Lukas Meindl). Works to date: 9. June, 2014) (Modified by Nickenstein79 on 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.

Clone CEED repository

Using whatever source-control software you use (I'm using TortoiseHG) clone the following CEED repository, and verify that you are on the v0-8 branch. TODO - LINK NEEDED HERE!


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.)

Installing Python

  • Get Python 2.7.7 (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\Programs\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.6 (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 Windows PowerShell 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

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...)

Build pyCEGUI

  • 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
  • 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 usual CEGUI dependencies to their usual spot (dependencies folder)
  • 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
    • When you hit 'configure' in cmake, it will fail to automatically detect boost, and so the following paths _MUST_ be set manually by the user:

These are directory paths and file-paths to location inside the boost and Python distribution you installed in a previous step. (Here are examples of what they are set to on my machine)

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

The following variables may auto-find correctly cmake, but if not, here are examples of mine:

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

  • Unselect Building the 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 and generate, it should work without errors
  • Open the generated solution in the build folder and build it (You need 'Release' mode only)
    • Go for a long walk along a beach. Building pyCEGUI & pyCEGUI_Renderer will take quite a long time.

Setup 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.)

Run CEED

  • Go to your CEED bin folder, e.g.: A:\Programs\CEED\bin
  • Edit runwrapper.bat so that the relative path CEGUI_BUILD_PATH matches your CEGUI folder
  • Run the batch file

CEED-Migrate

You can also migrate your old CEGUI_0.7.x data files by running "Python ceed-migrate [params]" or by creating a batch file similar to to runwrapper.bat to process all of your old data files.