[gtksourceview] Visual Studio builds: Record version info in property sheets



commit 13dc43425c252434b8d749d0d6689cfc2e72456d
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Mar 8 18:21:03 2017 +0800

    Visual Studio builds: Record version info in property sheets
    
    We actually have the version info in the property sheets that are filled
    in when ./configure is run, and that is being dist'ed.  Now we have
    specific fields for them, so that they can be easily reused.

 configure.ac                                       |    4 +-
 ...srcs.props.in => gtksourceview4-gen-srcs.props} |    6 ++--
 ...props => gtksourceview4-version-paths.props.in} |   23 +++++++++++++------
 ....vsprops.in => gtksourceview4-gen-srcs.vsprops} |    6 ++--
 ...ops => gtksourceview4-version-paths.vsprops.in} |   12 ++++++++++
 5 files changed, 36 insertions(+), 15 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index dccd3be..890b00c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -236,9 +236,9 @@ Makefile
 config.h.win32
 win32/Makefile
 win32/vs9/Makefile
-win32/vs9/gtksourceview${GSV_API_VERSION}-gen-srcs.vsprops
+win32/vs9/gtksourceview${GSV_API_VERSION}-version-paths.vsprops
 win32/vs10/Makefile
-win32/vs10/gtksourceview${GSV_API_VERSION}-gen-srcs.props
+win32/vs10/gtksourceview${GSV_API_VERSION}-version-paths.props
 win32/vs11/Makefile
 win32/vs12/Makefile
 win32/vs14/Makefile
diff --git a/win32/vs10/gtksourceview4-gen-srcs.props.in b/win32/vs10/gtksourceview4-gen-srcs.props
similarity index 92%
rename from win32/vs10/gtksourceview4-gen-srcs.props.in
rename to win32/vs10/gtksourceview4-gen-srcs.props
index 66347c9..96ea818 100644
--- a/win32/vs10/gtksourceview4-gen-srcs.props.in
+++ b/win32/vs10/gtksourceview4-gen-srcs.props
@@ -10,9 +10,9 @@ CALL gen-enums.bat $(GlibEtcInstallRoot)
 cd $(SolutionDir)
     </GenerateEnums>
     <GenerateRsrcSrc>$(GlibEtcInstallRoot)\bin\glib-compile-resources 
--target=..\..\gtksourceview\gtksourceview-resources.c --generate-source --sourcedir=..\..\gtksourceview 
..\..\gtksourceview\gtksourceview.gresource.xml</GenerateRsrcSrc>
-    <GenGtksourceVersionH>$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.in --output=..\..\gtksourceview\gtksourceversion.h.tmp1 
--var=GTK_SOURCE_MAJOR_VERSION --outstring=@GTK_SOURCE_MAJOR_VERSION@
-$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.tmp1 --output=..\..\gtksourceview\gtksourceversion.h.tmp2 
--var=GTK_SOURCE_MINOR_VERSION --outstring=@GTK_SOURCE_MINOR_VERSION@
-$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.tmp2 --output=..\..\gtksourceview\gtksourceversion.h 
--var=GTK_SOURCE_MICRO_VERSION --outstring=@GTK_SOURCE_MICRO_VERSION@
+    <GenGtksourceVersionH>$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.in --output=..\..\gtksourceview\gtksourceversion.h.tmp1 
--var=GTK_SOURCE_MAJOR_VERSION --outstring=$(GtkSourceviewMajorVersion)
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.tmp1 --output=..\..\gtksourceview\gtksourceversion.h.tmp2 
--var=GTK_SOURCE_MINOR_VERSION --outstring=$(GtkSourceviewMinorVersion)
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.tmp2 --output=..\..\gtksourceview\gtksourceversion.h 
--var=GTK_SOURCE_MICRO_VERSION --outstring=$(GtkSourceviewMicroVersion)
 del ..\..\gtksourceview\gtksourceversion.h.tmp1 ..\..\gtksourceview\gtksourceversion.h.tmp2
     </GenGtksourceVersionH>
   </PropertyGroup>
diff --git a/win32/vs10/gtksourceview4-version-paths.props b/win32/vs10/gtksourceview4-version-paths.props.in
similarity index 80%
rename from win32/vs10/gtksourceview4-version-paths.props
rename to win32/vs10/gtksourceview4-version-paths.props.in
index 54aa067..2b1f342 100644
--- a/win32/vs10/gtksourceview4-version-paths.props
+++ b/win32/vs10/gtksourceview4-version-paths.props.in
@@ -2,10 +2,13 @@
 <Project DefaultTargets="Build" ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
   <PropertyGroup Label="UserMacros">
     <VSVer>10</VSVer>
+    <GtkSourceviewMajorVersion>@GTK_SOURCE_MAJOR_VERSION@</GtkSourceviewMajorVersion>
+    <GtkSourceviewMinorVersion>@GTK_SOURCE_MINOR_VERSION@</GtkSourceviewMinorVersion>
+    <GtkSourceviewMicroVersion>@GTK_SOURCE_MICRO_VERSION@</GtkSourceviewMicroVersion>
+    <ApiVersion>4</ApiVersion>
     <GlibEtcInstallRoot>$(SolutionDir)\..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot>
     <CopyDir>$(GlibEtcInstallRoot)</CopyDir>
     <DefDir>$(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)</DefDir>
-    <ApiVersion>4</ApiVersion>
     <GtkSourceviewLibtoolCompatibleDllPrefix>lib</GtkSourceviewLibtoolCompatibleDllPrefix>
     <GtkSourceviewLibtoolCompatibleDllSuffix>-$(ApiVersion).0-0</GtkSourceviewLibtoolCompatibleDllSuffix>
     <GtkSourceviewSeparateVSDllPrefix />
@@ -21,21 +24,27 @@
     <BuildMacro Include="VSVer">
       <Value>$(VSVer)</Value>
     </BuildMacro>
+    <BuildMacro Include="GtkSourceviewMajorVersion">
+      <Value>$(GtkSourceviewMajorVersion)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GtkSourceviewMinorVersion">
+      <Value>$(GtkSourceviewMinorVersion)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GtkSourceviewMicroVersion">
+      <Value>$(GtkSourceviewMicroVersionn)</Value>
+    </BuildMacro>
+    <BuildMacro Include="ApiVersion">
+      <Value>$(ApiVersion)</Value>
+    </BuildMacro>
     <BuildMacro Include="GlibEtcInstallRoot">
       <Value>$(GlibEtcInstallRoot)</Value>
     </BuildMacro>
-    <BuildMacro Include="GlibEtcInstallRootFromBuildWin32">
-      <Value>$(GlibEtcInstallRootFromBuildWin32)</Value>
-    </BuildMacro>
     <BuildMacro Include="CopyDir">
       <Value>$(CopyDir)</Value>
     </BuildMacro>
     <BuildMacro Include="DefDir">
       <Value>$(DefDir)</Value>
     </BuildMacro>
-    <BuildMacro Include="ApiVersion">
-      <Value>$(ApiVersion)</Value>
-    </BuildMacro>
     <BuildMacro Include="GtkSourceviewLibtoolCompatibleDllPrefix">
       <Value>$(GtkSourceviewLibtoolCompatibleDllPrefix)</Value>
     </BuildMacro>
diff --git a/win32/vs9/gtksourceview4-gen-srcs.vsprops.in b/win32/vs9/gtksourceview4-gen-srcs.vsprops
similarity index 90%
rename from win32/vs9/gtksourceview4-gen-srcs.vsprops.in
rename to win32/vs9/gtksourceview4-gen-srcs.vsprops
index ee17404..07072df 100644
--- a/win32/vs9/gtksourceview4-gen-srcs.vsprops.in
+++ b/win32/vs9/gtksourceview4-gen-srcs.vsprops
@@ -26,9 +26,9 @@ $(GlibEtcInstallRoot)\bin\glib-compile-resources --target=..\..\gtksourceview\gt
        <UserMacro
                Name="GenGtksourceVersionH"
                Value="
-$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.in --output=..\..\gtksourceview\gtksourceversion.h.tmp1 
--var=GTK_SOURCE_MAJOR_VERSION --outstring=@GTK_SOURCE_MAJOR_VERSION@&#x0D;&#x0A;
-$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.tmp1 --output=..\..\gtksourceview\gtksourceversion.h.tmp2 
--var=GTK_SOURCE_MINOR_VERSION --outstring=@GTK_SOURCE_MINOR_VERSION@&#x0D;&#x0A;
-$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.tmp2 --output=..\..\gtksourceview\gtksourceversion.h 
--var=GTK_SOURCE_MICRO_VERSION --outstring=@GTK_SOURCE_MICRO_VERSION@&#x0D;&#x0A;
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.in --output=..\..\gtksourceview\gtksourceversion.h.tmp1 
--var=GTK_SOURCE_MAJOR_VERSION --outstring=$(GtkSourceviewMajorVersion)&#x0D;&#x0A;
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.tmp1 --output=..\..\gtksourceview\gtksourceversion.h.tmp2 
--var=GTK_SOURCE_MINOR_VERSION --outstring=$(GtkSourceviewMinorVersion)&#x0D;&#x0A;
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.tmp2 --output=..\..\gtksourceview\gtksourceversion.h 
--var=GTK_SOURCE_MICRO_VERSION --outstring=$(GtkSourceviewMicroVersion)&#x0D;&#x0A;
 del ..\..\gtksourceview\gtksourceversion.h.tmp1 ..\..\gtksourceview\gtksourceversion.h.tmp2&#x0D;&#x0A;
                      "
        />
diff --git a/win32/vs9/gtksourceview4-version-paths.vsprops 
b/win32/vs9/gtksourceview4-version-paths.vsprops.in
similarity index 83%
rename from win32/vs9/gtksourceview4-version-paths.vsprops
rename to win32/vs9/gtksourceview4-version-paths.vsprops.in
index 5a1a8cd..b045aa9 100644
--- a/win32/vs9/gtksourceview4-version-paths.vsprops
+++ b/win32/vs9/gtksourceview4-version-paths.vsprops.in
@@ -5,6 +5,18 @@
        Name="gtksourceview4versionpathsprops"
        >
        <UserMacro
+               Name="GtkSourceviewMajorVersion"
+               Value="@GTK_SOURCE_MAJOR_VERSION@"
+       />
+       <UserMacro
+               Name="GtkSourceviewMinorVersion"
+               Value="@GTK_SOURCE_MINOR_VERSION@"
+       />
+       <UserMacro
+               Name="GtkSourceviewMicroVersion"
+               Value="@GTK_SOURCE_MICRO_VERSION@"
+       />
+       <UserMacro
                Name="ApiVersion"
                Value="4"
        />


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]