From 3e4a2e1bb438ecc8b9647ff0d408a9c87b0a1651 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Tue, 20 Dec 2011 22:41:36 +0800 Subject: [PATCH] Bug 666349: Update MSVC files to compile SDL winsys This had to be in another commit as git am did not like a mixture of file updates with Windows and Unix EOL. Should deal with the conflicts that Neil talked about in his comments for the bug :) --- build/win32/vs10/README.txt | 6 ++++++ build/win32/vs10/cogl.props | 23 ++++++++++++++++------- build/win32/vs9/README.txt | 12 ++++++++++++ build/win32/vs9/cogl.vsprops | 20 ++++++++++++++++---- 4 files changed, 50 insertions(+), 11 deletions(-) diff --git a/build/win32/vs10/README.txt b/build/win32/vs10/README.txt index 304745cbe..01b6514ba 100644 --- a/build/win32/vs10/README.txt +++ b/build/win32/vs10/README.txt @@ -27,6 +27,12 @@ where to unpack them. It is recommended that at least the dependencies from GNOME are also built with VS10 to avoid crashes caused by mixing different CRTs-please see also the build/win32/vs10/README.txt in those respective packages. +If building the SDL winsys is desired, you will also need the SDL libraries +from www.libsdl.org-building the SDL source package with Visual C++ 2008 +is recommended (working Visual C++ 2005 projects are included with it, upgrade +the projects one prompted), but one may want to use the VC8 binary packages +from that website. + The recommended build sequence of the dependencies are as follows (the non-GNOME packages that are not downloaded as binaries from ftp://ftp.gnome.org have makefiles and/or VS project files that can be used to compile with VS directly, diff --git a/build/win32/vs10/cogl.props b/build/win32/vs10/cogl.props index 9c2a3f3f8..a5a0cdeeb 100644 --- a/build/win32/vs10/cogl.props +++ b/build/win32/vs10/cogl.props @@ -11,6 +11,16 @@ G_LOG_DOMAIN="Cogl-Pango" CLUTTER_COMPILATION;TESTS_DATADIR="../share/cogl-$(CoglApiVersion)/tests" $(GlibEtcInstallRoot) + +if exist ..\..\..\cogl\cogl-defines.h goto DONE_COGL_DEFINES_H +copy ..\..\..\cogl\cogl-defines.h.win32_sdl ..\..\..\cogl\cogl-defines.h +:DONE_COGL_DEFINES_H + + +if exist ..\..\..\cogl\cogl-defines.h goto DONE_COGL_DEFINES_H +copy ..\..\..\cogl\cogl-defines.h.win32 ..\..\..\cogl\cogl-defines.h +:DONE_COGL_DEFINES_H + if exist ..\..\..\config.h goto DONE_CONFIG_H @@ -19,13 +29,6 @@ copy ..\..\..\config.h.win32 ..\..\..\config.h :DONE_CONFIG_H -if exist ..\..\..\cogl\cogl-defines.h goto DONE_COGL_DEFINES_H - -copy ..\..\..\cogl\cogl-defines.h.win32 ..\..\..\cogl\cogl-defines.h - -:DONE_COGL_DEFINES_H - - cd .. gen-enums.bat $(GlibEtcInstallRoot) @@ -232,6 +235,12 @@ copy ..\..\..\cogl\cogl2-experimental.h $(CopyDir)\include\cogl-$(CoglApiVersion $(TestProgDef) + + $(DoDefinesSDL) + + + $(DoDefinesSDL) + $(PreBuildCmd) diff --git a/build/win32/vs9/README.txt b/build/win32/vs9/README.txt index 925fee44c..4c4b45ab9 100644 --- a/build/win32/vs9/README.txt +++ b/build/win32/vs9/README.txt @@ -14,12 +14,24 @@ first need to use some Unix-like environment or manual work to expand the files needed, like config.h.win32.in into config.h.win32 and the .vcprojin files here into corresponding actual .vcproj files. +Decide whether you want to build the SDL winsys with your COGL build, and +use one of the .sln for building COGL (note that both will build the Windows +OpenGL (WGL) winsys): +-cogl.sln for building COGL without the SDL winsys +-cogl_sdl.sln for building COGL with the SDL winsys + You will need the parts from GNOME: GDK-Pixbuf, Pango* and GLib. External dependencies are at least zlib, libpng, gettext-runtime* and Cairo*, and glext.h from http://www.opengl.org/registry/api/glext.h (which need to be in the GL folder in your include directories or in \vs9\\include\GL). +If building the SDL winsys is desired, you will also need the SDL libraries +from www.libsdl.org-building the SDL source package with Visual C++ 2008 +is recommended (working Visual C++ 2005 projects are included with it, upgrade +the projects one prompted), but one may want to use the VC8 binary packages +from that website. + Please see the README file in the root directory of this Cogl source package for the versions of the dependencies required. See also build/win32/vs9/README.txt in the GLib source package for details diff --git a/build/win32/vs9/cogl.vsprops b/build/win32/vs9/cogl.vsprops index ffa01b930..4ee38babd 100644 --- a/build/win32/vs9/cogl.vsprops +++ b/build/win32/vs9/cogl.vsprops @@ -54,6 +54,22 @@ Name="TestProgDef" Value="CLUTTER_COMPILATION;TESTS_DATADIR=\"../share/cogl-$(CoglApiVersion)/tests\"" /> + +