build: Use PythonDir in Visual Studio projects

This is to avoid any confusion with the PYTHONPATH envvar that is used
by Python for additional locations for looking for modules.
This commit is contained in:
Chun-wei Fan 2017-08-28 14:58:42 +08:00
parent f68421376b
commit 74ffc85b80
8 changed files with 23 additions and 23 deletions

View File

@ -24,8 +24,8 @@ 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
http://www.python.org. Please note that the Python interpretor (python.exe)
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
can be found in the path specified by PythonDir in gtk-version-paths.props.
If you happen to change the PythonDir 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.

View File

@ -39,10 +39,10 @@ echo $(Configuration) > ..\..\..\MSVC_$(Configuration)_Broadway
:DONE_GDKCONFIG_H
</GenGdkConfigHBroadway>
<GDbusCodeGenCmd>$(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml</GDbusCodeGenCmd>
<GenerateGtkDbusBuiltSources>cd ..\..\..\gtk &amp; $(PythonPath)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSources>
<GenerateGtkDbusBuiltSourcesX64>cd ..\..\..\gtk &amp; $(PythonPathX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSourcesX64>
<GenerateGtkDbusBuiltSources>cd ..\..\..\gtk &amp; $(PythonDir)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSources>
<GenerateGtkDbusBuiltSourcesX64>cd ..\..\..\gtk &amp; $(PythonDirX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSourcesX64>
<CopyGtkWin32RC>copy ..\..\..\gtk\gtk-win32.rc.body ..\..\..\gtk\gtk-win32.rc</CopyGtkWin32RC>
<GenerateGtkWin32Manifest>$(PythonPath)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*</GenerateGtkWin32Manifest>
<GenerateGtkWin32Manifest>$(PythonDir)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*</GenerateGtkWin32Manifest>
<CopyDemosH>copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h</CopyDemosH>
</PropertyGroup>
<PropertyGroup>

View File

@ -133,8 +133,8 @@ $(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\sch
echo "Generating icon cache......"
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
</GtkPostInstall>
<GenerateGtkPC>$(PythonPath)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonPathX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GenerateGtkPC>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonDirX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GtkPCFiles>..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc</GtkPCFiles>
</PropertyGroup>
<PropertyGroup>

View File

@ -12,8 +12,8 @@
<GtkSeparateVSDllSuffix>-vs$(VSVer)</GtkSeparateVSDllSuffix>
<GtkDllPrefix>$(GtkSeparateVSDllPrefix)</GtkDllPrefix>
<GtkDllSuffix>$(GtkSeparateVSDllSuffix)</GtkDllSuffix>
<PythonPath>c:\python34</PythonPath>
<PythonPathX64>$(PythonPath).x64</PythonPathX64>
<PythonDir>c:\python34</PythonDir>
<PythonDirX64>$(PythonDir).x64</PythonDirX64>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3versionpathsprops</_PropertySheetDisplayName>
@ -52,11 +52,11 @@
<BuildMacro Include="GtkDllSuffix">
<Value>$(GtkDllSuffix)</Value>
</BuildMacro>
<BuildMacro Include="PythonPath">
<Value>$(PythonPath)</Value>
<BuildMacro Include="PythonDir">
<Value>$(PythonDir)</Value>
</BuildMacro>
<BuildMacro Include="PythonPathX64">
<Value>$(PythonPathX64)</Value>
<BuildMacro Include="PythonDirX64">
<Value>$(PythonDirX64)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@ -23,8 +23,8 @@ 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
http://www.python.org. Please note that the Python interpretor (python.exe)
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
can be found in the path specified by PythonDir in gtk-version-paths.vsprops.
If you happen to change the PythonDir 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.

View File

@ -60,11 +60,11 @@ echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)_Broadway&#x0D;
/>
<UserMacro
Name="GenerateGtkDbusBuiltSources"
Value="cd ..\..\..\gtk &amp; $(PythonPath)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)"
Value="cd ..\..\..\gtk &amp; $(PythonDir)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)"
/>
<UserMacro
Name="GenerateGtkDbusBuiltSourcesX64"
Value="cd ..\..\..\gtk &amp; $(PythonPathX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)"
Value="cd ..\..\..\gtk &amp; $(PythonDirX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)"
/>
<UserMacro
Name="CopyGtkWin32RC"
@ -72,7 +72,7 @@ echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)_Broadway&#x0D;
/>
<UserMacro
Name="GenerateGtkWin32Manifest"
Value="$(PythonPath)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*"
Value="$(PythonDir)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*"
/>
<UserMacro
Name="CopyDemosH"

View File

@ -156,10 +156,10 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway&#x0D;&#x0A;
/>
<UserMacro
Name="GenerateGtkPC"
Value="$(PythonPath)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)"
Value="$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)"
/>
<UserMacro
Name="GenerateGtkPCX64"
Value="$(PythonPathX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)"
Value="$(PythonDirX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)"
/>
</VisualStudioPropertySheet>

View File

@ -51,11 +51,11 @@
Value="$(GtkSeparateVSDllSuffix)"
/>
<UserMacro
Name="PythonPath"
Name="PythonDir"
Value="c:\python27"
/>
<UserMacro
Name="PythonPathX64"
Value="$(PythonPath).x64"
Name="PythonDirX64"
Value="$(PythonDir).x64"
/>
</VisualStudioPropertySheet>