for Windows build script, inline the cleanup procedure and deprecate the separate/dedicated cleanup script

This commit is contained in:
otavepto 2023-12-24 23:26:54 +02:00
parent fb44c1f964
commit 13bc94ad75
2 changed files with 19 additions and 27 deletions

View File

@ -247,7 +247,7 @@ mkdir "%lobby_connect_dir%"
setlocal setlocal
echo // cleaning up to build 32 echo // cleaning up to build 32
call build_win_clean.bat call :cleanup
mkdir "%build_temp_dir%" mkdir "%build_temp_dir%"
call build_win_set_env.bat 32 || ( call build_win_set_env.bat 32 || (
@ -324,7 +324,7 @@ timeout /nobreak /t 5
setlocal setlocal
echo // cleaning up to build 64 echo // cleaning up to build 64
call build_win_clean.bat call :cleanup
mkdir "%build_temp_dir%" mkdir "%build_temp_dir%"
call build_win_set_env.bat 64 || ( call build_win_set_env.bat 64 || (
@ -389,10 +389,7 @@ echo: & echo:
:: cleanup :: cleanup
echo // cleaning up echo // cleaning up
call build_win_clean.bat call :cleanup
for %%A in ("ilk" "lib" "exp") do (
del /f /s /q "%build_root_dir%\*.%%~A" >nul 2>&1
)
echo: & echo: echo: & echo:
@ -477,6 +474,22 @@ exit /b
exit /b 1 exit /b 1
:cleanup
del /f /q *.exp >nul 2>&1
del /f /q *.lib >nul 2>&1
del /f /q *.a >nul 2>&1
del /f /q *.obj >nul 2>&1
del /f /q *.pdb >nul 2>&1
del /f /q *.ilk >nul 2>&1
del /f /q dll\net.pb.cc >nul 2>&1
del /f /q dll\net.pb.h >nul 2>&1
rmdir /s /q "%build_temp_dir%" >nul 2>&1
for %%A in ("ilk" "lib" "exp") do (
del /f /s /q "%build_root_dir%\*.%%~A" >nul 2>&1
)
exit /b
:end_script :end_script
echo: echo:
if %last_code% equ 0 ( if %last_code% equ 0 (

View File

@ -1,21 +0,0 @@
@echo off
setlocal
pushd "%~dp0"
if /i "%~1"=="clean" (
rmdir /s /q "build-win" >nul 2>&1
)
del /f /q *.exp >nul 2>&1
del /f /q *.lib >nul 2>&1
del /f /q *.a >nul 2>&1
del /f /q *.obj >nul 2>&1
del /f /q *.pdb >nul 2>&1
del /f /q *.ilk >nul 2>&1
del /f /q dll\net.pb.cc >nul 2>&1
del /f /q dll\net.pb.h >nul 2>&1
rmdir /s /q "build-win-temp" >nul 2>&1
endlocal
popd