fix: windows bits and pieces
This commit is contained in:
parent
043f16beae
commit
5092d9f3f8
|
|
@ -114,9 +114,9 @@ jobs:
|
||||||
integration-tests
|
integration-tests
|
||||||
!integration-tests/node_modules
|
!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
|
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
|
- name: Install goreleaser
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||||
<Product
|
<Product
|
||||||
Id="*"
|
Id="*"
|
||||||
Name="OliveTin $(var.Version)"
|
Name="OliveTin"
|
||||||
Language="1033"
|
Language="1033"
|
||||||
Version="$(var.Version)"
|
Version="$(var.Version)"
|
||||||
Manufacturer="James Read"
|
Manufacturer="OliveTin contributors"
|
||||||
UpgradeCode="8B5E3F2A-1C4D-4E6F-9A0B-2D3C4E5F6071">
|
UpgradeCode="8B5E3F2A-1C4D-4E6F-9A0B-2D3C4E5F6071">
|
||||||
<Package
|
<Package
|
||||||
InstallerVersion="500"
|
InstallerVersion="500"
|
||||||
|
|
@ -19,9 +19,14 @@
|
||||||
DowngradeErrorMessage="A newer version of OliveTin is already installed." />
|
DowngradeErrorMessage="A newer version of OliveTin is already installed." />
|
||||||
<MediaTemplate EmbedCab="yes" />
|
<MediaTemplate EmbedCab="yes" />
|
||||||
|
|
||||||
|
<Icon Id="OliveTinIcon" SourceFile="$(var.SourceDir)/OliveTin.exe" />
|
||||||
|
|
||||||
|
<UIRef Id="WixUI_Minimal" />
|
||||||
|
|
||||||
<Feature Id="ProductFeature" Title="OliveTin" Level="1">
|
<Feature Id="ProductFeature" Title="OliveTin" Level="1">
|
||||||
<ComponentGroupRef Id="CG.AppFiles" />
|
<ComponentGroupRef Id="CG.AppFiles" />
|
||||||
<ComponentRef Id="ConfigFile" />
|
<ComponentRef Id="ConfigFile" />
|
||||||
|
<ComponentRef Id="StartMenuShortcuts" />
|
||||||
</Feature>
|
</Feature>
|
||||||
|
|
||||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||||
|
|
@ -31,6 +36,9 @@
|
||||||
<Directory Id="CommonAppDataFolder">
|
<Directory Id="CommonAppDataFolder">
|
||||||
<Directory Id="ConfigDir" Name="OliveTin" />
|
<Directory Id="ConfigDir" Name="OliveTin" />
|
||||||
</Directory>
|
</Directory>
|
||||||
|
<Directory Id="ProgramMenuFolder">
|
||||||
|
<Directory Id="ApplicationProgramsFolder" Name="OliveTin" />
|
||||||
|
</Directory>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<DirectoryRef Id="ConfigDir">
|
<DirectoryRef Id="ConfigDir">
|
||||||
|
|
@ -42,5 +50,41 @@
|
||||||
KeyPath="yes" />
|
KeyPath="yes" />
|
||||||
</Component>
|
</Component>
|
||||||
</DirectoryRef>
|
</DirectoryRef>
|
||||||
|
|
||||||
|
<DirectoryRef Id="ApplicationProgramsFolder">
|
||||||
|
<Component Id="StartMenuShortcuts" Guid="C3D4E5F6-A7B8-9012-CDEF-345678901234" Win64="yes">
|
||||||
|
<Shortcut
|
||||||
|
Id="OliveTinExeShortcut"
|
||||||
|
Name="OliveTin"
|
||||||
|
Description="OliveTin web interface for running shell commands"
|
||||||
|
Target="[INSTALLDIR]OliveTin.exe"
|
||||||
|
WorkingDirectory="INSTALLDIR"
|
||||||
|
Icon="OliveTinIcon"
|
||||||
|
IconIndex="0" />
|
||||||
|
<Shortcut
|
||||||
|
Id="ConfigYamlShortcut"
|
||||||
|
Name="config.yaml"
|
||||||
|
Description="OliveTin configuration file"
|
||||||
|
Target="[#ConfigYaml]"
|
||||||
|
Icon="OliveTinIcon"
|
||||||
|
IconIndex="0" />
|
||||||
|
<Shortcut
|
||||||
|
Id="ProgramDataDirShortcut"
|
||||||
|
Name="OliveTin Data"
|
||||||
|
Description="Open the OliveTin ProgramData directory"
|
||||||
|
Target="[System64Folder]explorer.exe"
|
||||||
|
Arguments="[ConfigDir]"
|
||||||
|
WorkingDirectory="ConfigDir" />
|
||||||
|
<Shortcut
|
||||||
|
Id="ProgramFilesDirShortcut"
|
||||||
|
Name="OliveTin Program Files"
|
||||||
|
Description="Open the OliveTin installation directory"
|
||||||
|
Target="[System64Folder]explorer.exe"
|
||||||
|
Arguments=""[INSTALLDIR]""
|
||||||
|
WorkingDirectory="INSTALLDIR" />
|
||||||
|
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" />
|
||||||
|
<RegistryValue Root="HKLM" Key="Software\OliveTin" Name="StartMenuShortcuts" Type="integer" Value="1" KeyPath="yes" />
|
||||||
|
</Component>
|
||||||
|
</DirectoryRef>
|
||||||
</Product>
|
</Product>
|
||||||
</Wix>
|
</Wix>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,11 @@ if ! command -v wixl >/dev/null || ! command -v wixl-heat >/dev/null; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f "${SCRIPT_DIR}/License.rtf" ]]; then
|
||||||
|
echo "License.rtf not found: ${SCRIPT_DIR}/License.rtf" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
normalize_msi_version() {
|
normalize_msi_version() {
|
||||||
local raw="${1#v}"
|
local raw="${1#v}"
|
||||||
raw="${raw%%-*}"
|
raw="${raw%%-*}"
|
||||||
|
|
@ -87,16 +92,20 @@ cp -a "${SOURCE_ROOT}/webui/." "${APP_STAGING}/webui/"
|
||||||
--win64 \
|
--win64 \
|
||||||
> "${HEAT_WXS}"
|
> "${HEAT_WXS}"
|
||||||
|
|
||||||
|
(
|
||||||
|
cd "${SCRIPT_DIR}"
|
||||||
wixl \
|
wixl \
|
||||||
-v \
|
-v \
|
||||||
-a x64 \
|
-a x64 \
|
||||||
|
--ext ui \
|
||||||
-D "Version=${MSI_VERSION}" \
|
-D "Version=${MSI_VERSION}" \
|
||||||
-D "Win64=yes" \
|
-D "Win64=yes" \
|
||||||
-D "SourceDir=${APP_STAGING}" \
|
-D "SourceDir=${APP_STAGING}" \
|
||||||
-D "ConfigSource=${SOURCE_ROOT}/config.yaml" \
|
-D "ConfigSource=${SOURCE_ROOT}/config.yaml" \
|
||||||
-o "${MSI_PATH}" \
|
-o "${MSI_PATH}" \
|
||||||
"${SCRIPT_DIR}/OliveTin.wxs" \
|
OliveTin.wxs \
|
||||||
"${HEAT_WXS}"
|
"${HEAT_WXS}"
|
||||||
|
)
|
||||||
|
|
||||||
if ! msiinfo export "${MSI_PATH}" Media 2>/dev/null | grep -q '#cab1.cab'; then
|
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
|
echo "MSI cabinet is not embedded (expected #cab1.cab in Media table); check EmbedCab in OliveTin.wxs" >&2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue