[patch] 修改打包固定项缓存复用 提升打包效率

This commit is contained in:
2025-10-13 15:18:39 +08:00
parent a2fa008cb6
commit 9d9677972b

View File

@@ -37,6 +37,15 @@ def clean_build():
dirs_to_clean = ['dist'] dirs_to_clean = ['dist']
print("Incremental build mode - preserving build cache for faster builds") print("Incremental build mode - preserving build cache for faster builds")
# Always remove spec file to ensure PyInstaller regenerates it from command-line args
spec_file = 'MultiPlatformGUI.spec'
if os.path.exists(spec_file):
try:
os.remove(spec_file)
print(f"Removed old spec file: {spec_file}")
except Exception as e:
print(f"WARNING: Failed to remove spec file: {e}")
for dir_name in dirs_to_clean: for dir_name in dirs_to_clean:
print(f"Checking directory: {dir_name}") print(f"Checking directory: {dir_name}")
if os.path.exists(dir_name): if os.path.exists(dir_name):