[java-idp-jetty-base] 02/02: IDP-2285 Start looking at Windows Installer for Jetty12

Rod Widdowson rdw at steadingsoftware.com
Tue Jun 25 13:38:08 UTC 2024


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

rdw pushed a commit to branch dev/IDP-2285
in repository java-idp-jetty-base.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-jetty-base.git;a=commit;h=6443e85cb26543f898fc0be65fc6c62a81493a5a

commit 6443e85cb26543f898fc0be65fc6c62a81493a5a
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sun Jun 23 15:49:10 2024 +0100

    IDP-2285 Start looking at Windows Installer for Jetty12
    
    https://shibboleth.atlassian.net/issues/IDP-2285
    
    Add (binary) idp-userfacing.p12
    Stop doimng magical stuff during the install using kava and rather
    Just copy using "cmd.exe /c copy" to copy in
            idp-system.ini to jetty-base/start.d (always)
            idp.ini to jetty-base/start.d (if not there already)
            idp-userfacing.p12  to credentials (if not there already)
    
    NOT DEBUGGED YET
---
 src/main/wix/Jetty-Main.wxs | 47 ++++++++++++++++++++++++++++++++++-----------
 src/main/wix/Jetty-User.wxs |  4 ++--
 2 files changed, 38 insertions(+), 13 deletions(-)

diff --git a/src/main/wix/Jetty-Main.wxs b/src/main/wix/Jetty-Main.wxs
index a4a6a04..132bc1c 100644
--- a/src/main/wix/Jetty-Main.wxs
+++ b/src/main/wix/Jetty-Main.wxs
@@ -38,22 +38,34 @@
             <ComponentGroupRef Id="DeleteFiles" /> <!--DOne-->
             <ComponentRef Id="SaveUserInfo" />
             <ComponentRef Id="Icon" />
-        </Feature>
+            <Component Id="userfacing" Guid="{2D74DD26-93AF-4E77-9216-0E52CFBB55F1}" Directory="ProgramDataShib" Bitness="always64">
+                <File KeyPath="yes" Source="idp-userfacing.p12" />
+            </Component>
+
+            <Component Id="Icon" Guid="{C866B1EC-63E2-4379-BAA3-4D3936AE1BEC}" Directory="IDP_INSTALLDIR" Bitness="always64">
+                <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode]" Name="DisplayIcon" Value="[IDP_INSTALLDIR]\shib.ico,0" Type="string" />
+            </Component>
 
-        <Component Id="Icon" Guid="{C866B1EC-63E2-4379-BAA3-4D3936AE1BEC}" Directory="IDP_INSTALLDIR" Bitness="always64">
-            <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode]" Name="DisplayIcon" Value="[IDP_INSTALLDIR]\shib.ico,0" Type="string" />
-        </Component>
+        </Feature>
 
-        <CustomAction Id="SetFinalizeJetty" Property="QtFinalizeJetty" Value=""[JAVA_EXECUTABLE]" -cp "[IDPDISTDIR]\bin\lib\*;[IDPDISTDIR]\webapp\WEB-INF\lib\*" -Didp.home="[JAVA_IDP_HOME]" net.shibboleth.idp.installer.impl.FinalizeJettyBase" />
-        <CustomAction Id="RunFinalizeJetty" Directory="SHIBBOLETHDIR" ExeCommand="[QtFinalizeJetty]" Execute="deferred" Impersonate="no" />
-        <CustomAction Id="QtFinalizeJetty" DllEntry="WixQuietExec" Execute="deferred" Impersonate="no" BinaryRef="Wix4UtilCA_X86" />
+        <CustomAction Id="SetFinalizeJetty1" Property="QtFinalizeJetty1"
+                      Value="cmd.exe /c copy /y "[IDP_INSTALLDIR]"\jetty-base\start.d.dist\idp-system.ini "[IDP_INSTALLDIR]"\jetty-base\start.d" />
+        <CustomAction Id="SetFinalizeJetty2" Property="QtFinalizeJetty2"
+                      Value="cmd.exe /c copy /y "[IDP_INSTALLDIR]"\jetty-base\start.d.dist\idp.ini "[IDP_INSTALLDIR]"\jetty-base\start.d" />
+        <CustomAction Id="SetFinalizeJetty3" Property="QtFinalizeJetty3"
+                      Value="cmd.exe /c copy /y "[ProgramDataShib]"\idp-userfacing.p12 "[IDP_INSTALLDIR]"\credentials" />
+        <CustomAction Id="QtFinalizeJetty1" DllEntry="WixQuietExec" Execute="deferred" Impersonate="no" BinaryRef="Wix4UtilCA_X86" />
+        <CustomAction Id="QtFinalizeJetty2" DllEntry="WixQuietExec" Execute="deferred" Impersonate="no" BinaryRef="Wix4UtilCA_X86" />
+        <CustomAction Id="QtFinalizeJetty3" DllEntry="WixQuietExec" Execute="deferred" Impersonate="no" BinaryRef="Wix4UtilCA_X86" />
 
         <InstallExecuteSequence>
-            <Custom Action="SetFinalizeJetty" After="InstallFiles" Condition="(NOT Installed)" />
-            <Custom Action="RunFinalizeJetty" After="SetFinalizeJetty" Condition="(NOT Installed) AND DEBUG_INSTALL" />
-            <Custom Action="QtFinalizeJetty" After="RunFinalizeJetty" Condition="(NOT Installed)  AND (NOT DEBUG_INSTALL)" />
+            <Custom Action="SetFinalizeJetty1" After="InstallFiles" Condition="(NOT Installed)" />
+            <Custom Action="SetFinalizeJetty2" After="SetFinalizeJetty1" Condition="(NOT Installed) AND NOT IDP_INI_PRESENT" />
+            <Custom Action="SetFinalizeJetty3" After="SetFinalizeJetty2" Condition="(NOT Installed) AND NOT CERT_PRESENT" />
+            <Custom Action="QtFinalizeJetty1" After="SetFinalizeJetty3" Condition="(NOT Installed)" />
+            <Custom Action="QtFinalizeJetty2" After="QtFinalizeJetty1" Condition="(NOT Installed) AND NOT IDP_INI_PRESENT" />
+            <Custom Action="QtFinalizeJetty3" After="QtFinalizeJetty2" Condition="(NOT Installed) AND NOT CERT_PRESENT" />
         </InstallExecuteSequence>
-
         <!-- Parameters: See also Jetty-User -->
         <Property Id="ALWAYS_START_SERVICE" Value="TRUE" Secure="yes" />
         <Property Id="JAVA_JVMMX" Secure="yes">
@@ -78,6 +90,19 @@
             <RegistrySearch Id="OldInstallDir" Root="HKLM" Key="SOFTWARE\Shibboleth\IdP" Name="InstallDir" Type="directory" Bitness="always32" />
         </Property>
 
+        <Property Id="CERT_PRESENT" Secure="yes">
+            <DirectorySearch Id="CertPath" Depth="0" Path="[IDP_INSTALLDIR]\Credentials">
+                <FileSearch Id="CertPathFile" Name="idp-userfacing.p12" />
+            </DirectorySearch>
+        </Property>
+
+        <Property Id="IDP_INI_PRESENT" Secure="yes">
+            <DirectorySearch Id="IdpIniPath" Depth="0" Path="[IDP_INSTALLDIR]\jetty-base\start.d">
+                <FileSearch Id="IdpIniPathFile" Name="idp.ini" />
+            </DirectorySearch>
+        </Property>
+
+
         <Upgrade Id="$(var.UpgradeUUID)">
             <UpgradeVersion ExcludeLanguages="yes" IncludeMaximum="yes" Maximum="127.255.255" Minimum="0.0.1" OnlyDetect="yes" Property="ALREADYINSTALLED" />
         </Upgrade>
diff --git a/src/main/wix/Jetty-User.wxs b/src/main/wix/Jetty-User.wxs
index 38395ea..3a9eee1 100644
--- a/src/main/wix/Jetty-User.wxs
+++ b/src/main/wix/Jetty-User.wxs
@@ -135,7 +135,7 @@ icacls "C:\Program Files (x86)\Shibboleth\IdP\conf" /setowner administrators /t
 	         That way the install will inherit the protections -->
             <Custom Action="SetACEIdpWith" Before="QtSetACEIdP" Condition="INSTALL_JETTYD_USER" />
             <Custom Action="SetACEIdpWithout" Before="QtSetACEIdP" Condition="NOT INSTALL_JETTYD_USER" />
-            <Custom Action="QtSetACEIdP" After="QtFinalizeJetty" />
+            <Custom Action="QtSetACEIdP" After="QtFinalizeJetty3" />
 
 	    <!-- Write the ACLS on the jetty-base, and procrun install tree.
 		 Do this AFTER we install the files, That way the install will inherit the protections -->
@@ -157,7 +157,7 @@ icacls "C:\Program Files (x86)\Shibboleth\IdP\conf" /setowner administrators /t
             <Custom Action="SetACEProcrunLogFiles" After="SetIcaclsVerb" />
             <Custom Action="SetACEProcrunLogDirs" After="SetIcaclsVerb" />
 
-            <Custom Action="QtSetACEProcrunLogOwner" After="QtFinalizeJetty" />
+            <Custom Action="QtSetACEProcrunLogOwner" After="QtFinalizeJetty3" />
             <Custom Action="QtSetACEProcrunLogFiles" After="QtSetACEProcrunLogOwner" />
             <Custom Action="QtSetACEProcrunLogDirs" After="QtSetACEProcrunLogFiles" />
         </InstallExecuteSequence>

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


More information about the commits mailing list