diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 57c3ada..bef8e4c 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -114,9 +114,9 @@ jobs: integration-tests !integration-tests/node_modules - - name: Install wixl + - name: Install wixl and msitools if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false - run: sudo apt-get update && sudo apt-get install -y wixl + run: sudo apt-get update && sudo apt-get install -y wixl msitools - name: Install goreleaser if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false diff --git a/var/windows/License.rtf b/var/windows/License.rtf new file mode 100644 index 0000000..d2b5675 --- /dev/null +++ b/var/windows/License.rtf @@ -0,0 +1,12 @@ +{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Tahoma;}} +\f0\fs22 +OliveTin License Agreement\par +\par +OliveTin is free software licensed under the GNU Affero General Public License version 3 (AGPL-3.0).\par +\par +By installing OliveTin you agree to the terms of the AGPL-3.0. The full license text is available in the OliveTin source repository:\par +\par +https://github.com/OliveTin/OliveTin/blob/main/LICENSE\par +\par +Copyright (C) OliveTin contributors\par +} diff --git a/var/windows/OliveTin.wxs b/var/windows/OliveTin.wxs index ebb8345..15e6184 100644 --- a/var/windows/OliveTin.wxs +++ b/var/windows/OliveTin.wxs @@ -2,10 +2,10 @@ + + + + + @@ -31,6 +36,9 @@ + + + @@ -42,5 +50,41 @@ KeyPath="yes" /> + + + + + + + + + + + diff --git a/var/windows/build-msi.sh b/var/windows/build-msi.sh index b1eb6fe..58fe6e4 100755 --- a/var/windows/build-msi.sh +++ b/var/windows/build-msi.sh @@ -20,6 +20,11 @@ if ! command -v wixl >/dev/null || ! command -v wixl-heat >/dev/null; then exit 1 fi +if [[ ! -f "${SCRIPT_DIR}/License.rtf" ]]; then + echo "License.rtf not found: ${SCRIPT_DIR}/License.rtf" >&2 + exit 1 +fi + normalize_msi_version() { local raw="${1#v}" raw="${raw%%-*}" @@ -87,16 +92,20 @@ cp -a "${SOURCE_ROOT}/webui/." "${APP_STAGING}/webui/" --win64 \ > "${HEAT_WXS}" -wixl \ - -v \ - -a x64 \ - -D "Version=${MSI_VERSION}" \ - -D "Win64=yes" \ - -D "SourceDir=${APP_STAGING}" \ - -D "ConfigSource=${SOURCE_ROOT}/config.yaml" \ - -o "${MSI_PATH}" \ - "${SCRIPT_DIR}/OliveTin.wxs" \ - "${HEAT_WXS}" +( + cd "${SCRIPT_DIR}" + wixl \ + -v \ + -a x64 \ + --ext ui \ + -D "Version=${MSI_VERSION}" \ + -D "Win64=yes" \ + -D "SourceDir=${APP_STAGING}" \ + -D "ConfigSource=${SOURCE_ROOT}/config.yaml" \ + -o "${MSI_PATH}" \ + OliveTin.wxs \ + "${HEAT_WXS}" +) if ! msiinfo export "${MSI_PATH}" Media 2>/dev/null | grep -q '#cab1.cab'; then echo "MSI cabinet is not embedded (expected #cab1.cab in Media table); check EmbedCab in OliveTin.wxs" >&2