Newer
Older
<!-- Copyright (C) 2019 Yuanle Song <root@emacsos.com> -->
<!-- This file is part of mbackup-for-windows. -->
<!-- mbackup-for-windows is free software: you can redistribute it and/or modify -->
<!-- it under the terms of the GNU General Public License as published by the -->
<!-- Free Software Foundation, either version 3 of the License, or (at your -->
<!-- option) any later version. -->
<!-- mbackup-for-windows is distributed in the hope that it will be useful, but -->
<!-- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -->
<!-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -->
<!-- more details. -->
<!-- You should have received a copy of the GNU General Public License along with -->
<!-- mbackup-for-windows. If not, see <http://www.gnu.org/licenses/>. -->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" UpgradeCode="3030B91E-5E3E-4151-9A69-B53B72690430" Version="$(var.Version)" Language="1033" Name="mbackup" Manufacturer="Yuanle Song">
<Package InstallScope="perMachine" InstallerVersion="300" Compressed="yes"/>
<Media Id="1" Cabinet="mbackup.cab" EmbedCab="yes" />
<MajorUpgrade AllowDowngrades="yes"/>
<Directory Id="ProgramFiles64Folder">
<Directory Id="MBACKUP_PROGRAM_FILES" Name="mbackup" />
</Directory>
<Directory Id="CommonAppDataFolder">
<Directory Id="MBACKUP_DATA" Name="mbackup">
<Directory Id="MBACKUP_SSH_DIR" Name=".ssh" />
</Directory>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
<Directory Id="ProgramMenuFolder">
<Directory Id="MbackupStartMenuDir" Name="mbackup" />
<DirectoryRef Id="MBACKUP_PROGRAM_FILES">
<Component Id="COPYING" Guid="*">
<File Id="COPYING" Name="COPYING.txt" Source="COPYING" KeyPath="yes"/>
</Component>
<Component Id="README.md" Guid="*">
<File Id="README.md" Name="README.txt" Source="README.md" KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="MBACKUP_DATA">
<Component Id="default_exclude.txt" Guid="*">
<File Id="default_exclude.txt" Source="mbackup-config\default-exclude.txt" KeyPath="yes" />
</Component>
<Component Id="default_list.txt" Guid="*">
<File Id="default_list.txt" Source="mbackup-config\default-list.txt" KeyPath="yes" />
</Component>
<Component Id="local_list.txt" NeverOverwrite="yes" Permanent="yes" Guid="*">
<!-- do not overwrite this component/file if it already exists on target system -->
<File Id="local_list.txt" Source="mbackup-config\local-list.txt" KeyPath="yes">
<util:PermissionEx User="Users" Domain="[MachineName]" GenericAll="yes" />
</File>
</Component>
<Component Id="local_exclude.txt" NeverOverwrite="yes" Permanent="yes" Guid="*">
<!-- do not overwrite this component/file if it already exists on target system -->
<File Id="local_exclude.txt" Source="mbackup-config\local-exclude.txt" KeyPath="yes">
<util:PermissionEx User="Users" Domain="[MachineName]" GenericAll="yes" />
</File>
</Component>
<Component Id="mbackup_config.txt" NeverOverwrite="yes" Permanent="yes" Guid="*">
<!-- do not overwrite this component/file if it already exists on target system -->
<File Id="mbackup_config.txt" Source="mbackup-config\mbackup-config.txt" KeyPath="yes">
<util:PermissionEx User="Users" Domain="[MachineName]" GenericAll="yes" />
</File>
</Component>
<Component Id="user_default_list.txt" Guid="*">
<File Id="user_default_list.txt" Source="mbackup-config\user-default-list.txt" KeyPath="yes" />
</Component>
<Component Id="mbackup_ssh_dir" Directory="MBACKUP_SSH_DIR" Guid="8FC95FD8-DFA3-45D0-9CF1-45F010FEA3E2">
<CreateFolder>
<util:PermissionEx User="Users" Domain="[MachineName]" GenericAll="yes" />
</CreateFolder>
<DirectoryRef Id="DesktopFolder">
<Component Id="MbackupDesktopShortcut" Guid="*">
<Shortcut Id="DesktopMbackupExe"
Name="mbackup"
Description="Backup your computer using rsync"
Target="[!filE3FFB5E42FD6DDB7AD945F29409779F0]"
WorkingDirectory="MBACKUP_PROGRAM_FILES"/>
<RemoveFolder Id="MbackupDesktopShortcut" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\mbackup" Name="DesktopShortcutInstalled" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="MbackupStartMenuDir">
<Component Id="MbackupStartMenuShortcuts" Guid="*">
<Shortcut Id="StartMenuMbackupExe"
Name="mbackup"
Description="Backup your computer using rsync"
Target="[!filE3FFB5E42FD6DDB7AD945F29409779F0]"
WorkingDirectory="MBACKUP_PROGRAM_FILES"/>
<Shortcut Id="StartMenuMbackupConfig"
Name="mbackup-config.txt"
Description="mbackup config file"
Target="[!mbackup_config.txt]"
WorkingDirectory="MBACKUP_PROGRAM_FILES"/>
<Shortcut Id="StartMenuLocalList"
Name="local-list.txt"
Description="mbackup local-list.txt file"
Target="[!local_list.txt]"
WorkingDirectory="MBACKUP_PROGRAM_FILES"/>
<Shortcut Id="StartMenuLocalExclude"
Name="local-exclude.txt"
Description="mbackup local-exclude.txt file"
Target="[!local_exclude.txt]"
WorkingDirectory="MBACKUP_PROGRAM_FILES"/>
<RemoveFolder Id="MbackupStartMenuDirRemove" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\mbackup" Name="StartMenuShortcutsInstalled" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<InstallExecuteSequence>
<Custom Action="CreateScheduledTaskLogon" Before='InstallFinalize'>NOT Installed</Custom>
<Custom Action="RemoveScheduledTaskLogon" Before="RemoveFiles">Installed</Custom>
<Custom Action="CreateScheduledTaskInterval" Before='InstallFinalize'>NOT Installed</Custom>
<Custom Action="RemoveScheduledTaskInterval" Before="RemoveFiles">Installed</Custom>
</InstallExecuteSequence>
<CustomAction Id="CreateScheduledTaskLogon"
Return="check"
Impersonate="no"
Execute="deferred"
Directory="TARGETDIR"
ExeCommand=""[SystemFolder]SCHTASKS.EXE" /Create /RU BUILTIN\USERS /RP /NP /SC ONLOGON /TN "mbackup-logon" /TR "[MBACKUP_PROGRAM_FILES]publish\mbackupw.exe" /DELAY 0015:00" />
<CustomAction Id="RemoveScheduledTaskLogon"
Return="check"
Impersonate="no"
Execute="deferred"
Directory="TARGETDIR"
ExeCommand=""[SystemFolder]SCHTASKS.EXE" /Delete /TN "mbackup-logon" /F" />
<CustomAction Id="CreateScheduledTaskInterval"
Return="check"
Impersonate="no"
Execute="deferred"
Directory="TARGETDIR"
ExeCommand=""[SystemFolder]SCHTASKS.EXE" /Create /RU BUILTIN\USERS /RP /NP /SC DAILY /TN "mbackup-interval" /TR "[MBACKUP_PROGRAM_FILES]publish\mbackupw.exe" /ST 09:00 /DU 17:00 /RI 120 /K" />
<CustomAction Id="RemoveScheduledTaskInterval"
Return="check"
Impersonate="no"
Execute="deferred"
Directory="TARGETDIR"
ExeCommand=""[SystemFolder]SCHTASKS.EXE" /Delete /TN "mbackup-interval" /F" />
<Feature Id="MainApplication" Title="Main Application" Level="1">
<ComponentRef Id="README.md" />
<ComponentRef Id="COPYING" />
<ComponentGroupRef Id="MbackupHeatGenerated" />
<ComponentGroupRef Id="RsyncHeatGenerated" />
<ComponentRef Id="default_exclude.txt" />
<ComponentRef Id="default_list.txt" />
<ComponentRef Id="local_list.txt" />
<ComponentRef Id="local_exclude.txt" />
<ComponentRef Id="mbackup_config.txt" />
<ComponentRef Id="user_default_list.txt" />
<ComponentRef Id="MbackupDesktopShortcut" />
<ComponentRef Id="MbackupStartMenuShortcuts" />
<ComponentRef Id="mbackup_ssh_dir" />