[cpp-sp] 05/05: CPPSP-53 Replace Windows Installer with Bat and C program (for registry operations)

Codeberg noreply at shibboleth.net
Mon Mar 23 19:55:46 UTC 2026


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository cpp-sp.

View the commit online:
https://codeberg.org/Shibboleth/cpp-sp/commit/734de804ad3088b97630dd9b9587a993061875c5

commit 734de804ad3088b97630dd9b9587a993061875c5
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Mar 23 19:52:18 2026 +0000

    CPPSP-53 Replace Windows Installer with Bat and C program (for registry operations)
    
    https://shibboleth.atlassian.net/browse/CPPSP-53
    
    Change the "print out the version" program to output a single encoded
    integer for the version (as per the "InstallerVersion" registry setting.
---
 Projects/vc22/Shibboleth.sln                                       | 2 +-
 Projects/vc22/{MsiVersion.vcxproj => Version.vcxproj}              | 2 +-
 .../vc22/{MsiVersion.vcxproj.filters => Version.vcxproj.filters}   | 2 +-
 Projects/vc22/{MsiVersion/MsiVersion.cpp => Version/Version.cpp}   | 7 ++++++-
 shibsp/version.h                                                   | 1 +
 5 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/Projects/vc22/Shibboleth.sln b/Projects/vc22/Shibboleth.sln
index d2b403e2..d8de15f8 100644
--- a/Projects/vc22/Shibboleth.sln
+++ b/Projects/vc22/Shibboleth.sln
@@ -25,7 +25,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iis", "iis.vcxproj", "{3F4D
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NativeLogMessages", "NativeLogMessages.vcxproj", "{22BBF106-8ADC-4E97-A5DE-F9C725B64940}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MsiVersion", "MsiVersion.vcxproj", "{B1CAE2D4-063D-4B5D-A796-93C6D9F71CC8}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Version", "Version.vcxproj", "{B1CAE2D4-063D-4B5D-A796-93C6D9F71CC8}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/Projects/vc22/MsiVersion.vcxproj b/Projects/vc22/Version.vcxproj
similarity index 99%
rename from Projects/vc22/MsiVersion.vcxproj
rename to Projects/vc22/Version.vcxproj
index ea68d101..e1b0d376 100644
--- a/Projects/vc22/MsiVersion.vcxproj
+++ b/Projects/vc22/Version.vcxproj
@@ -19,7 +19,7 @@
     </ProjectConfiguration>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="MsiVersion\MsiVersion.cpp" />
+    <ClCompile Include="Version\Version.cpp" />
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <VCProjectVersion>17.0</VCProjectVersion>
diff --git a/Projects/vc22/MsiVersion.vcxproj.filters b/Projects/vc22/Version.vcxproj.filters
similarity index 94%
rename from Projects/vc22/MsiVersion.vcxproj.filters
rename to Projects/vc22/Version.vcxproj.filters
index d5d9ca86..f6e8377e 100644
--- a/Projects/vc22/MsiVersion.vcxproj.filters
+++ b/Projects/vc22/Version.vcxproj.filters
@@ -15,7 +15,7 @@
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="MsiVersion\MsiVersion.cpp">
+    <ClCompile Include="Version\Version.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
diff --git a/Projects/vc22/MsiVersion/MsiVersion.cpp b/Projects/vc22/Version/Version.cpp
similarity index 73%
rename from Projects/vc22/MsiVersion/MsiVersion.cpp
rename to Projects/vc22/Version/Version.cpp
index 1116cb47..503f554a 100644
--- a/Projects/vc22/MsiVersion/MsiVersion.cpp
+++ b/Projects/vc22/Version/Version.cpp
@@ -21,5 +21,10 @@
 
 int main()
 {
-    std::cout << SHIBSP_VERSION_MAJOR << "." << SHIBSP_VERSION_MINOR << "." << SHIBSP_VERSION_REVISION << "." << SHIBSP_VERSION_PATCH << std::endl;
+    if (SHIBSP_VERSION_PATCH != 0) {
+        std::cerr << "SHIB_VERESION_PATCH SHOUKLD BE ZERO" << std::endl; 
+        return 1;
+    }
+    int version = (SHIBSP_VERSION_MAJOR << 24) | (SHIBSP_VERSION_MINOR << 16) | SHIBSP_VERSION_REVISION;
+    std::cout << version << std::endl;
 }
diff --git a/shibsp/version.h b/shibsp/version.h
index f84ba914..454a86da 100644
--- a/shibsp/version.h
+++ b/shibsp/version.h
@@ -40,6 +40,7 @@
 #define SHIBSP_VERSION_REVISION 0
 //
 // For Windows we define a patch version
+// DO NOT USE - There is no situation which requires apatch
 //
 #define SHIBSP_VERSION_PATCH 0
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list