diff --git a/tools/export/__init__.py b/tools/export/__init__.py index 8038f97777..cb490f6c9a 100644 --- a/tools/export/__init__.py +++ b/tools/export/__init__.py @@ -344,13 +344,14 @@ def export_project(src_paths, export_path, target, ide, libraries_paths=None, if label not in toolchain.target.features: resource.add(res) if isinstance(zip_proj, basestring): - zip_export(join(export_path, zip_proj), name, resource_dict, files, - inc_repos) + zip_export(join(export_path, zip_proj), name, resource_dict, + files + exporter.static_files, inc_repos) else: - zip_export(zip_proj, name, resource_dict, files, inc_repos) + zip_export(zip_proj, name, resource_dict, + files + exporter.static_files, inc_repos) else: - for exported in files: - if not exists(join(export_path, basename(exported))): - copyfile(exported, join(export_path, basename(exported))) + for static_file in exporter.static_files: + if not exists(join(export_path, basename(static_file))): + copyfile(static_file, join(export_path, basename(static_file))) return exporter diff --git a/tools/export/exporters.py b/tools/export/exporters.py index 090efd2aca..775b408275 100644 --- a/tools/export/exporters.py +++ b/tools/export/exporters.py @@ -72,8 +72,11 @@ class Exporter(object): jinja_loader = FileSystemLoader(os.path.dirname(os.path.abspath(__file__))) self.jinja_environment = Environment(loader=jinja_loader) self.resources = resources - self.generated_files = [join(self.TEMPLATE_DIR, "GettingStarted.html"), - join(self.TEMPLATE_DIR, ".mbed")] + self.generated_files = [] + self.static_files = ( + join(self.TEMPLATE_DIR, "GettingStarted.html"), + join(self.TEMPLATE_DIR, ".mbed"), + ) self.builder_files_dict = {} self.add_config()