Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ::Save as whatever.bat in same folder as pp2.exe and put your mods in that folder too, then double-click to run.
- ::Pipe dreams: GUI, search for and use *any* PLAY/MAKE folders instead of AA2_ prefix.
- ::Quirks: pp2.exe crashes if the PLAY/MAKE dirs end with \ and if a bogus MAKE directory is given (neither should happen here).
- @echo off
- set sevenz="%PROGRAMFILES%\7-Zip\7z.exe"
- if NOT [%1]==[] (
- call :f_Repack %1
- goto:EOF
- )
- ELSE (
- for %%f in (*.7z) do (
- call :f_Repack "%%f"
- )
- )
- goto:EOF
- :f_Repack
- ::Extract
- %sevenz% e %1 -y -spf -o"%~n1"
- ::Make directories to ensure pp2.exe doesn't explode. Are there MAKE only mods?
- mkdir "%~n1\AA2_PLAY"
- mkdir "%~n1\AA2_MAKE"
- ::The hard part
- pp2.exe "49_%~n1.pp2" ".*" "%~n1\AA2_PLAY" "%~n1\AA2_MAKE"
- ::Clean up
- rmdir /S /Q "%~n1"
- EXIT /B 0
- goto:EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement