Skip to content

Commit

Permalink
fetch path for winget and install dotnet,wix
Browse files Browse the repository at this point in the history
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
  • Loading branch information
lsm5 committed Apr 22, 2024
1 parent 302497d commit 3b74b3a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions contrib/win-installer/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,21 @@ function CheckCommand() {
}
}

function InstallWiX() {
Set-ExecutionPolicy -ExecutionPolicy Bypass -Force
$ResolveWingetPath = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__*"
if ($ResolveWingetPath){
$WingetPath = $ResolveWingetPath[-1].Path
}
$config
cd $WingetPath
cmd.exe /c "winget.exe upgrade microsoft.teams --accept-package-agreements --accept-source-agreements --silent --force"
winget.exe install Microsoft.DotNet.SFK.8
&dotnet tool install --global wix
}

function CheckRequirements() {
CheckCommand "gcc" "MingW CC"
&winget install Microsoft.DotNet.SDK.8
&dotnet tool install --global wix
CheckCommand "candle" "WiX Toolset"
CheckCommand "go" "Golang"
}
Expand Down Expand Up @@ -100,6 +111,8 @@ if ($args.Count -lt 1 -or $args[0].Length -lt 1) {
Exit 1
}

InstallWiX

# Pre-set to standard locations in-case build env does not refresh paths
$Env:Path="$Env:Path;C:\Program Files (x86)\WiX Toolset *\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin;;C:\Program Files\Go\bin"

Expand Down

0 comments on commit 3b74b3a

Please sign in to comment.