Skip to content

Commit

Permalink
Propperall now uses git bash
Browse files Browse the repository at this point in the history
  • Loading branch information
Python1320 committed Aug 13, 2023
1 parent c65f96f commit ef8848a
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*.log
/user_config.cmd
/VIDE
/game_compiling
/game_hammer
/game_compil*
/game_hamm*
/compilepal
/bin
/extras/hammerlua/lua/winapiffi
Expand Down
19 changes: 17 additions & 2 deletions LAUNCH propperall.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,30 @@

:found
@cd /d "%mapfolder%\propper"
@echo Directory: %cd%
@echo.
@bash --help > nul
@if ERRORLEVEL 1 @goto nobash

@echo running propperall.sh
@bash propperall.sh
@if ERRORLEVEL 1 @goto failed

@goto :proppered

:nobash
@echo bash not found, running vanilla (slow, no error detection)
@for /r %%i in (*.vmf) do @(
@echo Processing "%%i" Log: "%%i.log"
"%VBSPNAME%" "%%i" 1>"%%i.log"
@if ERRORLEVEL 1 goto failed
)
:proppered
@for /r %%i in (*.tmp) do @(
attrib +h "%%i"
)

@echo "====== Copying files also for hammer usage ======="
@echo ====== Copying files also for hammer usage =======
ROBOCOPY "%GameDir%\materials\models\mspropp" "%PROPPER_TARGET%\materials\models\mspropp" /MOV /s /NFL /NDL /NJS /NJH /NP /is /it
ROBOCOPY "%GameDir%\models\props\metastruct" "%PROPPER_TARGET%\models\props\metastruct" /MOV /s /NFL /NDL /NJS /NJH /NP /is /it

Expand All @@ -65,7 +81,6 @@ ROBOCOPY "%GameDir%\models\props\metastruct" "%PROPPER_TARGET%\models\props\meta
@echo ====== FINISHED =======
@echo =======================

@echo Press ENTER to continue.
@pause > nul

@goto gtfo
Expand Down
37 changes: 37 additions & 0 deletions propperall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

echo "> propperall.sh 0.1"
skipped=0
compiled=0

for f in *.vmf; do


if cmp -s "$f" ".$f.tmp"; then
#echo "Skipping $f"
skipped=$((skipped+1))
continue
fi

echo Processing "$f" Log: "$f.log"
"$VBSPNAME" "$f" > "$f.log"
if [ $? -ne 0 ] || ! grep -q Completed "$f.log"; then
echo ""
echo "Failed: $f"
echo ""
cat "$f.log"
echo ""
echo "SKIPPING OTHER MODELS UNTIL THIS IS FIXED"
echo ""
exit 1
break
fi
cp "$f" ".$f.tmp"

compiled=$((compiled+1))
done

if [ $skipped -ge 0 ]; then
echo "Skipped $skipped VMFs"
fi
echo "Compiled $compiled VMFs"

0 comments on commit ef8848a

Please sign in to comment.