Added new bat file. Mad props to Aussiemon!
This commit is contained in:
parent
523a3673eb
commit
ead164f048
2 changed files with 72 additions and 3 deletions
72
COMPILE_VMF.bat
Normal file
72
COMPILE_VMF.bat
Normal file
|
@ -0,0 +1,72 @@
|
|||
@setlocal enableextensions
|
||||
@echo off
|
||||
|
||||
:: project-defined variable, you probably shouldn't change them
|
||||
|
||||
set SOUCE_CODE_DIR=.\vmf_source
|
||||
set TEMP_DIR=.\TEMP
|
||||
set ORIGINAL_VMF_BUNDLE_FILE_NAME=98161451961848df
|
||||
set NEW_VMF_BUNDLE_FILE_NAME=000_VMF_Main_Bundle
|
||||
|
||||
:: default paths (in case this batch file won't be able to find steam installation folders) [you can change them :D]
|
||||
|
||||
set MODS_DIR=C:\Program Files (x86)\Steam\steamapps\common\Warhammer End Times Vermintide\bundle\mods
|
||||
set STINGRAY_EXE=C:\Program Files (x86)\Steam\steamapps\common\Warhammer End Times Vermintide Mod Tools\bin\stingray_win64_dev_x64.exe
|
||||
|
||||
:: find Vermintide folder
|
||||
|
||||
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 235540"
|
||||
set VALUE_NAME=InstallLocation
|
||||
|
||||
for /F "usebackq skip=2 tokens=1-2*" %%A in (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) do (
|
||||
set MODS_DIR=%%C\bundle\mods
|
||||
)
|
||||
|
||||
:: find Stingray SDK folder
|
||||
|
||||
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 718610"
|
||||
set VALUE_NAME=InstallLocation
|
||||
|
||||
FOR /F "usebackq skip=2 tokens=1-2*" %%A in (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) do (
|
||||
|
||||
set STINGRAY_EXE=%%C\bin\stingray_win64_dev_x64.exe
|
||||
)
|
||||
|
||||
:: checking if Vermintide mods folder and Sringray binary exist
|
||||
|
||||
if not exist "%MODS_DIR%" (
|
||||
@echo ERROR: Vermintide install location not found. Script execution aborted.
|
||||
pause
|
||||
exit
|
||||
)
|
||||
|
||||
if not exist "%STINGRAY_EXE%" (
|
||||
@echo ERROR: stingray_win64_dev_x64.exe not found. Script execution aborted.
|
||||
pause
|
||||
exit
|
||||
)
|
||||
|
||||
::compiling
|
||||
|
||||
@echo Starting...
|
||||
|
||||
"%STINGRAY_EXE%" --compile-for win32 --source-dir "%SOUCE_CODE_DIR%" --data-dir "%TEMP_DIR%\compile" --bundle-dir "%TEMP_DIR%\bundle"
|
||||
|
||||
@echo Done.
|
||||
|
||||
::moving compiled file to the mods directory (overwritting if needed)
|
||||
|
||||
move /y %TEMP_DIR%\bundle\*. "%MODS_DIR%"
|
||||
|
||||
::if ORIGINAL_VMF_BUNDLE_FILE_NAME and NEW_VMF_BUNDLE_FILE_NAME specified, delete the old renamed file and rename the new one
|
||||
|
||||
if not "%ORIGINAL_VMF_BUNDLE_FILE_NAME%"== "" ^
|
||||
if not "%NEW_VMF_BUNDLE_FILE_NAME%"== "" ^
|
||||
if exist "%MODS_DIR%\%NEW_VMF_BUNDLE_FILE_NAME%" ^
|
||||
del "%MODS_DIR%\%NEW_VMF_BUNDLE_FILE_NAME%"
|
||||
|
||||
if not "%ORIGINAL_VMF_BUNDLE_FILE_NAME%"== "" ^
|
||||
if not "%NEW_VMF_BUNDLE_FILE_NAME%"== "" ^
|
||||
ren "%MODS_DIR%\%ORIGINAL_VMF_BUNDLE_FILE_NAME%" "%NEW_VMF_BUNDLE_FILE_NAME%"
|
||||
|
||||
pause
|
|
@ -1,3 +0,0 @@
|
|||
"./bin/stingray_win64_dev_x64.exe" --compile-for win32 --source-dir vmf_source --data-dir TEMP/compile --bundle-dir TEMP/bundle
|
||||
copy TEMP\bundle\*. "C:\Programs (x86)\Steam\steamapps\common\Warhammer End Times Vermintide\bundle\mods"
|
||||
pause
|
Loading…
Add table
Reference in a new issue