Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions tools/building.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
#
# File : building.py
# This file is part of RT-Thread RTOS
Expand Down
7 changes: 3 additions & 4 deletions tools/mkdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,21 +320,20 @@ def MkDist_Strip(program, BSP_ROOT, RTT_ROOT, env, project_name, project_path=No

# Output summary
if removed_files:
print(f"Removed {len(removed_files)} unused source files")
print("Removed {} unused source files".format(len(removed_files)))
log_file = os.path.join(dist_dir, 'cleanup.log')
with open(log_file, 'w') as f:
f.write("Removed source files:\n")
f.write('\n'.join(removed_files))
if removed_dirs:
f.write("\n\nRemoved empty directories:\n")
f.write('\n'.join(removed_dirs))
print(f"Details have been written to {log_file}")
print("Details have been written to {}".format(log_file))
else:
print("No unused source files found")

# Make zip package like MkDist
if project_path is None:
zip_dist(dist_dir, project_name)
print(f"Distribution package created: {dist_dir}.zip")

print("Distribution package created: {}.zip".format(dist_dir))
print('=> Distribution stripped successfully')