Make package_release_build.py include PDBs if available.
This commit is contained in:
@@ -84,8 +84,23 @@ MAC_NATIVES = {
|
|||||||
"libfreetype.6.dylib"
|
"libfreetype.6.dylib"
|
||||||
}
|
}
|
||||||
|
|
||||||
SERVER_EXTRA_CONTENT_ASSEMBLIES = [
|
# Assembly names to copy from content.
|
||||||
"Content.Server.Database.dll"
|
# 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:
|
def main() -> None:
|
||||||
@@ -381,16 +396,29 @@ def copy_dir_into_zip(directory, basepath, zipf):
|
|||||||
|
|
||||||
|
|
||||||
def copy_content_assemblies(target, zipf, server):
|
def copy_content_assemblies(target, zipf, server):
|
||||||
|
files = []
|
||||||
if server:
|
if server:
|
||||||
source_dir = p("bin", "Content.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):
|
for filename in os.listdir(source_dir):
|
||||||
if filename.startswith("Microsoft.") or filename.startswith("Npgsql."):
|
for extra_assembly_start in SERVER_EXTRA_ASSEMBLIES:
|
||||||
files.append(filename)
|
if filename.startswith(extra_assembly_start):
|
||||||
|
files.append(filename)
|
||||||
|
break
|
||||||
|
|
||||||
else:
|
else:
|
||||||
source_dir = p("bin", "Content.Client")
|
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.
|
# Write assemblies dir if necessary.
|
||||||
if not zip_entry_exists(zipf, target):
|
if not zip_entry_exists(zipf, target):
|
||||||
|
|||||||
Reference in New Issue
Block a user