Upgraded the wix installed to use Wix 7

This commit is contained in:
2026-10-29 12:36:27 +00:00
parent e2b7fbc875
commit 8ef4a0fced
8 changed files with 86 additions and 142 deletions
+2 -3
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?include $(sys.CURRENTDIR)\Config.wxi?> <?include $(sys.CURRENTDIR)\Config.wxi?>
<!-- <!--
ASCOM Focuser Driver with COM registry entries suitable for a LocalServer Served Class ASCOM Focuser Driver with COM registry entries suitable for a LocalServer Served Class
@@ -10,8 +10,7 @@
<ComponentGroup Id="cgAscomFocuserDriver"> <ComponentGroup Id="cgAscomFocuserDriver">
<Component Id="cmpAscomFocuserDriver" <Component Id="cmpAscomFocuserDriver"
Directory="INSTALLFOLDER" Directory="INSTALLFOLDER"
Guid="*" Guid="*">
Win64="no">
<File Id="filFocuserDriverAssembly" <File Id="filFocuserDriverAssembly"
Source="$(var.Meade.net.focuser.TargetPath)" Source="$(var.Meade.net.focuser.TargetPath)"
KeyPath="yes" KeyPath="yes"
+4 -8
View File
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?include $(sys.CURRENTDIR)\Config.wxi?> <?include $(sys.CURRENTDIR)\Config.wxi?>
<Fragment> <Fragment>
<DirectoryRef Id="INSTALLFOLDER"/> <DirectoryRef Id="INSTALLFOLDER"/>
<ComponentGroup Id="cgAscomLocalServer" Directory="INSTALLFOLDER"> <ComponentGroup Id="cgAscomLocalServer" Directory="INSTALLFOLDER">
<Component Id="cmpAscomLocalServer" Guid="*" Win64="no"> <Component Id="cmpAscomLocalServer" Guid="*">
<File Id="filLocalServerAssembly" <File Id="filLocalServerAssembly"
Source="$(var.Meade.net.TargetPath)" Source="$(var.Meade.net.TargetPath)"
KeyPath="yes" KeyPath="yes"
@@ -31,12 +31,8 @@
/> />
<InstallExecuteSequence> <InstallExecuteSequence>
<Custom Action='RegisterEXE' Before="InstallFinalize"> <Custom Action="RegisterEXE" Before="InstallFinalize" Condition="NOT Installed" />
<![CDATA[(NOT Installed)]]> <Custom Action="UnRegisterEXE" After="InstallInitialize" Condition="REMOVE ~= &quot;ALL&quot; AND NOT UPGRADINGPRODUCTCODE" />
</Custom>
<Custom Action="UnRegisterEXE" After="InstallInitialize">
<![CDATA[(REMOVE ~= "ALL" AND NOT UPGRADINGPRODUCTCODE)]]>
</Custom>
</InstallExecuteSequence> </InstallExecuteSequence>
</Fragment> </Fragment>
</Wix> </Wix>
+2 -3
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?include $(sys.CURRENTDIR)\Config.wxi?> <?include $(sys.CURRENTDIR)\Config.wxi?>
<!-- <!--
ASCOM Telescope Driver with COM registry entries suitable for a LocalServer Served Class ASCOM Telescope Driver with COM registry entries suitable for a LocalServer Served Class
@@ -10,8 +10,7 @@
<ComponentGroup Id="cgAscomTelescopeDriver"> <ComponentGroup Id="cgAscomTelescopeDriver">
<Component Id="cmpAscomTelescopeDriver" <Component Id="cmpAscomTelescopeDriver"
Directory="INSTALLFOLDER" Directory="INSTALLFOLDER"
Guid="*" Guid="*">
Win64="no">
<File Id="filTelescopeDriverAssembly" <File Id="filTelescopeDriverAssembly"
Source="$(var.Meade.net.Telescope.TargetPath)" Source="$(var.Meade.net.Telescope.TargetPath)"
KeyPath="yes" KeyPath="yes"
+5 -7
View File
@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?include $(sys.CURRENTDIR)\Config.wxi?> <?include $(sys.CURRENTDIR)\Config.wxi?>
<Fragment> <Fragment>
<Directory Id="TARGETDIR" Name="SourceDir"> <StandardDirectory Id="ProgramFilesFolder">
<Directory Id="ProgramFilesFolder"> <Directory Id="dirManufacturer" Name="$(var.Manufacturer)">
<Directory Id="dirManufacturer" Name="$(var.Manufacturer)"> <Directory Id="INSTALLFOLDER" Name="$(var.InstallName)"/>
<Directory Id="INSTALLFOLDER" Name="$(var.InstallName)"/>
</Directory>
</Directory> </Directory>
</Directory> </StandardDirectory>
</Fragment> </Fragment>
</Wix> </Wix>
+2 -2
View File
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" > <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" >
<?include $(sys.CURRENTDIR)\Config.wxi?> <?include $(sys.CURRENTDIR)\Config.wxi?>
<Fragment> <Fragment>
<FeatureGroup Id="fgRoot" > <FeatureGroup Id="fgRoot" >
<Feature Id="featAscomDrivers" Title="ASCOM drivers" Level="1" Absent="disallow" <Feature Id="featAscomDrivers" Title="ASCOM drivers" Level="1"
Display="expand" > Display="expand" >
<ComponentGroupRef Id="cgAscomLocalServer" /> <ComponentGroupRef Id="cgAscomLocalServer" />
<ComponentGroupRef Id="cgAscomTelescopeDriver"/> <ComponentGroupRef Id="cgAscomTelescopeDriver"/>
+20 -22
View File
@@ -23,7 +23,7 @@ Patch dialog sequence:
--> -->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment> <Fragment>
<UI Id="InstallationUI"> <UI Id="InstallationUI">
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" /> <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
@@ -44,34 +44,32 @@ Patch dialog sequence:
<DialogRef Id="ResumeDlg" /> <DialogRef Id="ResumeDlg" />
<DialogRef Id="UserExit" /> <DialogRef Id="UserExit" />
<Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish> <Publish Dialog="BrowseDlg" Control="OK" Event="SetTargetPath" Value="[_BrowseProperty]" Order="1" Condition="1" />
<Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish> <Publish Dialog="BrowseDlg" Control="OK" Event="EndDialog" Value="Return" Order="2" Condition="1" />
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish> <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" Condition="1" />
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed</Publish> <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg" Condition="NOT Installed" />
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish> <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="Installed AND PATCH" />
<Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish> <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Condition="1" />
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAccepted = "1"</Publish> <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Condition="LicenseAccepted = &quot;1&quot;" />
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish> <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" Condition="1" />
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish> <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" Condition="1" />
<Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish> <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="2" Condition="1" />
<Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish> <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1" Condition="1" />
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish> <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2" Condition="1" />
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1">NOT Installed</Publish> <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1" Condition="NOT Installed" />
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish> <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" />
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish> <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2" Condition="Installed AND PATCH" />
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish> <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg" Condition="1" />
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish> <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg" Condition="1" />
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish> <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg" Condition="1" />
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish> <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg" Condition="1" />
<Property Id="ARPNOMODIFY" Value="1" /> <Property Id="ARPNOMODIFY" Value="1" />
</UI> </UI>
+8 -57
View File
@@ -1,55 +1,19 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project Sdk="WixToolset.Sdk/7.0.0">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>8eeb5c25-8394-4257-8e57-cded47cb6f1b</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Meade.net.Setup</OutputName>
<OutputType>Package</OutputType> <OutputType>Package</OutputType>
<Platform Condition="'$(Platform)' == ''">x86</Platform>
<OutputName>Meade.net.Setup</OutputName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants> <DefineConstants>Debug</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DefineConstants>Debug</DefineConstants>
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="AscomLocalServer.wxs" /> <PackageReference Include="WixToolset.UI.wixext" Version="7.0.0" />
<Compile Include="AscomTelescopeDriver.wxs" />
<Compile Include="AscomFocuserDriver.wxs" />
<Compile Include="Directories.wxs" />
<Compile Include="FeatureTree.wxs" />
<Compile Include="InstallationUI.wxs" />
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
<WixExtension Include="WixNetFxExtension">
<HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
<Name>WixNetFxExtension</Name>
</WixExtension>
</ItemGroup>
<ItemGroup>
<Content Include="Config.wxi" />
<Content Include="License.rtf" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Meade.net.focuser\Meade.net.focuser.csproj"> <ProjectReference Include="..\Meade.net.focuser\Meade.net.focuser.csproj">
<Name>Meade.net.focuser</Name> <Name>Meade.net.focuser</Name>
@@ -76,17 +40,4 @@
<RefTargetDir>INSTALLFOLDER</RefTargetDir> <RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project> </Project>
+41 -38
View File
@@ -1,48 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?include $(sys.CURRENTDIR)\Config.wxi?> <?include $(sys.CURRENTDIR)\Config.wxi?>
<Product Id="*" <Package Name="$(var.InstallName)"
Name="$(var.InstallName)" Language="1033"
Language="1033" Version="$(var.ProductVersion)"
Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)"
Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)"
UpgradeCode="$(var.UpgradeCode)"> InstallerVersion="200"
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> Compressed="yes"
Scope="perMachine">
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <MediaTemplate EmbedCab="yes" />
<MediaTemplate EmbedCab="yes" /> <Property Id="ASCOMPLATFORMVERSION">
<RegistrySearch Id="AscomPlatformVersion"
Root="HKLM"
Key="SOFTWARE\ASCOM\Platform"
Name="Platform Version"
Type="raw" />
</Property>
<Property Id="ASCOMPLATFORMVERSION"> <Launch Condition="Installed OR ASCOMPLATFORMVERSION >= &quot;6.6.0&quot;"
<RegistrySearch Id="AscomPlatformVersion" Message="This application requires Ascom Platform 6.6.0 or higher. Please install this before installing the driver." />
Root="HKLM"
Key="SOFTWARE\ASCOM\Platform"
Name="Platform Version"
Type="raw" />
</Property>
<Condition Message="This application requires Ascom Platform 6.6.0 or higher. Please install this before installing the driver."> <Property Id="NETFRAMEWORK48RELEASE">
<![CDATA[Installed OR ASCOMPLATFORMVERSION >= "6.6.0"]]> <RegistrySearch Id="NetFramework48Release"
</Condition> Root="HKLM"
Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
Name="Release"
Type="raw" />
</Property>
<Launch Condition="Installed OR (NETFRAMEWORK48RELEASE >= &quot;#528040&quot;)"
Message="This application requires .NET Framework 4.8 or higher. Please install the .NET Framework then run this installer again." />
<PropertyRef Id='WIXNETFX4RELEASEINSTALLED'/> <!-- <Condition Message="Please use the correct installer for your operating system - x86 for 32-bit, x64 for 64-bit.">
<Condition Message="This application requires .NET Framework 4.8 or higher. Please install the .NET Framework then run this installer again."> <?if $(var.Win64) = "yes" ?>
<![CDATA[Installed OR (WIXNETFX4RELEASEINSTALLED >= "#528040")]]> VersionNT64
</Condition> <?else?>
NOT VersionNT64
<?endif?>
</Condition> -->
<!-- <Condition Message="Please use the correct installer for your operating system - x86 for 32-bit, x64 for 64-bit."> <UIRef Id="InstallationUI"/>
<?if $(var.Win64) = "yes" ?> <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
VersionNT64 <WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
<?else?>
NOT VersionNT64
<?endif?>
</Condition> -->
<FeatureGroupRef Id="fgRoot"/>
<UIRef Id="InstallationUI"/> </Package>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
<FeatureGroupRef Id="fgRoot"/>
</Product>
</Wix> </Wix>