Added: #1093 Added command line argument for client_patch script to only generate updated bnp files without creating a patch.

This commit is contained in:
kaetemi 2011-09-20 18:13:27 +02:00
parent 9f726fff73
commit 2ca6207037

View file

@ -24,9 +24,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
import time, sys, os, shutil, subprocess, distutils.dir_util import time, sys, os, shutil, subprocess, distutils.dir_util, argparse
sys.path.append("configuration") sys.path.append("configuration")
parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Client Patch')
parser.add_argument('--bnponly', '-bo', action='store_true')
args = parser.parse_args()
if os.path.isfile("log.log"): if os.path.isfile("log.log"):
os.remove("log.log") os.remove("log.log")
log = open("log.log", "w") log = open("log.log", "w")
@ -59,16 +63,17 @@ printLog(log, "")
if BnpMake == "": if BnpMake == "":
toolLogFail(log, BnpMakeTool, ToolSuffix) toolLogFail(log, BnpMakeTool, ToolSuffix)
elif PatchGen == "": elif PatchGen == "" and not args.bnponly:
toolLogFail(log, PatchGenTool, ToolSuffix) toolLogFail(log, PatchGenTool, ToolSuffix)
elif Lzma == "": elif Lzma == "" and not args.bnponly:
toolLogFail(log, "LZMA", ToolSuffix) toolLogFail(log, "LZMA", ToolSuffix)
elif XDelta == "": elif XDelta == "" and not args.bnponly:
toolLogFail(log, "XDELTA", ToolSuffix) toolLogFail(log, "XDELTA", ToolSuffix)
elif os.path.dirname(Lzma) != os.path.dirname(XDelta): elif os.path.dirname(Lzma) != os.path.dirname(XDelta):
printLog(log, "FAIL lzma.exe and xdelta.exe must be in the same directory") printLog(log, "FAIL lzma.exe and xdelta.exe must be in the same directory")
else: else:
mkPath(log, ClientPatchDirectory) mkPath(log, ClientPatchDirectory)
if not args.bnponly:
productXml = ClientPatchDirectory + "/" + ProductName + ".xml" productXml = ClientPatchDirectory + "/" + ProductName + ".xml"
if not os.path.isfile(productXml): if not os.path.isfile(productXml):
printLog(log, ">>> Create new product <<<") printLog(log, ">>> Create new product <<<")
@ -133,6 +138,7 @@ else:
else: else:
printLog(log, "SKIP " + targetBnp) printLog(log, "SKIP " + targetBnp)
printLog(log, "") printLog(log, "")
if not args.bnponly:
printLog(log, ">>> Update product <<<") printLog(log, ">>> Update product <<<")
cwDir = os.getcwd().replace("\\", "/") cwDir = os.getcwd().replace("\\", "/")
toolDir = os.path.dirname(Lzma).replace("\\", "/") toolDir = os.path.dirname(Lzma).replace("\\", "/")