Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions tools/export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,11 @@ def export_project(src_paths, export_path, target, ide, libraries_paths=None,
name = basename(normpath(abspath(src_paths[0])))

# Call unified scan_resources
resource_dict = {loc: scan_resources(path, toolchain, inc_dirs=inc_dirs, collect_ignores=True)
resource_dict = {loc: sum((toolchain.scan_resources(p, collect_ignores=True)
for p in path),
Resources())
for loc, path in src_paths.items()}
resources = Resources()
toolchain.build_dir = export_path
config_header = toolchain.get_config_header()
resources.headers.append(config_header)
resources.file_basepath[config_header] = dirname(config_header)

if zip_proj:
subtract_basepath(resources, ".")
Expand All @@ -333,6 +331,13 @@ def export_project(src_paths, export_path, target, ide, libraries_paths=None,
for _, res in resource_dict.items():
resources.add(res)

toolchain.build_dir = export_path
toolchain.config.load_resources(resources)
toolchain.set_config_data(toolchain.config.get_config_data())
config_header = toolchain.get_config_header()
resources.headers.append(config_header)
resources.file_basepath[config_header] = dirname(config_header)

# Change linker script if specified
if linker_script is not None:
resources.linker_script = linker_script
Expand Down