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 :)
This commit is contained in:
Chun-wei Fan 2011-12-20 22:41:36 +08:00
parent eeffa12188
commit 3e4a2e1bb4
4 changed files with 50 additions and 11 deletions

View File

@ -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 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. 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 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 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, makefiles and/or VS project files that can be used to compile with VS directly,

View File

@ -11,6 +11,16 @@
<CoglPangoBuildDefines>G_LOG_DOMAIN="Cogl-Pango"</CoglPangoBuildDefines> <CoglPangoBuildDefines>G_LOG_DOMAIN="Cogl-Pango"</CoglPangoBuildDefines>
<TestProgDef>CLUTTER_COMPILATION;TESTS_DATADIR="../share/cogl-$(CoglApiVersion)/tests"</TestProgDef> <TestProgDef>CLUTTER_COMPILATION;TESTS_DATADIR="../share/cogl-$(CoglApiVersion)/tests"</TestProgDef>
<CopyDir>$(GlibEtcInstallRoot)</CopyDir> <CopyDir>$(GlibEtcInstallRoot)</CopyDir>
<DoDefinesSDL>
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
</DoDefinesSDL>
<DoDefines>
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
</DoDefines>
<PreBuildCmd> <PreBuildCmd>
if exist ..\..\..\config.h goto DONE_CONFIG_H if exist ..\..\..\config.h goto DONE_CONFIG_H
@ -19,13 +29,6 @@ copy ..\..\..\config.h.win32 ..\..\..\config.h
:DONE_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 .. cd ..
gen-enums.bat $(GlibEtcInstallRoot) gen-enums.bat $(GlibEtcInstallRoot)
@ -232,6 +235,12 @@ copy ..\..\..\cogl\cogl2-experimental.h $(CopyDir)\include\cogl-$(CoglApiVersion
<BuildMacro Include="TestProgDef"> <BuildMacro Include="TestProgDef">
<Value>$(TestProgDef)</Value> <Value>$(TestProgDef)</Value>
</BuildMacro> </BuildMacro>
<BuildMacro Include="DoDefinesSDL">
<Value>$(DoDefinesSDL)</Value>
</BuildMacro>
<BuildMacro Include="DoDefines">
<Value>$(DoDefinesSDL)</Value>
</BuildMacro>
<BuildMacro Include="PreBuildCmd"> <BuildMacro Include="PreBuildCmd">
<Value>$(PreBuildCmd)</Value> <Value>$(PreBuildCmd)</Value>
</BuildMacro> </BuildMacro>

View File

@ -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 the files needed, like config.h.win32.in into config.h.win32 and the
.vcprojin files here into corresponding actual .vcproj files. .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. You will need the parts from GNOME: GDK-Pixbuf, Pango* and GLib.
External dependencies are at least zlib, libpng, External dependencies are at least zlib, libpng,
gettext-runtime* and Cairo*, and glext.h from gettext-runtime* and Cairo*, and glext.h from
http://www.opengl.org/registry/api/glext.h (which need to be in the GL folder http://www.opengl.org/registry/api/glext.h (which need to be in the GL folder
in your include directories or in <root>\vs9\<PlatformName>\include\GL). in your include directories or in <root>\vs9\<PlatformName>\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 Please see the README file in the root directory of this Cogl source package
for the versions of the dependencies required. See also for the versions of the dependencies required. See also
build/win32/vs9/README.txt in the GLib source package for details build/win32/vs9/README.txt in the GLib source package for details

View File

@ -54,6 +54,22 @@
Name="TestProgDef" Name="TestProgDef"
Value="CLUTTER_COMPILATION;TESTS_DATADIR=\&quot;../share/cogl-$(CoglApiVersion)/tests\&quot;" Value="CLUTTER_COMPILATION;TESTS_DATADIR=\&quot;../share/cogl-$(CoglApiVersion)/tests\&quot;"
/> />
<UserMacro
Name="DoDefinesSDL"
Value="
if exist ..\..\..\cogl\cogl-defines.h goto DONE_COGL_DEFINES_H&#x0D;&#x0A;
copy ..\..\..\cogl\cogl-defines.h.win32_sdl ..\..\..\cogl\cogl-defines.h&#x0D;&#x0A;
:DONE_COGL_DEFINES_H&#x0D;&#x0A;
"
/>
<UserMacro
Name="DoDefines"
Value="
if exist ..\..\..\cogl\cogl-defines.h goto DONE_COGL_DEFINES_H&#x0D;&#x0A;
copy ..\..\..\cogl\cogl-defines.h.win32 ..\..\..\cogl\cogl-defines.h&#x0D;&#x0A;
:DONE_COGL_DEFINES_H&#x0D;&#x0A;
"
/>
<UserMacro <UserMacro
Name="PreBuildCmd" Name="PreBuildCmd"
Value=" Value="
@ -61,10 +77,6 @@ if exist ..\..\..\config.h goto DONE_CONFIG_H&#x0D;&#x0A;
copy ..\..\..\config.h.win32 ..\..\..\config.h&#x0D;&#x0A; copy ..\..\..\config.h.win32 ..\..\..\config.h&#x0D;&#x0A;
:DONE_CONFIG_H&#x0D;&#x0A; :DONE_CONFIG_H&#x0D;&#x0A;
if exist ..\..\..\cogl\cogl-defines.h goto DONE_COGL_DEFINES_H&#x0D;&#x0A;
copy ..\..\..\cogl\cogl-defines.h.win32 ..\..\..\cogl\cogl-defines.h&#x0D;&#x0A;
:DONE_COGL_DEFINES_H&#x0D;&#x0A;
cd ..&#x0D;&#x0A; cd ..&#x0D;&#x0A;
gen-enums.bat $(GlibEtcInstallRoot)&#x0D;&#x0A; gen-enums.bat $(GlibEtcInstallRoot)&#x0D;&#x0A;
cd .\vs9&#x0D;&#x0A; cd .\vs9&#x0D;&#x0A;