don't cleanup protoc generated files, because VScode gets confused and cannot find files/types

This commit is contained in:
otavepto 2023-12-29 08:42:18 +02:00
parent f6bb934c1e
commit e326c1d556
2 changed files with 8 additions and 6 deletions

View File

@ -373,7 +373,6 @@ function build_for () {
function cleanup () { function cleanup () {
rm -f -r "$build_temp_dir" rm -f -r "$build_temp_dir"
rm -f -r "$protoc_out_dir"
} }
if [[ "$CLEAN_BUILD" = "1" ]]; then if [[ "$CLEAN_BUILD" = "1" ]]; then
@ -393,9 +392,10 @@ fi
### x32 build ### x32 build
cleanup cleanup
mkdir -p "$protoc_out_dir"
echo // invoking protobuf compiler - 32 echo // invoking protobuf compiler - 32
rm -f -r "$protoc_out_dir"
mkdir -p "$protoc_out_dir"
"$protoc_exe_32" ./dll/*.proto -I./dll/ --cpp_out="$protoc_out_dir/" "$protoc_exe_32" ./dll/*.proto -I./dll/ --cpp_out="$protoc_out_dir/"
last_code=$((last_code + $?)) last_code=$((last_code + $?))
echo; echo; echo; echo;
@ -450,9 +450,10 @@ fi
### x64 build ### x64 build
cleanup cleanup
mkdir -p "$protoc_out_dir"
echo // invoking protobuf compiler - 64 echo // invoking protobuf compiler - 64
rm -f -r "$protoc_out_dir"
mkdir -p "$protoc_out_dir"
"$protoc_exe_64" ./dll/*.proto -I./dll/ --cpp_out="$protoc_out_dir/" "$protoc_exe_64" ./dll/*.proto -I./dll/ --cpp_out="$protoc_out_dir/"
last_code=$((last_code + $?)) last_code=$((last_code + $?))
echo; echo; echo; echo;

View File

@ -243,7 +243,6 @@ setlocal
echo // cleaning up to build 32 echo // cleaning up to build 32
call :cleanup call :cleanup
mkdir "%protoc_out_dir%"
call build_win_set_env.bat 32 || ( call build_win_set_env.bat 32 || (
endlocal endlocal
@ -253,6 +252,8 @@ call build_win_set_env.bat 32 || (
) )
echo // invoking protobuf compiler - 32 echo // invoking protobuf compiler - 32
rmdir /s /q "%protoc_out_dir%" >nul 2>&1
mkdir "%protoc_out_dir%"
"%protoc_exe_32%" .\dll\net.proto -I.\dll\ --cpp_out="%protoc_out_dir%\\" || ( "%protoc_exe_32%" .\dll\net.proto -I.\dll\ --cpp_out="%protoc_out_dir%\\" || (
endlocal endlocal
call :err_msg "Protobuf compiler failed - 32" call :err_msg "Protobuf compiler failed - 32"
@ -365,7 +366,6 @@ setlocal
echo // cleaning up to build 64 echo // cleaning up to build 64
call :cleanup call :cleanup
mkdir "%protoc_out_dir%"
call build_win_set_env.bat 64 || ( call build_win_set_env.bat 64 || (
endlocal endlocal
@ -375,6 +375,8 @@ call build_win_set_env.bat 64 || (
) )
echo // invoking protobuf compiler - 64 echo // invoking protobuf compiler - 64
rmdir /s /q "%protoc_out_dir%" >nul 2>&1
mkdir "%protoc_out_dir%"
"%protoc_exe_64%" .\dll\net.proto -I.\dll\ --cpp_out="%protoc_out_dir%\\" || ( "%protoc_exe_64%" .\dll\net.proto -I.\dll\ --cpp_out="%protoc_out_dir%\\" || (
endlocal endlocal
call :err_msg "Protobuf compiler failed - 64" call :err_msg "Protobuf compiler failed - 64"
@ -734,7 +736,6 @@ endlocal & exit /b %_exit%
del /f /q *.pdb >nul 2>&1 del /f /q *.pdb >nul 2>&1
del /f /q *.ilk >nul 2>&1 del /f /q *.ilk >nul 2>&1
rmdir /s /q "%build_temp_dir%" >nul 2>&1 rmdir /s /q "%build_temp_dir%" >nul 2>&1
rmdir /s /q "%protoc_out_dir%" >nul 2>&1
rmdir /s /q "%win_resources_out_dir%" >nul 2>&1 rmdir /s /q "%win_resources_out_dir%" >nul 2>&1
for %%A in ("ilk" "lib" "exp") do ( for %%A in ("ilk" "lib" "exp") do (
del /f /s /q "%build_root_dir%\*.%%~A" >nul 2>&1 del /f /s /q "%build_root_dir%\*.%%~A" >nul 2>&1