Skip to content
mbackup.wxs 3.37 KiB
Newer Older
Yuanle Song's avatar
Yuanle Song committed
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*" UpgradeCode="3030B91E-5E3E-4151-9A69-B53B72690430" Version="$(var.Version)" Language="1033" Name="mbackup" Manufacturer="Yuanle Song">
Yuanle Song's avatar
Yuanle Song committed
    <Package InstallerVersion="300" Compressed="yes"/>
    <Media Id="1" Cabinet="mbackup.cab" EmbedCab="yes" />

    <MajorUpgrade AllowDowngrades="yes"/>

Yuanle Song's avatar
Yuanle Song committed
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFiles64Folder">
          <Directory Id="MBACKUP_PROGRAM_FILES" Name="mbackup" />
        </Directory>
        <Directory Id="CommonAppDataFolder">
          <Directory Id="MBACKUP_DATA" Name="mbackup"/>
        </Directory>
        <Directory Id="DesktopFolder" Name="Desktop" />
        <Directory Id="ProgramMenuFolder" />
Yuanle Song's avatar
Yuanle Song committed
    </Directory>

    <DirectoryRef Id="DesktopFolder">
        <Component Id="ApplicationShortcutDesktop" Guid="*">
            <Shortcut Id="ApplicationDesktopShortcut"
                Name="mbackup"
                Description="Backup your computer using rsync"
                Target="[#filE3FFB5E42FD6DDB7AD945F29409779F0]"
                WorkingDirectory="MBACKUP_PROGRAM_FILES"/>
            <RemoveFolder Id="DesktopShortcut" On="uninstall"/>
            <RegistryValue Root="HKCU" Key="Software\mbackup" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
        </Component>
    </DirectoryRef>

    <DirectoryRef Id="ProgramMenuFolder">
        <Component Id="ApplicationShortcutStartMenu" Guid="F7C168BA-BDC9-4C4D-8AE7-722AC399AFD5">
            <Shortcut Id="ApplicationStartMenuShortcut"
                      Name="mbackup"
                      Description="Backup your computer using rsync"
                      Target="[#filE3FFB5E42FD6DDB7AD945F29409779F0]"
                      WorkingDirectory="MBACKUP_PROGRAM_FILES"/>
            <RemoveFolder Id="StartMenuShortCut" On="uninstall"/>
            <RegistryValue Root="HKCU" Key="Software\mbackup" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
        </Component>
    </DirectoryRef>
    <DirectoryRef Id="MBACKUP_DATA">
Yuanle Song's avatar
Yuanle Song committed
      <Component Id="mbackup_default.exclude" Guid="*">
          <File Id="mbackup_default.exclude" Source="mbackup-config\mbackup-default.exclude" KeyPath="yes"/>
      </Component>
      <Component Id="mbackup_default.list" Guid="*">
          <File Id="mbackup_default.list" Source="mbackup-config\mbackup-default.list" KeyPath="yes"/>
      </Component>
      <Component Id="user_default.list" Guid="*">
          <File Id="user_default.list" Source="mbackup-config\user-default.list" KeyPath="yes"/>
      </Component>
      <Component Id="mbackup.txt" NeverOverwrite="yes" Permanent="yes" Guid="*">
          <!-- do not overwrite this component/file if it already exists on target system -->
          <File Id="mbackup.txt" Source="mbackup-config\mbackup.txt" KeyPath="yes"/>
      </Component>
    </DirectoryRef>
  
    <Feature Id="MainApplication" Title="Main Application" Level="1">
      <ComponentGroupRef Id="MbackupHeatGenerated" />
      <ComponentGroupRef Id="RsyncHeatGenerated" />
Yuanle Song's avatar
Yuanle Song committed
      <ComponentRef Id="mbackup_default.exclude" />
      <ComponentRef Id="mbackup_default.list" />
      <ComponentRef Id="user_default.list" />
      <ComponentRef Id="mbackup.txt" />
      <ComponentRef Id="ApplicationShortcutStartMenu" />
      <ComponentRef Id="ApplicationShortcutDesktop" />
Yuanle Song's avatar
Yuanle Song committed
    </Feature>
  </Product>
</Wix>