Advertisement
ramanandp

RenameToVersionAndZip

May 31st, 2021
1,639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.97 KB | None | 0 0
  1. ECHO
  2.  
  3. :: This path depends on where you stored the Unreal project
  4. D:
  5. cd D:\Documents\Unreal Projects\CoolProject\Config
  6.  
  7. :: This finds the text "Project Version" to get the data we want
  8. FOR /F "tokens=* USEBACKQ" %%F IN (`findstr /c:"ProjectVersion" DefaultGame.ini`) DO (SET build-id=%%F)
  9.  
  10. :: Check if we are saving the correct value
  11. ECHO %build-id%
  12.  
  13. :: We now want to remove the first char because its returning "=0.0.0.0"
  14. SET build-id=%build-id:ProjectVersion=%
  15. SET build-id=%build-id:~1%
  16.  
  17. :: Check that the version number is in this form "0.0.0.0"
  18. ECHO %build-id%
  19.  
  20. ::Rename the folder to the version name. This is the path where you stored the packaged project
  21. cd D:\Documents\Unreal Projects\Builds
  22. REN "Windows" "CoolProject %build-id%"
  23.  
  24. ::Zip file
  25. tar.exe -a -c -f "CoolProject %build-id%.zip" "CoolProject %build-id%"
  26.  
  27. :: Run .exe to check if the packaged project is working.
  28. cd D:\Documents\Unreal Projects\Builds\CoolProject %build-id%
  29. CoolProject.exe
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement