Make Visual Studio Build Process A Bit Simpler

Add some flexibility in the property sheets for one building GTK+ that it
also searches for a settable installation path of Python, in addition to
searching the PATH for an installation of the Python interpretor.  This
currently defaults to Python 2.7.x, which is normally installed in
c:\python27 on Windows by default.  Also tell people in the README.txt's
for the Visual Studio builds
This commit is contained in:
Chun-wei Fan 2014-02-21 18:00:29 +08:00
parent 55b0019589
commit 465005f929
6 changed files with 24 additions and 4 deletions

View File

@ -20,10 +20,14 @@ ATK and GLib. External dependencies are at least Cairo
gettext-runtime, fontconfig*, freetype*, expat*. See the gettext-runtime, fontconfig*, freetype*, expat*. See the
build/win32/vs10/README.txt file in glib for details where to unpack them. build/win32/vs10/README.txt file in glib for details where to unpack them.
You will also need a Python 2.x/3.x interpretor installed on your system, You will also need a Python 2.6+/3.x interpretor installed on your system,
which can be obtained from the official installers available from which can be obtained from the official installers available from
http://www.python.org. Please note that the Python interpretor (python.exe) http://www.python.org. Please note that the Python interpretor (python.exe)
needs to be in your PATH before attempting the build of GTK+. either needs to be in your PATH before attempting the build of GTK+, or it
can be found in the path specified by PythonPath in gtk-version-paths.props.
If you happen to change the PythonPath setting in gtk-version-paths.props after
opening gtk+.sln with Visual Studio, you will need to close the gtk+.sln solution,
delete all the *.sdf, *.suo and *.user files before re-attempting the build.
It is recommended that one builds the dependencies with VS10 as far as It is recommended that one builds the dependencies with VS10 as far as
possible, especially those from and using the GTK+ stack (i.e. GLib, possible, especially those from and using the GTK+ stack (i.e. GLib,

View File

@ -58,6 +58,8 @@ echo $(Configuration) > ..\..\..\MSVC_$(Configuration)
:DONE_GDKCONFIG_H :DONE_GDKCONFIG_H
</GenGdkConfigHBroadway> </GenGdkConfigHBroadway>
<GenerateGtkDbusBuiltSources> <GenerateGtkDbusBuiltSources>
set PATH=$(PATH);$(PythonPath)
cd ..\..\..\gtk cd ..\..\..\gtk
python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml

View File

@ -12,6 +12,7 @@
<GtkSeparateVSDllSuffix>-3-vs$(VSVer)</GtkSeparateVSDllSuffix> <GtkSeparateVSDllSuffix>-3-vs$(VSVer)</GtkSeparateVSDllSuffix>
<GtkDllPrefix>$(GtkSeparateVSDllPrefix)</GtkDllPrefix> <GtkDllPrefix>$(GtkSeparateVSDllPrefix)</GtkDllPrefix>
<GtkDllSuffix>$(GtkSeparateVSDllSuffix)</GtkDllSuffix> <GtkDllSuffix>$(GtkSeparateVSDllSuffix)</GtkDllSuffix>
<PythonPath>c:\python27</PythonPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<_PropertySheetDisplayName>gtkversionpathsprops</_PropertySheetDisplayName> <_PropertySheetDisplayName>gtkversionpathsprops</_PropertySheetDisplayName>
@ -50,5 +51,8 @@
<BuildMacro Include="GtkDllSuffix"> <BuildMacro Include="GtkDllSuffix">
<Value>$(GtkDllSuffix)</Value> <Value>$(GtkDllSuffix)</Value>
</BuildMacro> </BuildMacro>
<BuildMacro Include="PythonPath">
<Value>$(PythonPath)</Value>
</BuildMacro>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -19,10 +19,14 @@ ATK and GLib. External dependencies are at least Cairo
gettext-runtime, fontconfig*, freetype*, expat*. See the gettext-runtime, fontconfig*, freetype*, expat*. See the
build/win32/vs9/README.txt file in glib for details where to unpack them. build/win32/vs9/README.txt file in glib for details where to unpack them.
You will also need a Python 2.x/3.x interpretor installed on your system, You will also need a Python 2.6+/3.x interpretor installed on your system,
which can be obtained from the official installers available from which can be obtained from the official installers available from
http://www.python.org. Please note that the Python interpretor (python.exe) http://www.python.org. Please note that the Python interpretor (python.exe)
needs to be in your PATH before attempting the build of GTK+. either needs to be in your PATH before attempting the build of GTK+, or it
can be found in the path specified by PythonPath in gtk-version-paths.vsprops.
If you happen to change the PythonPath setting in gtk-version-paths.vsprops after
opening gtk+.sln with Visual Studio, you will need to close the gtk+.sln solution,
delete all the *.ncb, *.suo and *.user files before re-attempting the build.
It is recommended that one builds the dependencies with VS9 as far as It is recommended that one builds the dependencies with VS9 as far as
possible, especially those from and using the GTK+ stack (i.e. GLib, possible, especially those from and using the GTK+ stack (i.e. GLib,

View File

@ -57,6 +57,8 @@ echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)&#x0D;&#x0A;
<UserMacro <UserMacro
Name="GenerateGtkDbusBuiltSources" Name="GenerateGtkDbusBuiltSources"
Value=" Value="
set PATH=$(PATH);$(PythonPath)&#x0D;&#x0A;
cd ..\..\..\gtk&#x0D;&#x0A; cd ..\..\..\gtk&#x0D;&#x0A;
python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml&#x0D;&#x0A; python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml&#x0D;&#x0A;
cd $(SolutionDir)&#x0D;&#x0A; cd $(SolutionDir)&#x0D;&#x0A;

View File

@ -50,4 +50,8 @@
Name="GtkDllSuffix" Name="GtkDllSuffix"
Value="$(GtkSeparateVSDllSuffix)" Value="$(GtkSeparateVSDllSuffix)"
/> />
<UserMacro
Name="PythonPath"
Value="c:\python27"
/>
</VisualStudioPropertySheet> </VisualStudioPropertySheet>