SerializeContextAnalysis.bat 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. pushd
  16. cd "%MYBATCHFILEDIRECTORY%"
  17. set OUTPUTFOLDER=SerializeContextAnalysis
  18. REM Attempt to determine the best BinFolder for rc.exe and AssetProcessorBatch.exe
  19. call "%MYBATCHFILEDIRECTORY%\DetermineRCandAP.bat" SILENT
  20. REM If a bin folder was registered, validate the presence of the binfolder/rc.exe
  21. IF ERRORLEVEL 1 (
  22. ECHO Unable to locate an appropriate bin folder. Make sure binaries are copied or compiled from source.
  23. EXIT /b 1
  24. )
  25. ECHO Detected binary folder at %MYBATCHFILEDIRECTORY%%BINFOLDER%
  26. ECHO Extracting data...
  27. mkdir "%MYBATCHFILEDIRECTORY%%OUTPUTFOLDER%"
  28. .\%BINFOLDER%\SerializeContextTools.exe dumpsc -output=../%OUTPUTFOLDER%/SerializeContext.json
  29. .\%BINFOLDER%\SerializeContextTools.exe dumpfiles -files=*.slice;*.uicanvas;config/Editor.xml;config/Game.xml -output=../%OUTPUTFOLDER%/Dump/
  30. ECHO Converting data to documentation.
  31. rem This used to bring in jinja2 with pip, but this needs to instead be hash-checked with
  32. rem requirements.txt instead.
  33. call .\python\python.cmd .\Tools\SerializeContextAnalyzer\SerializeContextAnalyzer.py --source "./%OUTPUTFOLDER%/SerializeContext.json" --output "./%OUTPUTFOLDER%/Confluence/Serialize Context.md" --template ".\Tools\SerializeContextAnalyzer\ConfluenceWiki_SerializeContext.jinja" --split
  34. call .\python\python.cmd .\Tools\SerializeContextAnalyzer\SerializeContextAnalyzer.py --source "./%OUTPUTFOLDER%/SerializeContext.json" --output "./%OUTPUTFOLDER%/Confluence/SystemComponents.md" --template ".\Tools\SerializeContextAnalyzer\ConfluenceWiki_SystemComponents.jinja" --issplit true --parentdoc "Serialize Context"
  35. call .\python\python.cmd .\Tools\SerializeContextAnalyzer\SerializeContextAnalyzer.py --source "./%OUTPUTFOLDER%/SerializeContext.json" --output "./%OUTPUTFOLDER%/Confluence/EntityComponents.md" --template ".\Tools\SerializeContextAnalyzer\ConfluenceWiki_EntityComponents.jinja" --issplit true --parentdoc "Serialize Context"
  36. call .\python\python.cmd .\Tools\SerializeContextAnalyzer\SerializeContextAnalyzer.py --source "./%OUTPUTFOLDER%/SerializeContext.json" --output "./%OUTPUTFOLDER%/SystemComponents.txt" --template ".\Tools\SerializeContextAnalyzer\Text_SystemComponents.jinja"
  37. call .\python\python.cmd .\Tools\SerializeContextAnalyzer\SerializeContextAnalyzer.py --source "./%OUTPUTFOLDER%/SerializeContext.json" --output "./%OUTPUTFOLDER%/EntityComponents.txt" --template ".\Tools\SerializeContextAnalyzer\Text_EntityComponents.jinja"
  38. call .\python\python.cmd .\Tools\SerializeContextAnalyzer\SerializeContextAnalyzer.py --source "./%OUTPUTFOLDER%/SerializeContext.json" --output "./%OUTPUTFOLDER%/Types.txt" --template ".\Tools\SerializeContextAnalyzer\Text_Types.jinja"
  39. call .\python\python.cmd .\Tools\SerializeContextAnalyzer\SerializeContextAnalyzer.py --source "./%OUTPUTFOLDER%/SerializeContext.json" --output "./%OUTPUTFOLDER%/SerializeContext.txt" --template ".\Tools\SerializeContextAnalyzer\Text_SerializeContext.jinja"
  40. popd
  41. ECHO Done