Skip to content

Commit

Permalink
Merge pull request #891 from dorssel/wix5
Browse files Browse the repository at this point in the history
Update WiX v4 -> v5
  • Loading branch information
dorssel committed Apr 6, 2024
2 parents d737f6b + 2516d0a commit 7960e15
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 81 deletions.
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ SPDX-License-Identifier: GPL-3.0-only
<!-- Usbipd.PowerShell -->
<PackageVersion Include="PowerShellStandard.Library" Version="5.1.1" />
<!-- Installer -->
<PackageVersion Include="WixToolset.Firewall.wixext" Version="4.0.5" />
<PackageVersion Include="WixToolset.UI.wixext" Version="4.0.5" />
<PackageVersion Include="WixToolset.Util.wixext" Version="4.0.5" />
<PackageVersion Include="WixToolset.Firewall.wixext" Version="5.0.0" />
<PackageVersion Include="WixToolset.UI.wixext" Version="5.0.0" />
<PackageVersion Include="WixToolset.Util.wixext" Version="5.0.0" />
<!-- UnitTests -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="Moq" Version="4.20.70" />
Expand Down
49 changes: 16 additions & 33 deletions Installer/Drivers.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,22 @@ SPDX-License-Identifier: GPL-3.0-only
xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"
>
<Fragment>
<DirectoryRef Id="APPLICATIONFOLDER">
<Directory Id="Drivers" Name="Drivers" FileSource="$(var.DriversDir)">
<Component Id="Drivers_README.md">
<File Id="Drivers_README.md" Name="README.md" />
</Component>
<Component Id="VBoxUSB.cat">
<File Id="VBoxUSB.cat" Name="VBoxUSB.cat" />
</Component>
<Component Id="VBoxUSB.sys" Bitness="always64">
<File Id="VBoxUSB.sys" Name="VBoxUSB.sys" />
</Component>
<Component Id="VBoxUSB.inf">
<File Id="VBoxUSB.inf" Name="VBoxUSB.inf" />
</Component>
<Component Id="VBoxUSBMon.sys" Bitness="always64">
<File Id="VBoxUSBMon.sys" Name="VBoxUSBMon.sys" />
<util:EventSource
Name="VBoxUSBMon"
Log="System"
EventMessageFile="%SystemRoot%\System32\IoLogMsg.dll"
SupportsInformationals="true"
SupportsWarnings="true"
SupportsErrors="true"
/>
</Component>
</Directory>
</DirectoryRef>
<ComponentGroup Id="Drivers">
<ComponentRef Id="Drivers_README.md" />
<ComponentRef Id="VBoxUSB.cat" />
<ComponentRef Id="VBoxUSB.sys" />
<ComponentRef Id="VBoxUSB.inf" />
<ComponentRef Id="VBoxUSBMon.sys" />
<ComponentGroup Id="Drivers" Directory="APPLICATIONFOLDER" Subdirectory="Drivers" Source="$(var.DriversDir)">
<File Id="Drivers_README.md" Name="README.md" />
<File Id="VBoxUSB.cat" Name="VBoxUSB.cat" />
<File Id="VBoxUSB.sys" Name="VBoxUSB.sys" />
<File Id="VBoxUSB.inf" Name="VBoxUSB.inf" />
<Component Id="VBoxUSBMon.sys">
<File Id="VBoxUSBMon.sys" Name="VBoxUSBMon.sys" />
<util:EventSource
Name="VBoxUSBMon"
Log="System"
EventMessageFile="%SystemRoot%\System32\IoLogMsg.dll"
SupportsInformationals="true"
SupportsWarnings="true"
SupportsErrors="true"
/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
17 changes: 1 addition & 16 deletions Installer/PowerShell.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,9 @@ SPDX-License-Identifier: GPL-3.0-only
-->
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<DirectoryRef Id="APPLICATIONFOLDER">
<Directory Id="PowerShell" Name="PowerShell" />
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="PowerShell" FileSource="$(PowerShellDir)">
<Component Id="Usbipd.Automation.dll">
<ComponentGroup Id="PowerShell" Directory="APPLICATIONFOLDER" Subdirectory="PowerShell" Source="$(PowerShellDir)">
<File Id="Usbipd.Automation.dll" Name="Usbipd.Automation.dll" />
</Component>
<Component Id="Usbipd.PowerShell.dll">
<File Id="Usbipd.PowerShell.dll" Name="Usbipd.PowerShell.dll" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="PowerShell">
<ComponentRef Id="Usbipd.Automation.dll" />
<ComponentRef Id="Usbipd.PowerShell.dll" />
</ComponentGroup>
</Fragment>
</Wix>
7 changes: 3 additions & 4 deletions Installer/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ SPDX-License-Identifier: GPL-3.0-only
This being a small product, a MajorUpgrade is a small price to pay to prevent any mishaps.
Since we strictly follow component rules, we use afterInstallExecute to speed things up a bit.
-->
<MajorUpgrade
Schedule="afterInstallExecute"
DowngradeErrorMessage="A newer version of [ProductName] is already installed."
/>
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallExecute" />
</InstallExecuteSequence>

<Property Id="ARPURLINFOABOUT" Value="https://github.com/dorssel/usbipd-win" />
<Property Id="ARPURLUPDATEINFO" Value="https://github.com/dorssel/usbipd-win/releases" />
Expand Down
29 changes: 5 additions & 24 deletions Installer/WSL.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,11 @@ SPDX-License-Identifier: GPL-3.0-only
-->
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<DirectoryRef Id="APPLICATIONFOLDER">
<!-- Windows uses uppercase spelling for folders related to WSL (and lowercase for files). -->
<Directory Id="WSL" Name="WSL" />
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="WSL" FileSource="$(var.PublishDir)\WSL">
<Component Id="WSL_README.md">
<File Id="WSL_README.md" Name="README.md" />
</Component>
<Component Id="usbip">
<File Id="usbip" Name="usbip" />
</Component>
<Component Id="auto_attach.sh">
<File Id="auto_attach.sh" Name="auto-attach.sh" />
</Component>
</DirectoryRef>
<ComponentGroup Id="WSL" Directory="APPLICATIONFOLDER" Subdirectory="WSL" Source="$(var.PublishDir)\WSL">
<File Id="WSL_README.md" Name="README.md" />
<File Id="usbip" Name="usbip" />
<File Id="auto_attach.sh" Name="auto-attach.sh" />
</ComponentGroup>

<!--
This directory gets mounted within WSL, and Linux should not treat ordinary files as executable.
Expand Down Expand Up @@ -55,11 +43,4 @@ SPDX-License-Identifier: GPL-3.0-only
<Custom Action="FixExecutionRights_WSL_README.md" After="InstallFiles" Condition="$WSL_README.md=3" />
</InstallExecuteSequence>
</Fragment>
<Fragment>
<ComponentGroup Id="WSL">
<ComponentRef Id="WSL_README.md" />
<ComponentRef Id="usbip" />
<ComponentRef Id="auto_attach.sh" />
</ComponentGroup>
</Fragment>
</Wix>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"rollForward": "latestFeature"
},
"msbuild-sdks": {
"WixToolset.Sdk": "4.0.5"
"WixToolset.Sdk": "5.0.0"
}
}

0 comments on commit 7960e15

Please sign in to comment.