Fix installer script structure

This commit is contained in:
Manuel Thalmann 2024-08-01 23:34:35 +02:00
parent 34108f78d8
commit 1c29cdd89c
2 changed files with 52 additions and 43 deletions
scripts/Windows/Software/winget

View file

@ -1,9 +1,19 @@
param(
[string] $Action = ([InstallerAction]::Install),
$Action,
[hashtable] $Arguments
)
. "$PSScriptRoot/../../Scripts/Software.ps1";
. "$PSScriptRoot/../../Types/InstallerAction.ps1";
function Install-Winget {
param(
[InstallerAction] $Action = [InstallerAction]::Install,
[hashtable] $Arguments
)
Start-SoftwareInstaller -Action $Action -Arguments $Arguments;
}
function Install-Software {
$xamlDownloadLink = "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx";
@ -17,4 +27,4 @@ function Install-Software {
Remove-Item $file;
}
Start-SoftwareInstaller -Action $Action -Arguments $Arguments;
Install-Winget @PSBoundParameters;