######################################################################################## # 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. # ######################################################################################## from waflib.Build import BuildContext import shutil from waflib import Task, TaskGen @TaskGen.feature('lyshine_copyfiles') def make_lyshine_copyfiles(self): """ Creates tasks to copy files from the source tree to the output tree """ platform = self.bld.env['PLATFORM'] configuration = self.bld.env['CONFIGURATION'] if platform == 'project_generator': return platform_config = self.bld.get_platform_configuration(platform, configuration) if not platform_config.is_test: return for source in self.path.ant_glob('Tests/TestAssets/**'): outFolders = self.bld.get_output_folders(platform, configuration, self) for outFolder in outFolders: # Get the location of the source file relative to the output folder target = outFolder.make_node(source.relpath()) self.create_copy_task(source, target) def build(bld): bld.DefineGem( # Add custom build options here platform_roots = [{'root': 'Source/Platform', 'export_includes': False}], features = ['lyshine_copyfiles'], includes = ['./Include', './Source', bld.Path('Code/CryEngine/CryCommon') ], editor = dict( platform_roots = [{'root': 'Source/Platform', 'export_includes': False}], file_list = ['lyshine.waf_files', 'lyshine_editor.waf_files' ], includes = ['./Include', './Pipeline', './Source', bld.Path('Code/CryEngine/CryCommon') ], use = ['AzCore', 'AzFramework', 'AzToolsFramework', 'AssetBuilderSDK' ], uselib = ['QT5CORE', 'QT5GUI', 'QT5WIDGETS' ], defines = ['LYSHINE_EDITOR'] ) )