diff --git a/Tools/package_release_build.py b/Tools/package_release_build.py index fae399325a..214f478e1c 100755 --- a/Tools/package_release_build.py +++ b/Tools/package_release_build.py @@ -84,8 +84,23 @@ MAC_NATIVES = { "libfreetype.6.dylib" } -SERVER_EXTRA_CONTENT_ASSEMBLIES = [ - "Content.Server.Database.dll" +# Assembly names to copy from content. +# PDBs are included if available, .dll/.pdb appended automatically. +SERVER_CONTENT_ASSEMBLIES = [ + "Content.Server.Database", + "Content.Server", + "Content.Shared" +] + +CLIENT_CONTENT_ASSEMBLIES = [ + "Content.Client", + "Content.Shared" +] + +# Extra assemblies to copy on the server, with a startswith +SERVER_EXTRA_ASSEMBLIES = [ + "Npgsql.", + "Microsoft", ] def main() -> None: @@ -381,16 +396,29 @@ def copy_dir_into_zip(directory, basepath, zipf): def copy_content_assemblies(target, zipf, server): + files = [] if server: source_dir = p("bin", "Content.Server") - files = ["Content.Shared.dll", "Content.Server.dll"] + SERVER_EXTRA_CONTENT_ASSEMBLIES + base_assemblies = SERVER_CONTENT_ASSEMBLIES + + # Additional assemblies that need to be copied such as EFCore. for filename in os.listdir(source_dir): - if filename.startswith("Microsoft.") or filename.startswith("Npgsql."): - files.append(filename) + for extra_assembly_start in SERVER_EXTRA_ASSEMBLIES: + if filename.startswith(extra_assembly_start): + files.append(filename) + break else: source_dir = p("bin", "Content.Client") - files = ["Content.Shared.dll", "Content.Client.dll"] + base_assemblies = CLIENT_CONTENT_ASSEMBLIES + + # Include content assemblies. + for asm in base_assemblies: + files.append(asm + ".dll") + # If PDB available, include it aswell. + pdb_path = asm + ".pdb" + if os.path.exists(p(source_dir, pdb_path)): + files.append(pdb_path) # Write assemblies dir if necessary. if not zip_entry_exists(zipf, target):