@@ -7,8 +7,7 @@ ECHO === Starting Installer Build Workaround ===
77REM Store current directory
88SET " current_path = %CD% "
99
10- REM Try all known editions of Visual Studio 2022
11- SET " vs_base_path = %ProgramFiles% \Microsoft Visual Studio\2022"
10+ SET " vs_base_path = %ProgramFiles% \Microsoft Visual Studio\18"
1211FOR %%E IN (Community Professional Enterprise) DO (
1312 IF EXIST " %vs_base_path% \%%E \Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\DisableOutOfProcBuild.exe" (
1413 SET " buildfix_path = %vs_base_path% \%%E \Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild"
@@ -18,11 +17,12 @@ FOR %%E IN (Community Professional Enterprise) DO (
1817 )
1918)
2019
21- ECHO [ERROR] Could not find DisableOutOfProcBuild.exe in any known VS2022 edition.
20+
21+ ECHO [ERROR] Could not find DisableOutOfProcBuild.exe in any known VS2026 edition.
2222EXIT /B 1
2323
2424:FoundEdition
25- ECHO Found Visual Studio 2022 Edition: %vs_edition%
25+ ECHO Found Visual Studio 2026 Edition: %vs_edition%
2626CD /D " %buildfix_path% "
2727CALL DisableOutOfProcBuild.exe
2828
@@ -52,18 +52,26 @@ IF %error% NEQ 0 (
5252
5353ECHO :
5454ECHO === Building Installer ===
55- " %devenv_path% " UnityLauncherPro.sln /Rebuild Release /Project UnityLauncherProInstaller > build_output.log 2 >& 1
56- SET " exitCode = %ERRORLEVEL% "
55+ ECHO Current dir: %CD%
5756
58- TYPE build_output.log
59- ECHO :
60- ECHO === devenv.exe exit code: %exitCode% ===
57+ IF NOT EXIST " UnityLauncherPro.sln" (
58+ ECHO [ERROR] Solution file not found: UnityLauncherPro.sln
59+ EXIT /B 1
60+ )
6161
62- IF NOT " %exitCode% " == " 0" (
63- ECHO [ERROR] Installer build failed. Check build_output.log for details.
64- EXIT /B %exitCode%
62+ SET " installer_project = UnityLauncherProInstaller\UnityLauncherProInstaller.vdproj"
63+
64+ IF NOT EXIST " %installer_project% " (
65+ ECHO [ERROR] Installer project not found: %installer_project%
66+ EXIT /B 1
6567)
6668
69+ ECHO Running:
70+ ECHO " %devenv_path% " " UnityLauncherPro.sln" /Rebuild " Release" /Project " %installer_project% "
71+
72+ " %devenv_path% " " UnityLauncherPro.sln" /Rebuild " Release" /Project " %installer_project% " > build_output.log 2 >& 1
73+ SET " exitCode = %ERRORLEVEL% "
74+
6775
6876ECHO :
6977ECHO === Build Complete ===
0 commit comments