Files
2024-06-16 13:57:50 +03:00

101 lines
4.3 KiB
XML
Executable File

<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<?define ProductName="MtApi" ?>
<?define ProductVersion=!(bind.FileVersion.MtApi.dll) ?>
<?define Manufacturer="DW"?>
<?define ProductPath="..\build\products\$(var.Configuration)\net8.0\"?>
<?define ProductPathNative="..\build\products\$(var.Configuration)\$(var.Platform)\"?>
<Package Name="$(var.ProductName) $(var.ProductVersion)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="4107F5F4-7300-4B45-88CE-63929AF228FA" InstallerVersion="200">
<WixVariable Id="WixUILicenseRtf" Value="..\LICENSE.rtf" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<Feature Id="MtApi" Title="$(var.ProductName)" Level="1">
<ComponentGroupRef Id="MtApiComponents" />
</Feature>
<Feature Id="MTConnector" Title="MT Connector" Level="1">
<ComponentGroupRef Id="MTConnectorComponents" />
</Feature>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<UI>
<ui:WixUI Id="WixUI_Mondo" />
</UI>
<InstallExecuteSequence>
<!--<Custom Action="InstallEx4FileAction" After="InstallFinalize" Condition="NOT Installed" />-->
<!--<Custom Action="CopyEx4" After="InstallFinalize" Condition="NOT Installed" />-->
</InstallExecuteSequence>
</Package>
<Fragment>
<StandardDirectory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="$(var.ProductName)">
<Directory Id="ExpertFolder" Name="Experts">
</Directory>
</Directory>
</StandardDirectory>
<StandardDirectory Id="SystemFolder">
</StandardDirectory>
<StandardDirectory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)">
</Directory>
</StandardDirectory>
</Fragment>
<Fragment>
<ComponentGroup Id="MtApiComponents">
<Component Id="MtApiDll" Directory="INSTALLFOLDER">
<File Id="MtApi.dll" Name="MtApi.dll" KeyPath="yes" Source="$(var.ProductPath)MtApi.dll" />
<RegistryKey Root="HKLM" Key="Software\Microsoft\.NetFramework\v4.0.30319\AssemblyFoldersEx\$(var.ProductName)" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Type="string" Value="[INSTALLFOLDER]" />
</RegistryKey>
</Component>
<Component Id="MtClientDll" Directory="INSTALLFOLDER">
<File Id="MtClient.dll" Name="MtClient.dll" KeyPath="yes" Source="$(var.ProductPath)MtClient.dll" />
</Component>
<Component Id="NewtonsoftJsondll" Directory="INSTALLFOLDER">
<File Id="Newtonsoft.Json.dll" Name="Newtonsoft.Json.dll" KeyPath="yes" Source="$(var.ProductPath)Newtonsoft.Json.dll" />
</Component>
<Component Id="MtApiExpert" Directory="ExpertFolder">
<File Id="MtApi.ex4" Name="MtApi.ex4" KeyPath="yes" Source="..\mq4\MtApi.ex4" />
</Component>
<Component Id="AppShortcutConnMgr" Directory="ApplicationProgramsFolder">
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\$(var.ProductName)" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
</ComponentGroup>
<ComponentGroup Id="MTConnectorComponents">
<Component Id="ConnectionProfileRegistryKey" Directory="INSTALLFOLDER">
<RegistryKey Root="HKCU" Key="Software\MtApi\ConnectionProfiles\Local" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Type="string" Name="Host" Value="" />
<RegistryValue Type="integer" Name="Port" Value="8222" KeyPath="yes" />
</RegistryKey>
</Component>
<Component Id="MTConnectorDll" Directory="SystemFolder">
<File Id="MTConnector.dll" Name="MTConnector.dll" KeyPath="yes" Source="$(var.ProductPathNative)MTConnector.dll" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>