chore: 调整 global.json 文件创建时机

[skip changelog]
This commit is contained in:
uye
2026-05-06 00:37:18 +08:00
parent be568fbc1e
commit 1d60c2363b

View File

@@ -3,6 +3,13 @@ setlocal
pushd "%~dp0.." || exit /b 1
if exist ".\global.json" (
echo global.json already exists, backing it up temporarily
move /y ".\global.json" ".\global.json.local-install.bak" >nul || goto :error
)
> ".\global.json" echo {"sdk":{"version":"10.0.203","rollForward":"disable"}} || goto :error
set "netbeauty_bin=%NUGET_PACKAGES%\nulastudio.netbeauty\2.1.5\tools\win-x86\nbeauty2.exe"
if "%NUGET_PACKAGES%"=="" set "netbeauty_bin=%USERPROFILE%\.nuget\packages\nulastudio.netbeauty\2.1.5\tools\win-x86\nbeauty2.exe"
@@ -15,13 +22,6 @@ cmake --build build --config RelWithDebInfo --parallel %NUMBER_OF_PROCESSORS% ||
cmake --build build --target MAA.Updater --config RelWithDebInfo || goto :error
cmake --install build --config RelWithDebInfo --prefix install || goto :error
if exist ".\global.json" (
echo global.json already exists, backing it up temporarily
move /y ".\global.json" ".\global.json.local-install.bak" >nul || goto :error
)
> ".\global.json" echo {"sdk":{"version":"10.0.203","rollForward":"disable"}} || goto :error
dotnet restore src/MaaWpfGui/MaaWpfGui.csproj || goto :error
dotnet publish src/MaaWpfGui/MaaWpfGui.csproj -c Release -r win-x64 -o install /p:DisableBeauty=True || goto :error