Skip to content

Commit

Permalink
[CI:DOCS] Installer: use latest wix in windows installer
Browse files Browse the repository at this point in the history
Replace choco with dotnet for wix installation as choco doesn't have
anything newer than v3.14.
Ref: https://community.chocolatey.org/packages/wixtoolset

Use wildcard in place of wix version in contrib/win-installer/build.ps1.
Ref: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_wildcards?view=powershell-7.4

Resolves: RUN-2055

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
  • Loading branch information
lsm5 committed Apr 30, 2024
1 parent a521f08 commit 25ffb0e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/upload-win-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
- name: Dry Run Status
run: |
Write-Output "::notice::This workflow execution will be a dry-run: ${{ steps.actual_dryrun.outputs.dryrun }}"
- name: Install Wix
run: dotnet tool install --global wix
- name: Determine version
id: getversion
run: |
Expand Down
17 changes: 16 additions & 1 deletion contrib/win-installer/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ 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"
CheckCommand "candle" "WiX Toolset"
Expand Down Expand Up @@ -98,8 +111,10 @@ 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 v3.14\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin;;C:\Program Files\Go\bin"
$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"

CheckRequirements

Expand Down

0 comments on commit 25ffb0e

Please sign in to comment.