######################################################################################## # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or # its licensors. # # For complete copyright and license terms please see the LICENSE at the root of this # distribution (the "License"). All use of this software is governed by the License, # or, if provided, by the license below or the license accompanying this file. Do not # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # # # Original file Copyright Crytek GMBH or its affiliates, used under license. # ######################################################################################## import os from runpy import run_path SUBFOLDERS = [ '3rdParty', 'AssetProcessor', 'AZInstaller', 'CryXML', 'MaxCryExport', 'MayaCryExport2', 'ShaderCacheGen', 'CrySCompileServer', 'HLSLCrossCompiler', 'HLSLCrossCompilerMetal', 'SceneAPI', 'AzTestScanner', 'Woodpecker', 'GridHub', 'News', 'AzCodeGenerator', 'CrashHandler', 'SharedQMLResource', 'AWSNativeSDKInit', 'RemoteConsole', 'SerializeContextTools', 'DeltaCataloger', 'PythonBindingsExample', 'AssetBundler' ] def build(bld): # dedicated server uses a special build of RC to generate compressed data, etc. bld.recurse(['RC']) bld.recurse(['GemRegistry']) check_project_configurator_wscript = bld.Path('Code/Tools/ProjectConfigurator/wscript') if os.path.exists(check_project_configurator_wscript): bld.recurse(['ProjectConfigurator']) if not bld.is_building_dedicated_server(): if os.path.exists(bld.Path('Code/Tools/LyIdentity/wscript')): bld.recurse(['LyIdentity']) if os.path.exists(bld.Path('Code/Tools/LyMetrics/wscript')): bld.recurse(['LyMetrics']) if hasattr(bld,'register_internal_telemetry'): bld.register_internal_telemetry() for subfolder in SUBFOLDERS: bld.recurse([subfolder], mandatory = False) # Handle any restricted platform recursions for p0, p1, p2, p3 in bld.env['RESTRICTED_PLATFORMS']: script_dir, script_base = os.path.split(bld.cur_script.abspath()) restricted_script_filename = os.path.join(script_dir, p0, '{0}_{1}'.format(script_base, p1)) if os.path.exists(restricted_script_filename): restricted_script = run_path(restricted_script_filename) if 'targets_to_add' in restricted_script: targets_to_add = restricted_script['targets_to_add'](bld) if targets_to_add: for target_to_add in targets_to_add: bld.add_target_to_spec(target_to_add, 'all') if 'restricted_subfolders' in restricted_script: restricted_subfolders = restricted_script['restricted_subfolders']() for subfolder in restricted_subfolders: bld.recurse([subfolder], mandatory=False)