11<?xml version =" 1.0" encoding =" UTF-8" ?>
2- <Wix xmlns =" http://schemas.microsoft.com/wix/2006/wi"
3- xmlns:netfx=" http://schemas.microsoft.com/wix/NetFxExtension" >
42
5- <?define ServoPidControl _TargetDir = $(var.ServoPidControl.TargetDir)?>
3+ <Wix xmlns =" http://schemas.microsoft.com/wix/2006/wi"
4+ xmlns : netfx =" http://schemas.microsoft.com/wix/NetFxExtension" >
65
7- <!-- Product name as you want it to appear in Add/Remove Programs-->
8- <?if $(var.Platform) = x 64 ?>
9- <?define ProductName = " Arduino ServoPID Control (64 bit)" ?>
10- <?define Win 64 = " yes" ?>
11- <?define PlatformProgramFilesFolder = " ProgramFiles64Folder" ?>
12- <?else ?>
13- <?define ProductName = " Arduino ServoPID Control" ?>
14- <?define Win 64 = " no" ?>
15- <?define PlatformProgramFilesFolder = " ProgramFilesFolder" ?>
16- <?endif ?>
6+ <?define ServoPidControl _TargetDir = $(var.ServoPidControl.TargetDir)?>
7+ <?define ServoPid _ProjectDir = $(var.ServoPid.ProjectDir)?>
178
18- <?define InstallName = " $(var.ProductName) Setup " ?>
9+ <?define InstallName = " Arduino ServoPID Control " ?>
1910
20- <Product Id =" *" Name =" ServoPidControlSetup" Language =" 1033" Version =" !(bind.fileVersion.fil98E434A3D16D3BA191E09BFF8689F70E)" Manufacturer =" Marcus Sonestedt" UpgradeCode =" 2e6a5032-2d70-4ecd-9af1-66c9a3ce4e4b" >
21- <Package InstallerVersion =" 200" InstallPrivileges =" elevated" InstallScope =" perMachine" Platform =" $(var.Platform)" Compressed =" yes" Description =" $(var.ProductName)" />
11+ <!-- Product name as you want it to appear in Add/Remove Programs-->
12+ <?if $(var.Platform) = x 64 ?>
13+ <?define ProductName = " $(var.InstallName) (64 bit)" ?>
14+ <?define Win 64 = " yes" ?>
15+ <?define PlatformProgramFilesFolder = " ProgramFiles64Folder" ?>
16+ <?else ?>
17+ <?define ProductName = " $(var.InstallName)" ?>
18+ <?define Win 64 = " no" ?>
19+ <?define PlatformProgramFilesFolder = " ProgramFilesFolder" ?>
20+ <?endif ?>
2221
23- <MajorUpgrade AllowDowngrades =" yes" Schedule =" afterInstallInitialize" />
24- <MediaTemplate EmbedCab =" yes" />
22+ <Product Id =" *" Name =" ServoPidControlSetup" Language =" 1033"
23+ Version =" !(bind.fileVersion.fil98E434A3D16D3BA191E09BFF8689F70E)" Manufacturer =" Marcus Sonestedt"
24+ UpgradeCode =" 2e6a5032-2d70-4ecd-9af1-66c9a3ce4e4b" >
25+ <Package InstallerVersion =" 200" InstallScope =" perMachine" Platform =" $(var.Platform)" InstallPrivileges =" elevated"
26+ Compressed =" yes" Description =" $(var.ProductName)" />
2527
26- <Property Id =" WIXUI_INSTALLDIR" Value =" INSTALLFOLDER" />
27- <UIRef Id =" WixUI_InstallDir" />
28+ <MajorUpgrade AllowDowngrades =" no" Schedule =" afterInstallInitialize"
29+ DowngradeErrorMessage =" Newer version detected. Uninstall first before downgrading."
30+ AllowSameVersionUpgrades =" yes" />
31+ <MediaTemplate EmbedCab =" yes" />
2832
29- <Property Id =" INSTALLLOCATION" >
30- <RegistrySearch Id =" RegistrySearch" Type =" raw" Root =" HKLM" Win64 =" $(var.Win64)" Key =" Software\Company\Product" Name =" InstallLocation" />
31- </Property >
33+ <WixVariable Id =" WixUILicenseRtf" Value =" gpl-3.0.rtf" />
3234
33- <Property Id =" ARPHELPLINK" Value =" https://github.com/marcusl/ArduinoServoPID" />
35+ <Property Id =" WIXUI_INSTALLDIR" Value =" INSTALLFOLDER" />
36+ <UIRef Id =" WixUI_InstallDir" />
3437
35- <Feature Id =" ProductFeature" Title =" ServoPidControlSetup" Level =" 1" >
36- <ComponentGroupRef Id =" ServoPidControl.Binaries" />
37- <ComponentGroupRef Id =" ServoPidControl.Content" />
38- <ComponentGroupRef Id =" ServoPidControl.Satellites" />
39- <Component Directory =' INSTALLLOCATION' >
40- <RegistryValue Root =' HKCU' Key =' SOFTWARE\ServoPidControl' Name =' InstallLocation' Value =' [INSTALLLOCATION]' Type =' string' />
41- <RemoveFolder Id =' CleanupApplicationFolder' On =' uninstall' />
42- </Component >
43- </Feature >
38+ <Property Id =" ARPHELPLINK" Value =" https://github.com/marcusl/ArduinoServoPID" />
4439
45- <!-- Not supported yet? https://github.com/wixtoolset/issues/issues/5575
46- <PropertyRef Id="NETFRAMEWORK471" />
47- <Condition Message="You must install Microsoft .NET 4.7.1">
48- <![CDATA[Installed OR NETFRAMEWORK471]]>
49- </Condition>
50- -->
51- <PropertyRef Id =" NETFRAMEWORK45" />
52- <Condition Message =" [ProductName] Requires .NET Framework 4.7.2 or later to be installed" >
53- <![CDATA[ Installed OR (NETFRAMEWORK45 AND NETFRAMEWORK45 >= "#461814")]]> <!-- see https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed -->
54- </Condition >
40+ <Feature Id =" ProductFeature" Title =" ServoPidControlSetup" Level =" 1" >
41+ <ComponentGroupRef Id =" ServoPidControl.Binaries" />
42+ <ComponentGroupRef Id =" ServoPidControl.Content" />
43+ <ComponentGroupRef Id =" ServoPidControl.Satellites" />
44+ <ComponentGroupRef Id =" ServoPidControl.Sources" />
45+
46+ <ComponentGroupRef Id =" GeneratedDependencies" />
5547
56- <InstallExecuteSequence >
57- <InstallExecute After =" RemoveExistingProducts" />
58- </InstallExecuteSequence >
59- </Product >
48+ <ComponentGroupRef Id =" ServoPid.Sources" />
49+ </Feature >
6050
61- <Fragment >
62- <Directory Id =" TARGETDIR" Name =" SourceDir" >
63- <Directory Id =" ProgramFilesFolder" >
64- <Directory Id =" INSTALLLOCATION" Name =" $(var.InstallName)" />
65- </Directory >
66- </Directory >
67- </Fragment >
68- </Wix >
51+ <!-- v4.7.2 not supported yet? https://github.com/wixtoolset/issues/issues/5575 -->
52+ <PropertyRef Id =" NETFRAMEWORK45" />
53+ <Condition Message =" [ProductName] Requires .NET Framework 4.7.2 or later to be installed" >
54+ <![CDATA[ Installed OR (NETFRAMEWORK45 AND NETFRAMEWORK45 >= "#461814")]]> <!-- see https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed -->
55+ </Condition >
56+
57+ <InstallExecuteSequence >
58+ <InstallExecute After =" RemoveExistingProducts" />
59+ </InstallExecuteSequence >
60+ </Product >
61+
62+ <Fragment >
63+ <Directory Id =" TARGETDIR" Name =" SourceDir" >
64+ <Directory Id =" ProgramFilesFolder" >
65+ <Directory Id =" INSTALLFOLDER" Name =" $(var.InstallName)" >
66+ <Directory Id =" SERVOPID" Name =" ServoPid" />
67+ <Directory Id =" SERVOPIDCONTROL" Name =" ServoPidControl" />
68+ </Directory >
69+ </Directory >
70+ </Directory >
71+ </Fragment >
72+
73+ <Fragment >
74+ <ComponentGroup Id =" ServoPid.Sources" >
75+ <Component Directory =" SERVOPID" >
76+ <File Source =" $(var.ServoPid_ProjectDir)/servopid.ino" />
77+ </Component >
78+ </ComponentGroup >
79+ </Fragment >
80+ </Wix >
0 commit comments