Generate 7z server patch, ref ryzom/ryzomcore#586

develop
kaetemi 5 years ago
parent 9b0852a91d
commit 5c0c6d2417

@ -49,6 +49,9 @@ 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
SevenZip = findTool(log, ToolDirectories, SevenZipTool, ToolSuffix)
# List the directories that will be used # List the directories that will be used
archiveDirectories = [ ] archiveDirectories = [ ]
for dir in InstallShardDataDirectories: for dir in InstallShardDataDirectories:
@ -89,6 +92,9 @@ else:
printLog(log, "") printLog(log, "")
if not args.admininstall: if not args.admininstall:
if SevenZip == "":
toolLogFail(log, SevenZipTool, ToolSuffix)
else:
printLog(log, ">>> Create new version <<<") printLog(log, ">>> Create new version <<<")
newVersion = 1 newVersion = 1
vstr = str(newVersion).zfill(6) vstr = str(newVersion).zfill(6)
@ -100,11 +106,14 @@ if not args.admininstall:
mkPath(log, vpath) mkPath(log, vpath)
for dir in archiveDirectories: for dir in archiveDirectories:
mkPath(log, ShardInstallDirectory + "/" + dir) mkPath(log, ShardInstallDirectory + "/" + dir)
tgzPath = vpath + "/" + dir + ".tgz" # tgzPath = vpath + "/" + dir + ".tgz"
printLog(log, "WRITE " + tgzPath) # printLog(log, "WRITE " + tgzPath)
tar = tarfile.open(tgzPath, "w:gz") # tar = tarfile.open(tgzPath, "w:gz")
tar.add(ShardInstallDirectory + "/" + dir, arcname = dir) # tar.add(ShardInstallDirectory + "/" + dir, arcname = dir)
tar.close() # tar.close()
sevenZipPath = vpath + "/" + dir + ".7z"
printLog(log, "WRITE " + sevenZipPath)
subprocess.call([ SevenZip, "a", sevenZipPath, ShardInstallDirectory + "/" + dir ])
printLog(log, "") printLog(log, "")
log.close() log.close()

@ -98,3 +98,4 @@ PatchGenTool = "patch_gen"
TranslationToolsTool = "translation_tools" TranslationToolsTool = "translation_tools"
BuildWorldPackedColTool = "build_world_packed_col" BuildWorldPackedColTool = "build_world_packed_col"
R2IslandsTexturesTool = "r2_islands_textures" R2IslandsTexturesTool = "r2_islands_textures"
SevenZipTool = "7za"

Loading…
Cancel
Save