build: Use PythonDir in Visual Studio projects
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 28 Aug 2017 06:58:42 +0000 (14:58 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 28 Aug 2017 07:55:59 +0000 (15:55 +0800)
This is to avoid any confusion with the PYTHONPATH envvar that is used
by Python for additional locations for looking for modules.

build/win32/vs10/README.txt
build/win32/vs10/gtk3-gen-srcs.props
build/win32/vs10/gtk3-install.propsin
build/win32/vs10/gtk3-version-paths.props.in
build/win32/vs9/README.txt
build/win32/vs9/gtk3-gen-srcs.vsprops
build/win32/vs9/gtk3-install.vspropsin
build/win32/vs9/gtk3-version-paths.vsprops.in

index 3ccb1872193a79664394ec19565922d92509989e..13ae0e3c5bb3da6911503b9cc26ec0c755b8bab6 100644 (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\r
 http://www.python.org.  Please note that the Python interpretor (python.exe)\r
 either needs to be in your PATH before attempting the build of GTK+, or it\r
-can be found in the path specified by PythonPath in gtk-version-paths.props.\r
-If you happen to change the PythonPath setting in gtk-version-paths.props after\r
+can be found in the path specified by PythonDir in gtk-version-paths.props.\r
+If you happen to change the PythonDir setting in gtk-version-paths.props after\r
 opening gtk+.sln with Visual Studio, you will need to close the gtk+.sln solution,\r
 delete all the *.sdf, *.suo and *.user files before re-attempting the build.\r
 \r
index e5e9c021b9339abc30c10ac61715d2b68ac08146..74f7edcfc745e6b731c9b3ba6902acf45155bc40 100644 (file)
@@ -39,10 +39,10 @@ echo $(Configuration) &gt; ..\..\..\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>
index 57625fb44d495946e4678e6a5d2ae8497bbe8d4b..1d527fc04e7cda0fc4fb9f2c0675945a7742ed3a 100644 (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>
index 8c3e3d65855a0b4edee40c445a707404fbc67dcc..cf35781a7b8df30e93419e49c2de31cde9dde792 100644 (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>
     <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>
index 974f1381eb924c69b6e62998fc2bf5302d6c7cbb..7f83daaeea5138f8c25873775586b34df0e2a049 100644 (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\r
 http://www.python.org.  Please note that the Python interpretor (python.exe)\r
 either needs to be in your PATH before attempting the build of GTK+, or it\r
-can be found in the path specified by PythonPath in gtk-version-paths.vsprops.\r
-If you happen to change the PythonPath setting in gtk-version-paths.vsprops after\r
+can be found in the path specified by PythonDir in gtk-version-paths.vsprops.\r
+If you happen to change the PythonDir setting in gtk-version-paths.vsprops after\r
 opening gtk+.sln with Visual Studio, you will need to close the gtk+.sln solution,\r
 delete all the *.ncb, *.suo and *.user files before re-attempting the build.\r
 \r
index c221fc4e04c8db490ee4518d1cd2c53b8f96d318..a637c025094c6fde6efc1ade9e0785eb409e59ba 100644 (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"
index 64b33b4040df9794d886ba504afdf2a345405d1c..d0dab458ec0575b89244452bb8bdbc85ffad57b9 100644 (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>
index 7d031c95d977da7e823bed27d61205832fd56c91..90b03bef3a3c5a5104fdc27f5df4be98c625c5a5 100644 (file)
                Value="$(GtkSeparateVSDllSuffix)"
        />
        <UserMacro
-               Name="PythonPath"
+               Name="PythonDir"
                Value="c:\python27"
        />
        <UserMacro
-               Name="PythonPathX64"
-               Value="$(PythonPath).x64"
+               Name="PythonDirX64"
+               Value="$(PythonDir).x64"
        />
 </VisualStudioPropertySheet>