Some checks reported errors
farmcontrol/farmcontrol-ui/pipeline/head Something is wrong with the build of this commit
- Updated `package.json` to include `msiWrapped` configuration for MSI installer generation. - Introduced `msi-wrapped.wxs` file to define the MSI wrapper around the NSIS setup, enabling silent updates. - Created `build-windows-msi.ps1` script to automate the MSI building process, integrating with the existing build workflow. - Modified `finalize-desktop-artifacts.mjs` to call the new MSI build function, ensuring both NSIS and MSI installers are generated during the build process.
90 lines
3.1 KiB
XML
90 lines
3.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
|
<!--
|
|
MSI wrapper around the compiled NSIS setup.exe.
|
|
Runs the bundled installer with the same silent in-app update flags used by
|
|
src/desktop/winappupdate.js: /S /UPDATE /RESTARTFC /LOG=...
|
|
|
|
ALLUSERS=2 + MSIINSTALLPERUSER=1 defaults to per-user (matching NSIS) and is
|
|
not blocked by DisableMsi=1 / error 1625 the way a pure InstallScope=perUser
|
|
package is.
|
|
-->
|
|
<Product
|
|
Id="*"
|
|
Name="Farm Control"
|
|
Language="1033"
|
|
Version="__VERSION__"
|
|
Manufacturer="Tom Butcher"
|
|
UpgradeCode="__UPGRADE_CODE__">
|
|
<Package
|
|
InstallerVersion="500"
|
|
Compressed="yes"
|
|
InstallPrivileges="limited"
|
|
Platform="x64" />
|
|
|
|
<Condition Message="Windows 7 and above is required"><![CDATA[Installed OR VersionNT >= 601]]></Condition>
|
|
|
|
<MajorUpgrade
|
|
AllowSameVersionUpgrades="yes"
|
|
DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
|
|
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
|
|
|
|
<Icon Id="InstallerIcon" SourceFile="__INSTALLER_ICON__" />
|
|
<Property Id="ARPPRODUCTICON" Value="InstallerIcon" />
|
|
|
|
<Property Id="DISABLEADVTSHORTCUTS" Value="1" />
|
|
<Property Id="ALLUSERS" Secure="yes" Value="2" />
|
|
<Property Id="MSIINSTALLPERUSER" Secure="yes" Value="1" />
|
|
<Property Id="REBOOT" Value="ReallySuppress" />
|
|
|
|
<Property Id="FarmControlUpdateLog" Value="[FarmControlUpdatesDir]install.log" />
|
|
|
|
<Binary Id="WrappedExe" SourceFile="__SETUP_EXE__" />
|
|
|
|
<CustomAction
|
|
Id="RunInstaller"
|
|
BinaryKey="WrappedExe"
|
|
ExeCommand="/S /UPDATE /RESTARTFC /LOG="[FarmControlUpdateLog]""
|
|
Execute="immediate"
|
|
Impersonate="yes"
|
|
Return="check" />
|
|
|
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
|
<Directory Id="LocalAppDataFolder">
|
|
<Directory Id="FarmControlAppDataDir" Name="FarmControl">
|
|
<Directory Id="FarmControlUpdatesDir" Name="Updates">
|
|
<Component Id="UpdatesFolderComponent" Guid="A1B2C3D4-E5F6-7890-ABCD-EF1234567890">
|
|
<CreateFolder />
|
|
<RegistryValue
|
|
Root="HKCU"
|
|
Key="Software\Tom Butcher\Farm Control"
|
|
Name="UpdatesDir"
|
|
Type="string"
|
|
Value="[FarmControlUpdatesDir]"
|
|
KeyPath="yes" />
|
|
</Component>
|
|
</Directory>
|
|
</Directory>
|
|
</Directory>
|
|
<Component Id="PerUserMarker" Guid="8A3F2E1D-9C4B-4A7E-B6D5-1F0E3C2B4A59">
|
|
<RegistryValue
|
|
Root="HKCU"
|
|
Key="Software\Tom Butcher\Farm Control"
|
|
Name="MsiWrapper"
|
|
Type="integer"
|
|
Value="1"
|
|
KeyPath="yes" />
|
|
</Component>
|
|
</Directory>
|
|
|
|
<Feature Id="MainFeature" Title="Farm Control" Level="1">
|
|
<ComponentRef Id="UpdatesFolderComponent" />
|
|
<ComponentRef Id="PerUserMarker" />
|
|
</Feature>
|
|
|
|
<InstallExecuteSequence>
|
|
<Custom Action="RunInstaller" After="InstallFiles">NOT Installed</Custom>
|
|
</InstallExecuteSequence>
|
|
</Product>
|
|
</Wix>
|