Skip to content

Commit

Permalink
Configure VS with required components before building
Browse files Browse the repository at this point in the history
  • Loading branch information
robmen committed Dec 14, 2021
1 parent 72b024f commit 9cc754f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Confgure Visual Studio
shell: cmd
run: ./src/vs_config.cmd

- name: Build wix4
shell: cmd
run: ./src/build_official.cmd
Expand Down
11 changes: 11 additions & 0 deletions src/vs_config.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@echo off
setlocal enabledelayedexpansion

echo Configuring Visual Studio to build WiX Toolset...

for /f "usebackq tokens=*" %%i in (`"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do (
echo Visual Studio installed at: "%%i"
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --config "%~dp0wix.vsconfig" --installPath "%%i" --quiet --norestart --force
echo Configuration complete, exit code: !errorlevel!
exit /b !errorlevel!
)
6 changes: 6 additions & 0 deletions src/wix.vsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"version": "1.0",
"components": [
"Microsoft.Net.Component.4.7.2.TargetingPack"
]
}

0 comments on commit 9cc754f

Please sign in to comment.