BuildAtomSampleViewer_Paks_PC.bat 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. @echo off
  2. REM
  3. REM All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
  4. REM its licensors.
  5. REM
  6. REM For complete copyright and license terms please see the LICENSE at the root of this
  7. REM distribution (the "License"). All use of this software is governed by the License,
  8. REM or, if provided, by the license below or the license accompanying this file. Do not
  9. REM remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
  10. REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. REM
  12. setlocal enabledelayedexpansion
  13. set ORIGINALDIRECTORY=%cd%
  14. set MYBATCHFILEDIRECTORY=%~dp0
  15. cd "%MYBATCHFILEDIRECTORY%"
  16. REM Attempt to determine the best BinFolder for rc.exe and AssetProcessorBatch.exe
  17. call "%MYBATCHFILEDIRECTORY%\DetermineRCandAP.bat" SILENT
  18. REM If a bin folder was registered, validate the presence of the binfolder/rc/rc.exe
  19. IF ERRORLEVEL 1 (
  20. ECHO unable to determine the locations of AssetProcessor and rc.exe. Make sure that they are available or rebuild from source
  21. EXIT /b 1
  22. )
  23. ECHO Detected binary folder at %MYBATCHFILEDIRECTORY%%BINFOLDER%
  24. echo ----- Processing Assets Using Asset Processor Batch ----
  25. .\%BINFOLDER%\AssetProcessorBatch.exe /gamefolder=AtomSampleViewer /platforms=pc
  26. IF ERRORLEVEL 1 GOTO AssetProcessingFailed
  27. echo ----- Creating Packages ----
  28. rem lowercase is intentional, since cache folders are lowercase on some platforms
  29. .\%BINFOLDER%\rc\rc.exe /job=%BINFOLDER%\rc\RCJob_Generic_MakePaks.xml /p=pc /game=atomsampleviewer
  30. IF ERRORLEVEL 1 GOTO RCFailed
  31. echo ----- Done -----
  32. cd "%ORIGINALDIRECTORY%"
  33. exit /b 0
  34. :RCFailed
  35. echo ---- RC PAK failed ----
  36. cd "%ORIGINALDIRECTORY%"
  37. exit /b 1
  38. :AssetProcessingFailed
  39. echo ---- ASSET PROCESSING FAILED ----
  40. cd "%ORIGINALDIRECTORY%"
  41. exit /b 1