Advertisement
Guest User

Untitled

a guest
Feb 9th, 2018
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.83 KB | None | 0 0
  1. ::Save as whatever.bat in same folder as pp2.exe and put your mods in that folder too, then double-click to run.
  2. ::Pipe dreams: GUI, search for and use *any* PLAY/MAKE folders instead of AA2_ prefix.
  3. ::Quirks: pp2.exe crashes if the PLAY/MAKE dirs end with \ and if a bogus MAKE directory is given (neither should happen here).
  4. @echo off
  5.  
  6. set sevenz="%PROGRAMFILES%\7-Zip\7z.exe"
  7.  
  8. if NOT [%1]==[] (
  9.     call :f_Repack %1
  10.     goto:EOF
  11. )
  12. ELSE (
  13.     for %%f in (*.7z) do (
  14.         call :f_Repack "%%f"
  15.     )
  16. )
  17.  
  18. goto:EOF
  19. :f_Repack
  20. ::Extract
  21. %sevenz% e %1 -y -spf -o"%~n1"
  22. ::Make directories to ensure pp2.exe doesn't explode. Are there MAKE only mods?
  23. mkdir "%~n1\AA2_PLAY"
  24. mkdir "%~n1\AA2_MAKE"
  25. ::The hard part
  26. pp2.exe "49_%~n1.pp2" ".*" "%~n1\AA2_PLAY" "%~n1\AA2_MAKE"
  27. ::Clean up
  28. rmdir /S /Q "%~n1"
  29. EXIT /B 0
  30. goto:EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement