diff --git a/tools/local-install.bat b/tools/local-install.bat index 06663ad5bb..84b0d7c9bc 100644 --- a/tools/local-install.bat +++ b/tools/local-install.bat @@ -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