<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 Copyright (C) 1994-2018 Altair Engineering, Inc.
 For more information, contact Altair at www.altair.com.

 This file is part of the PBS Professional ("PBS Pro") software.

 Open Source License Information:

 PBS Pro is free software. You can redistribute it and/or modify it under the
 terms of the GNU Affero General Public License as published by the Free
 Software Foundation, either version 3 of the License, or (at your option) any
 later version.

 PBS Pro 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 Affero General Public License for more details.

 You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.

 Commercial License Information:

 For a copy of the commercial license terms and conditions,
 go to: (http://www.pbspro.com/UserArea/agreement.html)
 or contact the Altair Legal Department.

 Altair’s dual-license business model allows companies, individuals, and
 organizations to create proprietary derivative works of PBS Pro and
 distribute them - whether embedded or bundled with other software -
 under a commercial license agreement.

 Use of Altair’s trademarks, including but not limited to "PBS™",
 "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
 trademark licensing policies.
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="*" Name="$(var.pbs_product_name)" Language="1033" Version="$(var.pbs_short_version)"  Manufacturer="PBS Pro" UpgradeCode="4bc6b7a2-d5e0-4ef5-a4e7-8cf241af146e">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/>
        <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>
        <MediaTemplate EmbedCab="yes"/>
        <Icon Id="ProductIcon" SourceFile="$(var.pbs_resources)\logo.ico"/>
        <Property Id="ARPPRODUCTICON" Value="ProductIcon"/>
        <WixVariable Id="WixUILicenseRtf" Value="$(var.pbs_resources)\pbs_license.rtf"/>
        <WixVariable Id="WixUIBannerBmp" Value="$(var.pbs_resources)\pbs_hq.bmp"/>
        <WixVariable Id="WixUIDialogBmp" Value="$(var.pbs_resources)\setup.bmp"/>
        <Feature Id="PBSProFeature" Title="PBSPro" Level="1" ConfigurableDirectory="INSTALLFOLDER">
            <ComponentGroupRef Id="pbsproexec"/>
            <ComponentRef Id="ENVIRON"/>
        </Feature>
        <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER"/>
        <UIRef Id="WixUI_InstallDir"/>
    </Product>
    <Fragment>
        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFilesFolder">
                <Directory Id="INSTALLFOLDER" Name="PBS">
                    <Directory Id="PBS_EXEC" Name="exec" />
                </Directory>
            </Directory>
        </Directory>
    </Fragment>
    <Fragment>
        <DirectoryRef Id="TARGETDIR">
            <Component Id="ENVIRON" Guid="1bc6b7a2-d5e0-4ef5-a4e7-8cf241af146e">
                <Environment Id="PBS_EXEC_VAR" Action="set" Part="all" Name="PBS_EXEC" Permanent="no" System="yes" Value="[PBS_EXEC]"/>
                <Environment Id="BIN" Action="set" Part="last" Name="PATH" Permanent="no" System="yes" Value="%PBS_EXEC%bin"/>
                <Environment Id="SBIN" Action="set" Part="last" Name="PATH" Permanent="no" System="yes" Value="%PBS_EXEC%sbin"/>
                <Environment Id="LIB" Action="set" Part="last" Name="PATH" Permanent="no" System="yes" Value="%PBS_EXEC%lib"/>
                <Environment Id="PGBIN" Action="set" Part="last" Name="PATH" Permanent="no" System="yes" Value="%PBS_EXEC%pgsql\bin"/>
                <Environment Id="PYBIN" Action="set" Part="last" Name="PATH" Permanent="no" System="yes" Value="%PBS_EXEC%python"/>
                <Environment Id="PYSCRIPTS" Action="set" Part="last" Name="PATH" Permanent="no" System="yes" Value="%PBS_EXEC%python\Scripts"/>
                <Environment Id="PYWIN32" Action="set" Part="last" Name="PATH" Permanent="no" System="yes" Value="%PBS_EXEC%python\Lib\site-packages\pywin32_system32"/>
                <Environment Id="PBS_CONF_FILE" Action="set" Part="all" Name="PBS_CONF_FILE" Permanent="no" System="yes" Value="[INSTALLFOLDER]pbs.conf"/>
            </Component>
        </DirectoryRef>
    </Fragment>
</Wix>
