Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/package/src/windows/quarto.wxs
6450 views
<?xml version="1.0" encoding="UTF-8"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*" Name="Quarto" Language="1033" Manufacturer="Posit Software, PBC" Version="$(env.QUARTO_INSTALLER_VERSION)" UpgradeCode="$(env.QUARTO_MSI_UPGRADE_CODE)">

    <Package InstallerVersion="300" Compressed="yes" InstallScope="perMachine" />

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes" />

    <Property Id="ApplicationFolderName" Value="Quarto" />
    <Property Id="WixAppFolder" Value="WixPerUserFolder" />

    <SetProperty Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Please restart any existing Command Prompts, Powershell windows, and Visual Studio Code instances prior to using Quarto." Sequence="ui" After="ExecuteAction">
      <![CDATA[ALLUSERS="" OR ALLUSERS=1 OR ALLUSERS=2]]>
    </SetProperty>

    <UIRef Id="WixUI_Advanced_Custom" />

    <!-- The main application -->
    <Feature Id="MainApplication" Title="Quarto Command Line Tools" Level="1">
      <ComponentGroupRef Id="ProductComponents" />
      <ComponentRef Id="UpdateUserPath" />
      <ComponentRef Id="UpdateSystemPath" />
    </Feature>

    <!-- Detect previous versons and upgrade any with the same upgrade code -->
    <Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
    <Upgrade Id="$(env.QUARTO_MSI_UPGRADE_CODE)">
      <UpgradeVersion Property='PREVIOUSVERSIONSINSTALLED' Minimum='0.0.0.0' IncludeMinimum='yes' Maximum="99.0.0.0" IncludeMaximum="no" />
    </Upgrade>

    <!-- install directory -->
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFiles64Folder">
        <Directory Id="APPLICATIONFOLDER" Name="Quarto">
          <Component Id="UpdateUserPath" Guid="FC7C02EF-7434-40D5-A7AA-B974B368A969" KeyPath="yes">
            <Condition>ALLUSERS = "" OR ALLUSERS = 2</Condition>
            <Environment Id='SetUserPath' Name='PATH' Action='set' Permanent='no' System='no' Part='first' Value='[APPLICATIONFOLDER]bin' />
          </Component>

          <Component Id="UpdateSystemPath" Guid="375C272A-C227-4184-98C4-6EFBE6F72719" KeyPath="yes">
            <Condition>ALLUSERS = 1</Condition>
            <Environment Id='SetSystemPath' Name='PATH' Action='set' Permanent='no' System='yes' Part='first' Value='[APPLICATIONFOLDER]bin' />
          </Component>
        </Directory>
      </Directory>
    </Directory>


    <!-- Set properties for add/remove programs -->
    <Property Id="ARPURLINFOABOUT" Value="https://github.com/quarto-dev/quarto-cli" />
    <Property Id="ARPHELPLINK" Value="https://github.com/quarto-dev/quarto-cli" />
    <Property Id="ARPNOREPAIR" Value="yes" Secure="yes" /> <!-- Remove repair -->
    <Property Id="ARPNOMODIFY" Value="yes" Secure="yes" /> <!-- Remove modify -->

    <!--Make changes to PATH visible immediately-->
    <CustomActionRef Id="WixBroadcastSettingChange" />
    <CustomActionRef Id="WixBroadcastEnvironmentChange" />


  </Product>

</Wix>