Add pipeline script for creating streamed packages

--HG--
branch : feature-streamed-package
hg/feature/streamed-package
kaetemi 11 years ago
parent 7d09a6cb15
commit 105ecbff90

@ -87,6 +87,7 @@ BuildClodBankTool = "build_clod_bank"
SheetsPackerTool = "sheets_packer" SheetsPackerTool = "sheets_packer"
SheetsPackerShardTool = "sheets_packer_shard" SheetsPackerShardTool = "sheets_packer_shard"
BnpMakeTool = "bnp_make" BnpMakeTool = "bnp_make"
SnpMakeTool = "snp_make"
AiBuildWmapTool = "ai_build_wmap" AiBuildWmapTool = "ai_build_wmap"
TgaCutTool = "tga_cut" TgaCutTool = "tga_cut"
PatchGenTool = "patch_gen" PatchGenTool = "patch_gen"

@ -51,6 +51,7 @@ printLog(log, "")
# Find tools # Find tools
BnpMake = findTool(log, ToolDirectories, BnpMakeTool, ToolSuffix) BnpMake = findTool(log, ToolDirectories, BnpMakeTool, ToolSuffix)
SnpMake = findTool(log, ToolDirectories, SnpMakeTool, ToolSuffix);
PatchGen = findTool(log, ToolDirectories, PatchGenTool, ToolSuffix) PatchGen = findTool(log, ToolDirectories, PatchGenTool, ToolSuffix)
printLog(log, "") printLog(log, "")
@ -121,11 +122,14 @@ else:
targetPath = ClientPatchDirectory + "/bnp" targetPath = ClientPatchDirectory + "/bnp"
mkPath(log, targetPath) mkPath(log, targetPath)
for category in InstallClientData: for category in InstallClientData:
packExt = ".bnp"
if (category["StreamedPackages"]):
packExt = ".snp"
for package in category["Packages"]: for package in category["Packages"]:
printLog(log, "PACKAGE " + package[0]) printLog(log, "PACKAGE " + package[0])
sourcePath = InstallDirectory + "/" + package[0] sourcePath = InstallDirectory + "/" + package[0]
mkPath(log, sourcePath) mkPath(log, sourcePath)
targetBnp = targetPath + "/" + package[0] + ".bnp" targetBnp = targetPath + "/" + package[0] + packExt
if (len(package[1]) > 0): if (len(package[1]) > 0):
targetBnp = targetPath + "/" + package[1][0] targetBnp = targetPath + "/" + package[1][0]
printLog(log, "TARGET " + package[1][0]) printLog(log, "TARGET " + package[1][0])
@ -135,8 +139,16 @@ else:
else: else:
needUpdateBnp = needUpdateDirNoSubdirFile(log, sourcePath, targetBnp) needUpdateBnp = needUpdateDirNoSubdirFile(log, sourcePath, targetBnp)
if (needUpdateBnp): if (needUpdateBnp):
printLog(log, "BNP " + targetBnp) if (category["StreamedPackages"]):
subprocess.call([ BnpMake, "/p", sourcePath, targetPath ] + package[1]) 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: else:
printLog(log, "SKIP " + targetBnp) printLog(log, "SKIP " + targetBnp)
printLog(log, "") printLog(log, "")

Loading…
Cancel
Save