Windows

  • Good news #1: Microsoft has released Visual C++ Express 2008 (it's freely available)
  • Good news #2: Trolltech has released Qt-4.4.1 for Windows, with configuration for MSVC 2008
  • Good news #3: We have released Graphite-2.0, that works with MSVC 2008 and Qt-4.4.1 :-) !

1) Prerequisites:

  • Visual C++ >= 7.0
       Visual C++ Express 2010 is not supported yet.
       Works with Visual C++ Express 2008.
       --> download from http://www.microsoft.com/express/Downloads/ (on the 'Visual Studio 2008 Express' tab)
           Note: you'll need to register within 30 days (but this is easy and free).
           Also, you won't be able to build x64 binaries with the Express version (or at least, not easily). 
           Only the full version of Visual Studio has full x64 support.
  • Python >= 2.5:
       --> run Windows installer from: http://www.python.org/download/
           Note: Python 2.6 support is only available for 2.0-a2 and newer versions.
                 Python 3.0 is not supported yet.
                 If you use Visual C++ Express, you must have a 32 bit version of Python.
  • CMake >= 2.4:
       --> run Windows installer from: http://www.cmake.org/cmake/resources/software.html
  • Qt4
       -->Download the 'Framework Only' package for VS2008 from http://qt.nokia.com/downloads, LGPL version. 
          Install it in the default path.
          Add the path to the Qt bin folder to your 'Path' environment variable:
              In System > Advanced System Properties > Environment Variables, add ";C:\Qt\<version>\bin\"
              (where <version> is the Qt version) to the 'Path' variable.
          If you don't have access to the environment variables, just copy 'QtCore4.dll', 'QtGui4.dll'
          and 'QtOpenGL4.dll' in the Graphite binary directory (GraphiteTwo\build\Windows\binaries\bin\Release)
          AFTER compiling Graphite for the first time.
  • Graphite sources
       --> Download source archive from Inria GForge
       OR
       --> Get the latest sources from the inriaGfoge Graphite SVN repository (can be broken sometimes)
          * if you don't already have one, download and install a SVN client (instruction will be given for TortoiseSVN).
          * checkout the sources from Graphite SVN repository:
            * create the directory in which you want the sources to be (e.g. ...\GraphiteTwo)
            * right click on the directory > SVN checkout > url of repository : svn://scm.gforge.inria.fr/svn/graphite/GraphiteTwo
            * wait for the checkout to finish, it can take several minutes.

2) Prepare Graphite build

  • if you chose to download the source archive, unpack it (e.g. in My documents\programming)
  • run CMake:
      --> use the BAT script ..\GraphiteTwo\configure.bat. It can be edited to create solution for other versions of VS (useful for 64bits for example).
      OR
      --> * run CMake-gui:
            Directory:       ...\GraphiteTwo
            Build directory: ...\GraphiteTwo\build\Windows
           The build location must be somewhere in the GraphiteTwo folder for now.
         * Push 'configure' ... wait  (OK is still grayed out)
         * Push 'configure' a second time  (now OK is no longer grayed out)
         * Push 'OK'

3) Build Graphite

  • Open ...\GraphiteTwo\build\Windows\Graphite.sln in Visual C++
  • Build -> Configuration Manager -> Release
  • Set 'graphite' as startup project (right click in project-list)
  • Build solution
  • ctrl + f5 to run Graphite

4) You can create a shortcut to

...\GraphiteTwo\build\Windows\binaries\Release\bin\graphite.exe

Known problems

  • It seems that Qt 4.6.3 causes some problems, use versions below 4.6.2 or above 4.7.1.
  • If upon running Graphite it complains about QtCore4.dll missing, either add ";C:\Qt\<version>\bin\" to your "Path" environment variable and reboot VC++, or copy 'QtCore4.dll', 'QtGui4.dll' and 'QtOpenGL4.dll' in the Graphite binary directory (GraphiteTwo\build\Windows\binaries\bin\Release).
  • If compilation fails in devel and quick_start (complains about missing libraries), you can either
    • remove them from the SUBDIRS statement in src/packages/OGF/CMakeLists.txt (then re-launch CMake and re-build)
    • or fix the problem by adding gom_basic to the list of dependencies in OGF/devel/CMakeLists.txt and OGF/quick_start/CMakeLists.txt
  • On some computers, you cannot quit Graphite properly (this freezes Graphite). Then you need to kill Graphite from the task manager. We are investigating this...
  • We do not know whether this works with other versions of Visual C++ (in both cases, we are interested in some feedback)
  • Some folks like to have a DOS window, for displaying the standard output, to do so, proceed as follows:
    • In the solution explorer, right click on the Graphite project, and choose "project configuration"
    • In the Linker category, System subcategory, Subsystem: choose "Console" instead of "Windows" and rebuild Graphite
  • Having multiple versions of Visual C++ installed can result in problems with CMake, uninstall older versions if CMake complains about MSVCR90d.dll missing.