[java-idp-jetty-base] 05/05: IDP-2147 Investigate Wix V4
Rod Widdowson
rdw at steadingsoftware.com
Sat Sep 23 15:33:58 UTC 2023
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch dev/IDP-2147
in repository java-idp-jetty-base.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-jetty-base.git;a=commit;h=7bfdd0479e76ace8d33405e288499d8f9ed79f9b
commit 7bfdd0479e76ace8d33405e288499d8f9ed79f9b
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sat Sep 23 16:32:13 2023 +0100
IDP-2147 Investigate Wix V4
https://shibboleth.atlassian.net/browse/IDP-2147
Build a vcxproj to build the installer
---
src/main/wix/JettyMsBuild.bat | 202 ++++++++++++++++++++++++++++++++++++++++++
src/main/wix/wix.vcxproj | 35 ++++++++
2 files changed, 237 insertions(+)
diff --git a/src/main/wix/JettyMsBuild.bat b/src/main/wix/JettyMsBuild.bat
new file mode 100644
index 0000000..a90de7b
--- /dev/null
+++ b/src/main/wix/JettyMsBuild.bat
@@ -0,0 +1,202 @@
+ at Echo off
+REM Generate msm
+setlocal
+
+REM Preconditions
+
+if "%1%" == "" (
+ Echo JETTY [APACHE_COMMON_ZIP] [JETTY_DISTRO_ZIP] [JETTY_BASE_ZIP]
+ goto done
+)
+if "%2%" == "" (
+ Echo JETTY [APACHE_COMMON_ZIP] [JETTY_DISTRO_ZIP] [JETTY_BASE_ZIP]
+ goto done
+)
+if "%3%" == "" (
+ Echo JETTY [APACHE_COMMON_ZIP] [JETTY_DISTRO_ZIP] [JETTY_BASE_ZIP]
+ goto done
+)
+
+if not defined WIX (
+ echo WIX should be installed
+ goto done
+)
+
+REM Clear up detritus from last time
+
+if exist jetty_contents.wxs (
+ del jetty_contents.wxs
+)
+
+if exist jetty_base_contents.wxs (
+ del jetty_base_contents.wxs
+)
+
+if exist idp-jetty-base-extract (
+ rd /q /s idp-jetty-base-extract
+)
+
+if exist procrun-extract (
+ rd /q /s procrun-extract
+)
+
+if exist jetty-extract (
+ rd /q /s jetty-extract
+)
+
+REM Set up environment
+
+if not defined JAVA_JDK (
+ set JAVA_JDK=%JAVA_HOME%
+)
+
+if not defined JAVA_JDK (
+ echo Error: Nether JAVA_JDK nor JAVA_HOME is defined.
+ exit /b
+)
+
+if not defined JARCMD (
+ set JARCMD=%JAVA_JDK%\bin\jar.exe
+)
+
+if not exist "%JARCMD%" (
+ echo Error: JAVA_HOME is not defined correctly.
+ echo Cannot execute %JARCMD%
+ exit /b
+)
+
+REM Test and extract
+
+if not exist "%1%" (
+ echo Error: Could not locate procrun zip %1%
+ goto done
+)
+
+if not exist %1.asc (
+ echo Error: Could not locate signature for procrun zip %1%.asc
+ goto done
+)
+
+gpg --verify %1.asc %1
+if ERRORLEVEL 1 (
+ echo Error: Signature check failed on %1%
+ goto done
+)
+
+mkdir procrun-extract
+cd procrun-extract
+"%JARCMD%" xf %1
+cd ..
+
+if not exist procrun-extract\prunsrv.exe (
+ echo could not find prunsrv, is %1% really a procrun source?
+ goto done
+)
+
+if not exist "%2" (
+ echo Error: Could not locate Jetty zip %2%
+ goto done
+)
+
+if not exist "%2".asc (
+ echo Error: Could not locate signature for jetty zip %2%.asc
+ goto done
+)
+
+gpg --verify %2.asc %2
+if ERRORLEVEL 1 (
+ echo Error: Signature check failed on %2%
+ goto done
+)
+
+REM Now do the same again for jetty-base
+if not exist %3% (
+ echo Error: Could not locate jetty base zip %2%
+ goto done
+)
+
+if not exist %3.asc (
+ echo Error: Could not locate signature for jetty base zip %3%.asc
+ goto noJettyBaseSig
+)
+
+gpg --verify %3.asc %3
+if ERRORLEVEL 1 (
+ echo Error: Signature check failed on %3%
+ goto done
+)
+:noJettyBaseSig
+mkdir idp-jetty-base-extract
+cd idp-jetty-base-extract
+"%JARCMD%" xf %3
+
+rem is this a real package?
+dir /s idp.ini.windows 1> nl:a 2> nl:b
+if ERRORLEVEL 1 (
+ cd ..
+ echo Could not find idp.ini.windows in Jetty Base package
+ goto done;
+)
+for /D %%X in (*) do set jettyBaseEx=%%X
+rename %jettyBaseEx% jetty-base
+cd jetty-base
+
+rem organize the jetty base for extraction
+
+rename start.d start.d.dist
+if ERRORLEVEL 1 (
+ cd ..
+ echo jetty-base/start.d directory not found?
+ goto done;
+)
+rem IDP-1149 make doubley sure that we have a jetty-base\tmp & log dir
+mkdir tmp
+echo "keeper" > tmp\.keep
+mkdir logs
+echo "keeper" > logs\.keep
+
+cd ..\..
+
+mkdir jetty-extract
+cd jetty-extract
+"%JARCMD%" xf %2
+
+dir /s jetty-ssl-context.xml 1> nl:a 2> nl:b
+if ERRORLEVEL 1 (
+ cd ..
+ echo "Could not find jsp.ini in Jetty package"
+ goto done;
+)
+cd ..
+
+REM IDP-1193 - and kill off demo-base
+
+for /D %%X in (jetty-extract/*) do set jex=%%X
+rd /s /q jetty-extract\%jex%\demo-base
+
+REM Stamp Jetty Version
+echo %jex% 1> jetty-extract/%jex%/JETTY_VERSION.TXT
+
+rename jetty-extract jjj
+move jjj/%JEX% jetty-extract
+rd jjj
+
+REM compile Jetty and procrun contents as well as the main command line
+
+"C:\Program Files\dotnet\dotnet.exe" clean wix.vcxproj
+
+"C:\Program Files\dotnet\dotnet.exe" build .\wix.vcxproj
+
+
+REM Tidy up in the Sucessful exit case
+ rd /q /s procrun-extract
+ rd /q /s jetty-extract
+ rd /q /s idp-jetty-base-extract
+ del *.wixobj *.wixpdb
+ del jetty_contents.wxs
+ del jetty_base_contents.wxs
+
+dir *.msi
+
+:done
+
diff --git a/src/main/wix/wix.vcxproj b/src/main/wix/wix.vcxproj
new file mode 100644
index 0000000..78839a3
--- /dev/null
+++ b/src/main/wix/wix.vcxproj
@@ -0,0 +1,35 @@
+<Project Sdk="WixToolset.Sdk/4.0.2">
+ <ItemGroup>
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.2"/>
+ <PackageReference Include="WixToolset.UI.wixext" Version="4.0.2"/>
+ <PackageReference Include="WixToolset.Firewall.wixext" Version="4.0.2" />
+ <PackageReference Include="WixToolset.Heat" Version="4.0.2" />
+ </ItemGroup>
+ <PropertyGroup>
+ <InstallerPlatform>x64</InstallerPlatform>
+ <HarvestDirectoryAutogenerateGuids>false</HarvestDirectoryAutogenerateGuids>
+ <HarvestDirectoryGenerateGuidsNow>true</HarvestDirectoryGenerateGuidsNow>
+ <DefineConstants>ProcrunSrc=procrun-extract;jettyBaseRoot=idp-jetty-base-extract\jetty-base</DefineConstants>
+ <SuppressIces>ICE61</SuppressIces>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <HarvestDirectory Include="idp-jetty-base-extract\jetty-base">
+ <ComponentGroupName>JettyBaseGroup</ComponentGroupName>
+ <DirectoryRefId>IDP_INSTALLDIR</DirectoryRefId>
+ <PreprocessorVariable>var.jettyBaseRoot</PreprocessorVariable>
+ <SuppressRootDirectory>true</SuppressRootDirectory>
+ </HarvestDirectory>
+ <BindPath Include="idp-jetty-base-extract\jetty-base" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <HarvestDirectory Include="jetty-extract">
+ <ComponentGroupName>JettyGroup</ComponentGroupName>
+ <DirectoryRefId>JETTYROOT</DirectoryRefId>
+
+ <SuppressRootDirectory>true</SuppressRootDirectory>
+ </HarvestDirectory>
+ <BindPath Include="jetty-extract" />
+ </ItemGroup>
+</Project>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list