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:
parent
5ddd8be104
commit
d6174267c5
1 changed files with 56 additions and 50 deletions
|
@ -24,9 +24,13 @@
|
|||
# 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")
|
||||
|
||||
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"):
|
||||
os.remove("log.log")
|
||||
log = open("log.log", "w")
|
||||
|
@ -59,16 +63,17 @@ printLog(log, "")
|
|||
|
||||
if BnpMake == "":
|
||||
toolLogFail(log, BnpMakeTool, ToolSuffix)
|
||||
elif PatchGen == "":
|
||||
elif PatchGen == "" and not args.bnponly:
|
||||
toolLogFail(log, PatchGenTool, ToolSuffix)
|
||||
elif Lzma == "":
|
||||
elif Lzma == "" and not args.bnponly:
|
||||
toolLogFail(log, "LZMA", ToolSuffix)
|
||||
elif XDelta == "":
|
||||
elif XDelta == "" and not args.bnponly:
|
||||
toolLogFail(log, "XDELTA", ToolSuffix)
|
||||
elif os.path.dirname(Lzma) != os.path.dirname(XDelta):
|
||||
printLog(log, "FAIL lzma.exe and xdelta.exe must be in the same directory")
|
||||
else:
|
||||
mkPath(log, ClientPatchDirectory)
|
||||
if not args.bnponly:
|
||||
productXml = ClientPatchDirectory + "/" + ProductName + ".xml"
|
||||
if not os.path.isfile(productXml):
|
||||
printLog(log, ">>> Create new product <<<")
|
||||
|
@ -133,6 +138,7 @@ else:
|
|||
else:
|
||||
printLog(log, "SKIP " + targetBnp)
|
||||
printLog(log, "")
|
||||
if not args.bnponly:
|
||||
printLog(log, ">>> Update product <<<")
|
||||
cwDir = os.getcwd().replace("\\", "/")
|
||||
toolDir = os.path.dirname(Lzma).replace("\\", "/")
|
||||
|
|
Loading…
Reference in a new issue