Skip to content

Commit 94cf753

Browse files
committed
test upgrading workflows to 2026 #GITBUILD
1 parent 7b1778c commit 94cf753

3 files changed

Lines changed: 41 additions & 15 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
build:
1515
permissions:
1616
contents: write
17-
runs-on: windows-2022
17+
runs-on: windows-latest
1818

1919
# Steps represent a sequence of tasks that will be executed as part of the job
2020
steps:
@@ -137,22 +137,30 @@ jobs:
137137
Get-Content $proj
138138
Write-Host "=== END .vdproj CONTENT ==="
139139
140-
# locate VS 2022
141-
- name: Locate Visual Studio 2022
140+
# locate VS 2026
141+
- name: Locate Visual Studio 2026
142142
id: vswhere
143143
shell: pwsh
144144
run: |
145-
$installPath = vswhere -latest -products * -requires Microsoft.Component.MSBuild `
146-
-property installationPath
147-
if (-not $installPath) { throw 'VS 2022 not found' }
145+
$installPath = vswhere -latest -products * -version "[18.0,19.0)" `
146+
-requires Microsoft.Component.MSBuild -property installationPath
147+
if (-not $installPath) {
148+
throw 'VS 2026 (major 18) not found'
149+
}
148150
"installPath=$installPath" >> $env:GITHUB_OUTPUT
149151
150152
# download vs installer builder (v2.0.1)
151153
- name: Download Installer-Projects VSIX
152154
shell: pwsh
153155
run: |
154-
$vsixUrl = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2022InstallerProjects/2.0.1/vspackage"
155-
Invoke-WebRequest $vsixUrl -OutFile installerprojects.vsix
156+
$vsixUrl = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2026InstallerProjects/2.0.1/vspackage"
157+
$fallbackUrl = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2022InstallerProjects/2.0.1/vspackage"
158+
try {
159+
Invoke-WebRequest $vsixUrl -OutFile installerprojects.vsix -ErrorAction Stop
160+
} catch {
161+
Write-Host "VS2026 Installer Projects package not found, falling back to VS2022 feed."
162+
Invoke-WebRequest $fallbackUrl -OutFile installerprojects.vsix -ErrorAction Stop
163+
}
156164
157165
# install vs installer builder
158166
- name: Install Installer-Projects extension
@@ -162,7 +170,7 @@ jobs:
162170
Write-Host "Running: $vsixInstaller installerprojects.vsix /quiet"
163171
& $vsixInstaller installerprojects.vsix /quiet
164172
165-
# Build MSI installer project using Visual Studio 2022 workaround
173+
# Build MSI installer project using Visual Studio 2026 workaround
166174
- name: Build Installer MSI
167175
if: env.build_trigger == 'true'
168176
shell: cmd

‎Build.cmd‎

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
@echo off
22

33
REM Default VS paths to check if no Paths.cmd file exists
4-
set VISUAL_STUDIO_PATH_0="%programfiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\msbuild.exe"
5-
set VISUAL_STUDIO_PATH_1="%programfiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\msbuild.exe"
6-
set VISUAL_STUDIO_PATH_2="%programfiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe"
7-
set VISUAL_STUDIO_PATH_3="%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe"
4+
set VISUAL_STUDIO_PATH_0="%programfiles%\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\msbuild.exe"
5+
set VISUAL_STUDIO_PATH_1="%programfiles%\Microsoft Visual Studio\18\Professional\MSBuild\Current\Bin\msbuild.exe"
6+
set VISUAL_STUDIO_PATH_2="%programfiles%\Microsoft Visual Studio\18\Enterprise\MSBuild\Current\Bin\msbuild.exe"
7+
set VISUAL_STUDIO_PATH_3="%programfiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\msbuild.exe"
8+
set VISUAL_STUDIO_PATH_4="%programfiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\msbuild.exe"
9+
set VISUAL_STUDIO_PATH_5="%programfiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe"
10+
set VISUAL_STUDIO_PATH_6="%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe"
811

912
pushd "%~dp0"
1013
if exist Debug rd /s /q Debug
@@ -37,6 +40,21 @@ set VISUAL_STUDIO_PATH=%VISUAL_STUDIO_PATH_3%
3740
goto build
3841
)
3942

43+
if exist %VISUAL_STUDIO_PATH_4% (
44+
set VISUAL_STUDIO_PATH=%VISUAL_STUDIO_PATH_4%
45+
goto build
46+
)
47+
48+
if exist %VISUAL_STUDIO_PATH_5% (
49+
set VISUAL_STUDIO_PATH=%VISUAL_STUDIO_PATH_5%
50+
goto build
51+
)
52+
53+
if exist %VISUAL_STUDIO_PATH_6% (
54+
set VISUAL_STUDIO_PATH=%VISUAL_STUDIO_PATH_6%
55+
goto build
56+
)
57+
4058
REM No default path found. Let the user know what to do.
4159
echo No Visual Studio installation found. Please configure it manually.
4260
echo 1. Copy 'Paths.cmd.template'.

‎UnityLauncherPro.sln‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.13.35931.197
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.0.00000.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityLauncherPro", "UnityLauncherPro\UnityLauncherPro.csproj", "{EC78D91A-3E63-4CAA-8BC3-9673A30FDA45}"
77
EndProject

0 commit comments

Comments
 (0)