|
92 | 92 | else: |
93 | 93 | print(f"Successfully built: {target}") |
94 | 94 | format_path = os.path.join(plugins_dir, fmt) |
| 95 | + target_dir = os.path.join(build_output_dir, fmt) |
95 | 96 |
|
96 | | - for pdb_file in Path(format_path).resolve().rglob("*.pdb"): |
97 | | - try: |
98 | | - pdb_file.unlink() |
99 | | - except Exception as e: |
100 | | - print(f"Failed to remove {pdb_file}: {e}") |
101 | | - |
102 | | - # weird plugdata build trash on Windows for some reason |
103 | | - for trash in Path(format_path).resolve().rglob("plugdata.*"): |
104 | | - try: |
105 | | - if trash.is_dir(): |
106 | | - shutil.rmtree(trash) |
107 | | - except Exception as e: |
108 | | - print(f"Failed to remove {trash}: {e}") |
109 | | - |
110 | | - if os.path.isdir(format_path): |
111 | | - target_dir = os.path.join(build_output_dir, fmt) |
112 | | - |
113 | | - # Clear existing target folder if it exists, then copy |
114 | | - if os.path.exists(target_dir): |
115 | | - shutil.rmtree(target_dir) |
116 | | - shutil.copytree(format_path, target_dir) |
| 97 | + if fmt == "Standalone": |
| 98 | + if os.path.isdir(format_path): |
| 99 | + if os.path.exists(target_dir): |
| 100 | + shutil.rmtree(target_dir) |
| 101 | + shutil.copytree(format_path, target_dir) |
| 102 | + else: |
| 103 | + extension = "" |
| 104 | + if fmt == "VST3": |
| 105 | + extension = ".vst3" |
| 106 | + elif fmt == "AU": |
| 107 | + extension = ".component" |
| 108 | + elif fmt == "LV2": |
| 109 | + extension = ".lv2" |
| 110 | + elif fmt == "CLAP": |
| 111 | + extension = ".clap" |
| 112 | + |
| 113 | + plugin_filename = name + extension; |
| 114 | + os.makedirs(target_dir, exist_ok=True) |
| 115 | + shutil.copytree(os.path.join(format_path, plugin_filename), os.path.join(target_dir, plugin_filename)) |
0 commit comments