From 105ecbff90bf1ea4b0ac5c0ba5c8635c10594038 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 24 Sep 2014 21:52:41 +0200 Subject: [PATCH] Add pipeline script for creating streamed packages --HG-- branch : feature-streamed-package --- .../build_gamedata/configuration/tools.py | 1 + .../tools/build_gamedata/d1_client_patch.py | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/build_gamedata/configuration/tools.py b/code/nel/tools/build_gamedata/configuration/tools.py index c0c962360..bf904072e 100755 --- a/code/nel/tools/build_gamedata/configuration/tools.py +++ b/code/nel/tools/build_gamedata/configuration/tools.py @@ -87,6 +87,7 @@ BuildClodBankTool = "build_clod_bank" SheetsPackerTool = "sheets_packer" SheetsPackerShardTool = "sheets_packer_shard" BnpMakeTool = "bnp_make" +SnpMakeTool = "snp_make" AiBuildWmapTool = "ai_build_wmap" TgaCutTool = "tga_cut" PatchGenTool = "patch_gen" diff --git a/code/nel/tools/build_gamedata/d1_client_patch.py b/code/nel/tools/build_gamedata/d1_client_patch.py index 600347d0b..4b4f37072 100755 --- a/code/nel/tools/build_gamedata/d1_client_patch.py +++ b/code/nel/tools/build_gamedata/d1_client_patch.py @@ -51,6 +51,7 @@ printLog(log, "") # Find tools BnpMake = findTool(log, ToolDirectories, BnpMakeTool, ToolSuffix) +SnpMake = findTool(log, ToolDirectories, SnpMakeTool, ToolSuffix); PatchGen = findTool(log, ToolDirectories, PatchGenTool, ToolSuffix) printLog(log, "") @@ -121,11 +122,14 @@ else: targetPath = ClientPatchDirectory + "/bnp" mkPath(log, targetPath) for category in InstallClientData: + packExt = ".bnp" + if (category["StreamedPackages"]): + packExt = ".snp" for package in category["Packages"]: printLog(log, "PACKAGE " + package[0]) sourcePath = InstallDirectory + "/" + package[0] mkPath(log, sourcePath) - targetBnp = targetPath + "/" + package[0] + ".bnp" + targetBnp = targetPath + "/" + package[0] + packExt if (len(package[1]) > 0): targetBnp = targetPath + "/" + package[1][0] printLog(log, "TARGET " + package[1][0]) @@ -135,8 +139,16 @@ else: else: needUpdateBnp = needUpdateDirNoSubdirFile(log, sourcePath, targetBnp) if (needUpdateBnp): - printLog(log, "BNP " + targetBnp) - subprocess.call([ BnpMake, "/p", sourcePath, targetPath ] + package[1]) + if (category["StreamedPackages"]): + printLog(log, "SNP " + targetBnp) + cwDir = os.getcwd().replace("\\", "/") + toolDir = os.path.dirname(Lzma).replace("\\", "/") + os.chdir(toolDir) + subprocess.call([ SnpMake, "/p", sourcePath, targetBnp, ClientPatchDirectory + "/stream" ] + package[1]) + os.chdir(cwDir) + else: + printLog(log, "BNP " + targetBnp) + subprocess.call([ BnpMake, "/p", sourcePath, targetPath, targetBnp ] + package[1]) else: printLog(log, "SKIP " + targetBnp) printLog(log, "")