Files
advertising-profit-control/SetupProject/Product.wxs
T

140 lines
6.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ProductVersion=!(bind.FileVersion.main) ?>
<Product Id="*" Name="Advertising Profit Control" Language="1033" Version="$(var.ProductVersion)" Manufacturer="Garritt McCune" UpgradeCode="a416a558-d7c0-4f24-8b1e-2d01761ad15f">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Description="Custom Profit Control Recording Software" Comments="Profit Control Recording Software"/>
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<!--Not set by default, EmbedCab="yes" embeds the cabinet file into the installer-->
<MediaTemplate EmbedCab="yes"/>
<!--Set the program's icon-->
<Icon Id="icon.ico" SourceFile="$(var.SolutionDir)\AdvertsingProfitControl\Stretched Logo Collection.ico"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
<!--Displays the installer so the user can choose what directory they'd like to install the product.-->
<!--There are no select features options with this install dialog.-->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<UI>
<UIRef Id="WixUI_InstallDir" />
<!-- Skip license dialog -->
<Publish Dialog="WelcomeDlg"
Control="Next"
Event="NewDialog"
Value="InstallDirDlg"
Order="2">1</Publish>
<Publish Dialog="InstallDirDlg"
Control="Back"
Event="NewDialog"
Value="WelcomeDlg"
Order="2">1</Publish>
</UI>
<!--Try to detect SQL Server.-->
<Property Id="SQLSERVER_INSTANCE">
<RegistrySearch Id="SQLServerRegSearch" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft Sql Server\Instance Names\SQL" Type="raw" Name="SQLEXPRESS" Win64="yes"/>
<RegistrySearch Id="SQLServerRegSearch32" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft Sql Server\Instance Names\SQL" Type="raw" Name="SQLEXPRESS" Win64="no"/>
</Property>
<Condition Message="SQL Server 2016 is required to use [ProductName]. Please install SQL Server 2016 then run this installer again.">
<![CDATA[SQLSERVER_INSTANCE]]>
</Condition>
<!--Detect .NET Framework 4.5-->
<PropertyRef Id="NETFRAMEWORK45"/>
<Condition Message="[ProductName] requires .NET Framework 4.5. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK45]]>
</Condition>
<!--Define the icons used in the installer dialogs-->
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="Banner.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="Dialog.bmp" />
<Feature Id="ProductFeature" Title="AdvertisingProfitControl" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentRef Id="ApplicationShortcut" />
</Feature>
</Product>
<Fragment>
<!--Install Directory-->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="Advertising Profit Control" />
</Directory>
<!--Define shortcut-->
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="Advertising Profit Control"/>
</Directory>
</Directory>
</Fragment>
<!--Define the shortcut-->
<Fragment>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="*">
<!--https://stackoverflow.com/questions/11776023/advertised-shortcuts-vs-non-advertised-shortcuts-in-windows-setup-project
The above link describes the difference between advertised and non-advertised links.-->
<Shortcut Id="ApplicationStartMenuShortcut"
Name="Advertising Profit Control"
Description="Profit Control Recording Software"
Target="[TARGETDIR]AdvertsingProfitControl.exe"
WorkingDirectory="TARGETDIR"/>
<RemoveFolder Id="CleanUpShortCut" Directory="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Microsoft\AdvertsingProfitControl" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="AdvertisingProfitControl.exe">
<File Id="main" Source="$(var.AdvertsingProfitControl.TargetPath)" />
</Component>
<!--Mark all needed DLLs and configuration files to be installed in the directory with the main binary.-->
<Component Id="AppConfig">
<File Name="AdvertsingProfitControl.exe.config" Source="$(var.SolutionDir)\AdvertsingProfitControl\App.config"/>
</Component>
<Component Id="EntityFrameworkDll">
<File Source="$(var.SolutionDir)\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll"/>
</Component>
<Component Id="EntityFrameworkSqlDll">
<File Source="$(var.SolutionDir)\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll"/>
</Component>
<!--PDF generator library files-->
<Component Id="libeay32">
<File Source="$(var.SolutionDir)AdvertsingProfitControl\libeay32.dll"/>
</Component>
<Component Id="libgcc_s_dw2">
<File Source="$(var.SolutionDir)AdvertsingProfitControl\libgcc_s_dw2-1.dll"/>
</Component>
<Component Id="mingwm10">
<File Source="$(var.SolutionDir)AdvertsingProfitControl\mingwm10.dll"/>
</Component>
<Component Id="ssleay32">
<File Source="$(var.SolutionDir)AdvertsingProfitControl\ssleay32.dll"/>
</Component>
<Component Id="wkhtmltox0">
<File Source="$(var.SolutionDir)AdvertsingProfitControl\wkhtmltox0.dll" xml:lang="en-us"/>
</Component>
<Component Id="Spire">
<File Source="$(var.SolutionDir)\packages\FreeSpire.PDF.3.2\lib\net40\Spire.License.dll"/>
</Component>
<Component Id="SpirePdf">
<File Source="$(var.SolutionDir)\packages\FreeSpire.PDF.3.2\lib\net40\Spire.Pdf.dll"/>
</Component>
<!--Pechkin-->
<Component Id="Pechkin">
<File Source="$(var.SolutionDir)packages\Pechkin.0.5.8.1\lib\net40\Pechkin.dll" xml:lang="en-us"/>
</Component>
<!--Common logging -->
<Component Id="CommonCore">
<File Source="$(var.SolutionDir)\packages\Common.Logging.Core.3.3.1\lib\net40\Common.Logging.Core.dll"/>
</Component>
<Component Id="Logging">
<File Source="$(var.SolutionDir)\packages\Common.Logging.3.3.1\lib\net40\Common.Logging.dll"/>
</Component>
<Component Id="ApcData">
<File Source="$(var.SolutionDir)\AdvertisingProfitControlData\bin\Debug\AdvertisingProfitControlData.dll"/>
</Component>
<Component Id="TableParsingEngine">
<File Source="$(var.SolutionDir)\DataTableParsingEngine\bin\Debug\DataTableParsingEngine.dll"/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>