[gtksourceview/gnome-3-24] Visual Studio builds: Record version info in property sheets



commit 9d72bd198d485e9bc63fa40e10ede783077ed509
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Mar 6 16:24:56 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 => gtksourceview-gen-srcs.props} |    6 +++---
 ....props => gtksourceview-version-paths.props.in} |   12 ++++++++++++
 ...s.vsprops.in => gtksourceview-gen-srcs.vsprops} |    6 +++---
 ...rops => gtksourceview-version-paths.vsprops.in} |   12 ++++++++++++
 5 files changed, 32 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e8b0daa..6563a8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -236,9 +236,9 @@ Makefile
 config.h.win32
 win32/Makefile
 win32/vs9/Makefile
-win32/vs9/gtksourceview-gen-srcs.vsprops
+win32/vs9/gtksourceview-version-paths.vsprops
 win32/vs10/Makefile
-win32/vs10/gtksourceview-gen-srcs.props
+win32/vs10/gtksourceview-version-paths.props
 win32/vs11/Makefile
 win32/vs12/Makefile
 win32/vs14/Makefile
diff --git a/win32/vs10/gtksourceview-gen-srcs.props.in b/win32/vs10/gtksourceview-gen-srcs.props
similarity index 93%
rename from win32/vs10/gtksourceview-gen-srcs.props.in
rename to win32/vs10/gtksourceview-gen-srcs.props
index 5ce74f7..44a0804 100644
--- a/win32/vs10/gtksourceview-gen-srcs.props.in
+++ b/win32/vs10/gtksourceview-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=3
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.tmp1 --output=..\..\gtksourceview\gtksourceversion.h.tmp2 
--var=GTK_SOURCE_MINOR_VERSION --outstring=23
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\gtksourceview\gtksourceversion.h.tmp2 --output=..\..\gtksourceview\gtksourceversion.h 
--var=GTK_SOURCE_MICRO_VERSION --outstring=91
 del ..\..\gtksourceview\gtksourceversion.h.tmp1 ..\..\gtksourceview\gtksourceversion.h.tmp2
     </GenGtksourceVersionH>
   </PropertyGroup>
diff --git a/win32/vs10/gtksourceview-version-paths.props b/win32/vs10/gtksourceview-version-paths.props.in
similarity index 80%
rename from win32/vs10/gtksourceview-version-paths.props
rename to win32/vs10/gtksourceview-version-paths.props.in
index 57ef980..7de4990 100644
--- a/win32/vs10/gtksourceview-version-paths.props
+++ b/win32/vs10/gtksourceview-version-paths.props.in
@@ -5,6 +5,9 @@
     <GlibEtcInstallRoot>$(SolutionDir)\..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot>
     <CopyDir>$(GlibEtcInstallRoot)</CopyDir>
     <DefDir>$(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)</DefDir>
+    <GtkSourceviewMajorVersion>@GTK_SOURCE_MAJOR_VERSION@</GtkSourceviewMajorVersion>
+    <GtkSourceviewMinorVersion>@GTK_SOURCE_MINOR_VERSION@</GtkSourceviewMinorVersion>    
+    <GtkSourceviewMicroVersion>@GTK_SOURCE_MICRO_VERSION@</GtkSourceviewMicroVersion>
     <ApiVersion>3.0</ApiVersion>
     <GtkSourceviewLibtoolCompatibleDllPrefix>lib</GtkSourceviewLibtoolCompatibleDllPrefix>
     <GtkSourceviewLibtoolCompatibleDllSuffix>-$(ApiVersion)-0</GtkSourceviewLibtoolCompatibleDllSuffix>
@@ -33,6 +36,15 @@
     <BuildMacro Include="DefDir">
       <Value>$(DefDir)</Value>
     </BuildMacro>
+    <BuildMacro Include="GtkSourceviewMajorVersion">
+      <Value>$(GtkSourceviewMajorVersion)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GtkSourceviewMinorVersion">
+      <Value>$(GtkSourceviewMinorVersion)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GtkSourceviewMicroVersion">
+      <Value>$(GtkSourceviewMicroVersion)</Value>
+    </BuildMacro>
     <BuildMacro Include="ApiVersion">
       <Value>$(ApiVersion)</Value>
     </BuildMacro>
diff --git a/win32/vs9/gtksourceview-gen-srcs.vsprops.in b/win32/vs9/gtksourceview-gen-srcs.vsprops
similarity index 90%
rename from win32/vs9/gtksourceview-gen-srcs.vsprops.in
rename to win32/vs9/gtksourceview-gen-srcs.vsprops
index b2f5bdf..c089edf 100644
--- a/win32/vs9/gtksourceview-gen-srcs.vsprops.in
+++ b/win32/vs9/gtksourceview-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/gtksourceview-version-paths.vsprops b/win32/vs9/gtksourceview-version-paths.vsprops.in
similarity index 83%
rename from win32/vs9/gtksourceview-version-paths.vsprops
rename to win32/vs9/gtksourceview-version-paths.vsprops.in
index 6ef884f..e6ed686 100644
--- a/win32/vs9/gtksourceview-version-paths.vsprops
+++ b/win32/vs9/gtksourceview-version-paths.vsprops.in
@@ -5,6 +5,18 @@
        Name="gtksourceviewversionpathsprops"
        >
        <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="3.0"
        />


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