Changed: #1093 Create client_install using bnps made in client_patch.

This commit is contained in:
kaetemi 2011-09-16 13:58:20 +02:00
parent 3a520e2fb8
commit 706c0a695f

View file

@ -45,45 +45,30 @@ printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# Find tools for category in InstallClientData:
BnpMake = findTool(log, ToolDirectories, BnpMakeTool, ToolSuffix) printLog(log, "CATEGORY " + category["Name"])
printLog(log, "") if (category["UnpackTo"] != None):
targetPath = ClientInstallDirectory
if BnpMake == "": if (category["UnpackTo"] != ""):
toolLogFail(log, BnpMakeTool, ToolSuffix) targetPath += "/" + category["UnpackTo"]
else: mkPath(log, targetPath)
for category in InstallClientData: for package in category["Packages"]:
printLog(log, "CATEGORY " + category["Name"]) printLog(log, "PACKAGE " + package[0])
if (category["UnpackTo"] != None): mkPath(log, InstallDirectory + "/" + package[0])
targetPath = ClientInstallDirectory copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPath)
if (category["UnpackTo"] != ""): else:
targetPath += "/" + category["UnpackTo"] sourcePath = ClientPatchDirectory + "/bnp"
mkPath(log, targetPath) targetPath = ClientInstallDirectory + "/data"
for package in category["Packages"]: mkPath(log, targetPath)
printLog(log, "PACKAGE " + package[0]) for package in category["Packages"]:
mkPath(log, InstallDirectory + "/" + package[0]) printLog(log, "PACKAGE " + package[0])
copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPath) sourceBnp = sourcePath + "/" + package[0] + ".bnp"
else: targetBnp = targetPath + "/" + package[0] + ".bnp"
targetPath = ClientInstallDirectory + "/data" if (len(package[1]) > 0):
mkPath(log, targetPath) sourceBnp = sourcePath + "/" + package[1][0]
for package in category["Packages"]: targetBnp = targetPath + "/" + package[1][0]
printLog(log, "PACKAGE " + package[0]) printLog(log, "TARGET " + package[1][0])
sourcePath = InstallDirectory + "/" + package[0] copyFileIfNeeded(log, sourceBnp, targetBnp)
mkPath(log, sourcePath)
targetBnp = targetPath + "/" + package[0] + ".bnp"
if (len(package[1]) > 0):
targetBnp = targetPath + "/" + package[1][0]
printLog(log, "TARGET " + package[1][0])
needUpdateBnp = 1
if (len(package) > 2):
needUpdateBnp = needUpdate(log, sourcePath + "/" + package[2], targetBnp)
else:
needUpdateBnp = needUpdateDirNoSubdirFile(log, sourcePath, targetBnp)
if (needUpdateBnp):
printLog(log, "BNP " + targetBnp)
subprocess.call([ BnpMake, "/p", sourcePath, targetPath ] + package[1])
else:
printLog(log, "SKIP " + targetBnp)
printLog(log, "") printLog(log, "")
log.close() log.close()