asset_windows.cmd 978 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. @ECHO OFF
  2. REM
  3. REM Copyright (c) Contributors to the Open 3D Engine Project.
  4. REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. REM
  6. REM SPDX-License-Identifier: Apache-2.0 OR MIT
  7. REM
  8. REM
  9. SETLOCAL EnableDelayedExpansion
  10. SET SOURCE_DIRECTORY=%CD%
  11. IF NOT EXIST %OUTPUT_DIRECTORY% (
  12. ECHO [ci_build] Error: %OUTPUT_DIRECTORY% was not found
  13. GOTO :error
  14. )
  15. PUSHD %OUTPUT_DIRECTORY%
  16. IF NOT EXIST %ASSET_PROCESSOR_BINARY% (
  17. ECHO [ci_build] Error: %ASSET_PROCESSOR_BINARY% was not found
  18. GOTO :error
  19. )
  20. FOR %%P in (%CMAKE_LY_PROJECTS%) do (
  21. ECHO [ci_build] %ASSET_PROCESSOR_BINARY% %ASSET_PROCESSOR_OPTIONS% --project-path=%SOURCE_DIRECTORY%/%%P --platforms=%ASSET_PROCESSOR_PLATFORMS%
  22. %ASSET_PROCESSOR_BINARY% %ASSET_PROCESSOR_OPTIONS% --project-path=%SOURCE_DIRECTORY%/%%P --platforms=%ASSET_PROCESSOR_PLATFORMS%
  23. IF NOT !ERRORLEVEL!==0 GOTO :popd_error
  24. )
  25. POPD
  26. EXIT /b 0
  27. :popd_error
  28. POPD
  29. :error
  30. EXIT /b 1