mattermost-desktop/patches/app-builder-lib+24.13.3.patch
aaron 057377207a
Some checks failed
release / begin-notification (push) Has been cancelled
release / build-linux (push) Has been cancelled
release / build-msi-installer (push) Has been cancelled
release / build-mac-installer (push) Has been cancelled
release / upload-to-s3 (push) Has been cancelled
release / github-release (push) Has been cancelled
release / end-notification (push) Has been cancelled
first commit bois
2024-10-03 06:35:14 -07:00

70 lines
2.8 KiB
Diff

diff --git a/node_modules/app-builder-lib/templates/msi/template.xml b/node_modules/app-builder-lib/templates/msi/template.xml
index 2d5cd3c..92a0556 100644
--- a/node_modules/app-builder-lib/templates/msi/template.xml
+++ b/node_modules/app-builder-lib/templates/msi/template.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
+<Wix
+ xmlns="http://wixtoolset.org/schemas/v4/wxs"
+ xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"
+>
<!-- https://blogs.msdn.microsoft.com/gremlininthemachine/2006/12/05/msi-wix-and-unicode/ -->
<Product Id="*" Name="${productName}" UpgradeCode="${upgradeCode}" Version="${version}" Language="1033" Codepage="65001" Manufacturer="${manufacturer}">
<Package Compressed="yes" InstallerVersion="500"/>
@@ -26,6 +29,27 @@
<Property Id="ARPPRODUCTICON" Value="${iconId}"/>
{{ } -}}
+ <util:CloseApplication
+ Id="closeApplication"
+ Description="Mattermost is still running. Please ensure to manually close before continuing installation."
+ Target="Mattermost.exe"
+ RebootPrompt="no"
+ PromptToContinue="yes"
+ />
+ <CustomAction
+ Id="removeExeInstaller"
+ Directory="APPLICATIONFOLDER"
+ ExeCommand="[APPLICATIONFOLDER]Uninstall ${productName}.exe /S"
+ Execute="immediate"
+ Impersonate="yes"
+ Return="ignore"
+ />
+ <InstallExecuteSequence>
+ <Custom Action="WixCloseApplications" Before="InstallValidate"/>
+ <Custom Action="WixCloseApplicationsDeferred" After="InstallInitialize"/>
+ <Custom Action="removeExeInstaller" After="InstallInitialize"/>
+ </InstallExecuteSequence>
+
{{ if (isRunAfterFinish) { }}
<CustomAction Id="runAfterFinish" FileKey="mainExecutable" ExeCommand="" Execute="immediate" Impersonate="yes" Return="asyncNoWait"/>
{{ if (!isAssisted) { }}
@@ -42,6 +66,7 @@
<Property Id="ALLUSERS" Secure="yes" Value="2"/>
{{ } -}}
<Property Id="MSIINSTALLPERUSER" Secure="yes" Value="1"/>
+ <Property Id="DISABLEAUTOUPDATE" Value="0"/>
{{ if (isAssisted) { }}
<WixVariable Id="WixUISupportPerUser" Value="1" Overridable="yes"/>
@@ -80,6 +105,7 @@
</UI>
{{ } -}}
+ <Directory Id="resourcesDir" Name="APPLICATIONFOLDER:\resources\"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="${programFilesId}">
{{ if (menuCategory) { }}
@@ -110,6 +136,10 @@
{{-dirs}}
<ComponentGroup Id="ProductComponents" Directory="APPLICATIONFOLDER">
+ <Component Directory="resourcesDir">
+ <Condition>(NOT ALLUSERS = 1) AND DISABLEAUTOUPDATE = 0</Condition>
+ <File Name="app-update.yml" Source="$(var.appDir)\..\msi-app-update.yml" ReadOnly="yes" KeyPath="yes"/>
+ </Component>
{{-files}}
</ComponentGroup>
</Product>