blob: fe6a02bd955103e9c0fd1eec357b06d88a985104 [file] [log] [blame]
Sébastien Blin1f915762020-08-03 13:27:42 -04001<?xml version="1.0" encoding="UTF-8"?>
2<?include Config.wxi?>
3<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
4 <Product Id="*" Name="$(var.Name)" Language="1033" Version="$(fun.AutoVersion(1.0))" Manufacturer="$(var.Manufacturer)" UpgradeCode="7c45b52b-0390-4fe8-947a-3f13e82dd346">
5 <Package InstallerVersion="301" Compressed="yes" InstallScope="perMachine" />
6
7 <MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
8 <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
9
10 <!--Icon File should be in release folder(not wix project), otherwise cannot be read-->
11 <Icon Id="icon.ico" SourceFile="$(var.ReleaseDir)\jami.ico" />
12 <Property Id="ARPPRODUCTICON" Value="icon.ico" />
13 <Property Id="ARPNOMODIFY" Value="1" />
14
15 <Feature Id="ProductFeature" Title="Main" Level="1" Absent="disallow">
16 <ComponentGroupRef Id="StandardComponents" Primary="yes" />
17 <ComponentGroupRef Id="HeatGenerated" />
18 <ComponentRef Id="ApplicationShortcutDesktop" />
19 <ComponentRef Id="ApplicationShortcutStartMenu" />
20 <ComponentRef Id="RegistryEntries" />
21 </Feature>
22
23 <!--Visual C++ Redist merge module-->
24 <DirectoryRef Id="TARGETDIR">
25 <Merge Id="VCRedist" SourceFile="$(env.VCRedistMergeModule)" DiskId="1" Language="0" />
26 </DirectoryRef>
27 <Feature Id="VCRedist" Title="Visual C++ Runtime" AllowAdvertise="no" Display="hidden" Level="1">
28 <MergeRef Id="VCRedist"/>
29 </Feature>
30
31 <!--SetDirectory of APPLICATIONFOLDER -->
32 <SetDirectory Id="APPLICATIONFOLDER" Value="[ProgramFiles64Folder][ApplicationFolderName]">APPLICATIONFOLDER=""</SetDirectory>
33 <SetProperty Id="ARPINSTALLLOCATION" Value="[APPLICATIONFOLDER]" After="CostFinalize" />
34
35 <UIRef Id="CustomUI" />
36 <WixVariable Id="WixUIInfoIcon" Value="icon.ico"/>
37 <WixVariable Id="WixUIBannerBmp" Value="top-banner.bmp" />
38 <WixVariable Id="WixUIDialogBmp" Value="main-banner.bmp" />
39 <WixVariable Id="WixUISupportPerUser" Value="0" />
40
41 <CustomAction Id="removeOldJamiFiles" Directory="APPLICATIONFOLDER" ExeCommand="cmd /c &quot;del vc_redist.x64.exe; del uninstall.exe; del WinSparkle.dll;&quot;" Execute="deferred" Return="ignore" HideTarget="no" Impersonate="no" />
42
43 <Property Id="QtExecCmdLine" Value='"[WindowsFolder]\System32\taskkill.exe" /F /IM QtWebEngineProcess.exe /IM Jami.exe'/>
44 <CustomAction Id="JamiProcesses.TaskKill"
45 BinaryKey="WixCA"
46 DllEntry="CAQuietExec"
47 Execute="immediate"
48 Return="ignore"/>
49 </Product>
50
51 <Fragment Id="DirectoryStructure">
52 <Directory Id="TARGETDIR" Name="SourceDir">
53 <Directory Id="ProgramFiles64Folder">
54 <Directory Id="APPLICATIONFOLDER" Name="$(var.Name)" />
55 </Directory>
56 <Directory Id="DesktopFolder" Name="Desktop" />
57 <Directory Id="ProgramMenuFolder">
58 <Directory Id="ApplicationProgramsFolder" />
59 </Directory>
60 <Directory Id="WindowsFolder" Name="WINDOWS"/>
61 </Directory>
62 </Fragment>
63
64 <Fragment Id="Shortcuts">
65 <DirectoryRef Id="DesktopFolder">
66 <Component Id="ApplicationShortcutDesktop" Guid="*" Win64="yes">
67 <Shortcut Id="ApplicationShortcutDesktop" Name="$(var.Name)" Description="Launch $(var.Name)" Target="[#fileMain.exe]" WorkingDirectory="INSTALLFOLDER" />
68 <RemoveFolder Id="DesktopFolder" On="uninstall" />
69 <RegistryValue Root="HKCU" Key="Software\jami.net\$(var.Name)" Name="desktop" Type="integer" Value="1" KeyPath="yes" />
70 </Component>
71 </DirectoryRef>
72
73 <DirectoryRef Id="ApplicationProgramsFolder">
74 <Component Id="ApplicationShortcutStartMenu" Guid="*" Win64="yes">
75 <Shortcut Id="ApplicationShortcutStartMenu" Name="$(var.Name)" Description="Launch $(var.Name)" Target="[#fileMain.exe]" WorkingDirectory="INSTALLFOLDER" />
76 <RemoveFolder Id="StartMenuFolder" On="uninstall" />
77 <RegistryValue Root="HKCU" Key="Software\jami.net\$(var.Name)" Name="startmenu" Type="integer" Value="1" KeyPath="yes" />
78 </Component>
79 </DirectoryRef>
80 </Fragment>
81
82 <Fragment Id="OtherRegistryEntries">
83 <DirectoryRef Id="TARGETDIR">
84 <Component Id="RegistryEntries" Guid="*" Win64="yes">
85 <RegistryValue Root="HKCU" Key="Software\jami.net\$(var.AppName)" Name="hasRun" Type="integer" Value="0" KeyPath="yes" />
86 </Component>
87 </DirectoryRef>
88 </Fragment>
89
90 <Fragment Id="UI">
91 <UI Id="CustomUI">
92 <Property Id="WixAppFolder" Value="WixPerMachineFolder" />
93
94 <!--APPLICATIONFOLDER required by WixUI_Advanced, ApplicationFolderName reset APPLICATIONFOLDER path-->
95 <Property Id="ApplicationFolderName" Value="$(var.Manufacturer)\$(var.AppName)" />
96 <UIRef Id="WixUI_Advanced" />
97
98 <!--Remove User Exit Dialog-->
99 <Publish Dialog="AdvancedWelcomeEulaDlg" Control="Cancel" Property="AbortInstall" Value="1">1</Publish>
100 <Publish Dialog="InstallDirDlg" Control="Cancel" Property="AbortInstall" Value="1">1</Publish>
101 <Publish Dialog="FeaturesDlg" Control="Cancel" Property="AbortInstall" Value="1">1</Publish>
102 <Publish Dialog="MaintenanceWelcomeDlg" Control="Cancel" Property="AbortInstall" Value="1">1</Publish>
103 <Publish Dialog="MaintenanceTypeDlg" Control="Cancel" Property="AbortInstall" Value="1">1</Publish>
104
105 <!--Launch Program If Checkbox is clicked-->
106 <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
107
108 <InstallUISequence>
109 <Show Dialog="UserExit" OnExit="cancel">NOT AbortInstall = 1</Show>
110 <Custom Action="Overwrite_WixSetDefaultPerMachineFolder" After="WixSetDefaultPerMachineFolder" />
111 </InstallUISequence>
112 </UI>
113 <InstallExecuteSequence>
114 <Custom Action='JamiProcesses.TaskKill' Before='InstallValidate'/>
115 <Custom Action="removeOldJamiFiles" After="RemoveFiles" />
116 <Custom Action="LaunchApplication_nonUI" After="InstallFinalize"> WIXNONUILAUNCH </Custom>
117 <Custom Action="Overwrite_WixSetDefaultPerMachineFolder" After="WixSetDefaultPerMachineFolder" />
118 </InstallExecuteSequence>
119
120 <!--License check box text, Launch check box text (auto check)-->
121 <Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Launch $(var.Name)" />
122 <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch $(var.Name)" />
123 <!--CheckBox Default Set to One-->
124 <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1"/>
125 <Property Id="LicenseAccepted" Value="1"/>
126
127 <Property Id="WixShellExecTarget" Value="[#fileMain.exe]" />
128 <CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
129 <CustomAction Id="LaunchApplication_nonUI" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes"/>
130 <CustomAction Id="Overwrite_WixSetDefaultPerMachineFolder" Property="WixPerMachineFolder" Value="[ProgramFiles64Folder][ApplicationFolderName]" Execute="immediate" />
131 <!--License File-->
132 <WixVariable Id="WixUILicenseRtf" Value="$(var.ReleaseDir)\License.rtf"/>
133 </Fragment>
134
135</Wix>