[java-identity-provider] 04/08: IDP-2147 Investigate Wix V4
Rod Widdowson
rdw at steadingsoftware.com
Tue Mar 19 11:34:14 UTC 2024
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch dev/IDP-2147
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=7734cc0a7660f50829f245f870e5ba4a5d18a647
commit 7734cc0a7660f50829f245f870e5ba4a5d18a647
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Nov 7 16:15:03 2023 +0000
IDP-2147 Investigate Wix V4
https://shibboleth.atlassian.net/browse/IDP-2147
Start plumbing into maven
---
idp-msi/.gitignore | 3 +
idp-msi/pom.xml | 155 ++++++++++++++++++++++++++++
idp-msi/src/main/assembly/zip.xml | 19 ++++
idp-msi/src/main/wix/.gitignore | 8 --
idp-msi/src/main/wix/ShibbolethIdP-main.wxs | 2 +-
idp-msi/src/main/wix/idp.vcxproj | 28 +++++
pom.xml | 2 +
7 files changed, 208 insertions(+), 9 deletions(-)
diff --git a/idp-msi/.gitignore b/idp-msi/.gitignore
new file mode 100644
index 000000000..126895959
--- /dev/null
+++ b/idp-msi/.gitignore
@@ -0,0 +1,3 @@
+/target
+/src/main/wix/bin
+/src/main/wix/obj
diff --git a/idp-msi/pom.xml b/idp-msi/pom.xml
new file mode 100644
index 000000000..2c730da91
--- /dev/null
+++ b/idp-msi/pom.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>net.shibboleth.idp</groupId>
+ <artifactId>idp-parent</artifactId>
+ <!-- DO NO CHANGE VERSION without changing msi.version below -->
+ <version>5.1.0-SNAPSHOT</version>
+ </parent>
+
+ <name>Shibboleth IdP :: Msi</name>
+ <description>MSI generation (Windows only)</description>
+ <artifactId>idp-msi</artifactId>
+ <packaging>pom</packaging>
+
+
+ <properties>
+ <!-- where to put the jetty-base we are making -->
+ <assemblyDirectory>${project.build.directory}/idp-jetty-base</assemblyDirectory>
+ <!-- msi Version - CHANGE IN LOCKSTEP WITH THE VERSION ABOVE
+ 99 is shorthand for SNAPSHOT
+ -->
+ <msi.version>5.1.0.99</msi.version>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>build-msi</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ <os>
+ <family>windows</family>
+ </os>
+ </activation>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <!-- Unpack distribution -->
+ <execution>
+ <id>unpack-dist</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>idp-distribution</artifactId>
+ <version>${project.version}</version>
+ <type>zip</type>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- WIX -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>${maven-exec-plugin.version}</version>
+ <executions>
+ <!-- clean -->
+ <execution>
+ <id>clean</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>msbuild</executable>
+ <executable>dotnet</executable>
+ <arguments>
+ <argument>clean</argument>
+ <argument>src/main/wix/idp.vcxproj</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <!--Build -->
+ <execution>
+ <id>compile</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>dotnet</executable>
+ <arguments>
+ <argument>build</argument>
+ <argument>src/main/wix/idp.vcxproj</argument>
+ <argument>/p:MsiVersion=${msi.version};IdpVersion=${project.version}</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- copy built output to final location, giving the MSI an appropriate name -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <id>move-msi-to-target</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <copy file="src/main/wix/obj/Debug/idp.msi"
+ tofile="${project.build.directory}/shibboleth-identity-provider-${project.version}-x64.msi"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Assemble the artifacts. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>src/main/assembly/zip.xml</descriptor>
+ </descriptors>
+ <!-- Turn off compression -->
+ <archiverConfig>
+ <compress>false</compress>
+ </archiverConfig>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/idp-msi/src/main/assembly/zip.xml b/idp-msi/src/main/assembly/zip.xml
new file mode 100644
index 000000000..788d73587
--- /dev/null
+++ b/idp-msi/src/main/assembly/zip.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
+ <id>zip</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>${project.build.directory}</directory>
+ <outputDirectory></outputDirectory>
+ <includes>
+ <include>/shibboleth-identity-provider-${project.version}-x64.msi</include>
+ </includes>
+ <lineEnding>windows</lineEnding>
+ </fileSet>
+ </fileSets>
+ <includeBaseDirectory>false</includeBaseDirectory>
+</assembly>
diff --git a/idp-msi/src/main/wix/.gitignore b/idp-msi/src/main/wix/.gitignore
deleted file mode 100644
index 13e3f189d..000000000
--- a/idp-msi/src/main/wix/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/*.msi
-/*.msm
-/*.suo
-*.zip
-*.zip.asc
-*.wixobj
-*.wixpdb
-/bin
diff --git a/idp-msi/src/main/wix/ShibbolethIdP-main.wxs b/idp-msi/src/main/wix/ShibbolethIdP-main.wxs
index 21f54270e..2e604c4cd 100644
--- a/idp-msi/src/main/wix/ShibbolethIdP-main.wxs
+++ b/idp-msi/src/main/wix/ShibbolethIdP-main.wxs
@@ -13,7 +13,7 @@
<?define UpgradeUUID="8d3bfb53-47ff-4cbc-9363-cbf9e46bedc4"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
- <Package Name="Shibboleth IdP V5" Language="1033" Version="5.0.0.0" Manufacturer="The Shibboleth Consortium" UpgradeCode="$(var.UpgradeUUID)" InstallerVersion="310"><SummaryInformation Description="Shibboleth IdP V5" Manufacturer="The Shibboleth Consortium" />
+ <Package Name="Shibboleth IdP V5" Language="1033" Version="$(var.msiVersion)" Manufacturer="The Shibboleth Consortium" UpgradeCode="$(var.UpgradeUUID)" InstallerVersion="310"><SummaryInformation Description="Shibboleth IdP V5" Manufacturer="The Shibboleth Consortium" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="yes" Schedule="afterInstallInitialize" />
<MediaTemplate EmbedCab="yes" />
diff --git a/idp-msi/src/main/wix/idp.vcxproj b/idp-msi/src/main/wix/idp.vcxproj
new file mode 100644
index 000000000..8db1dd0d6
--- /dev/null
+++ b/idp-msi/src/main/wix/idp.vcxproj
@@ -0,0 +1,28 @@
+<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>
+ <IdPVersion>unspecified</IdPVersion>
+ <MsiVersion>255.255.255.255</MsiVersion>
+ <InstallerPlatform>x64</InstallerPlatform>
+ <HarvestDirectoryAutogenerateGuids>false</HarvestDirectoryAutogenerateGuids>
+ <HarvestDirectoryGenerateGuidsNow>true</HarvestDirectoryGenerateGuidsNow>
+ <UnpackDir>..\..\..\target\shibboleth-identity-provider-$(IdPVersion)</UnpackDir>
+ <DefineConstants>idpSrc=$(UnpackDir);msiVersion=$(MsiVersion)</DefineConstants>
+ <SuppressIces>ICE61</SuppressIces>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <HarvestDirectory Include="$(UnpackDir)">
+ <ComponentGroupName>IdPGroup</ComponentGroupName>
+ <DirectoryRefId>IDPDISTDIR</DirectoryRefId>
+ <PreprocessorVariable>var.idpSrc</PreprocessorVariable>
+ <SuppressRootDirectory>true</SuppressRootDirectory>
+ </HarvestDirectory>
+ <BindPath Include="jetty-extract" />
+ </ItemGroup>
+</Project>
diff --git a/pom.xml b/pom.xml
index 3ca59d465..273299f63 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,6 +55,8 @@
<module>idp-testing</module>
+ <module>idp-msi</module>
+
<module>idp-bom</module>
</modules>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list