From 5239e9545b4bd16f5bfe1e8db536b105b7548f56 Mon Sep 17 00:00:00 2001 From: Gary Preston Date: Sun, 31 Jan 2016 13:35:27 +0000 Subject: [PATCH 1/2] Update BnpMake arguements to output bnp files to target folder/name using -o switch. Exclude first element from package[1] which was used to build the targetBnp file rather than a file to be included within the bnp. --- code/nel/tools/build_gamedata/d1_client_patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/tools/build_gamedata/d1_client_patch.py b/code/nel/tools/build_gamedata/d1_client_patch.py index 600347d0b..449d6e0b7 100755 --- a/code/nel/tools/build_gamedata/d1_client_patch.py +++ b/code/nel/tools/build_gamedata/d1_client_patch.py @@ -136,7 +136,7 @@ else: needUpdateBnp = needUpdateDirNoSubdirFile(log, sourcePath, targetBnp) if (needUpdateBnp): printLog(log, "BNP " + targetBnp) - subprocess.call([ BnpMake, "/p", sourcePath, targetPath ] + package[1]) + subprocess.call([ BnpMake, "-p", sourcePath, "-o", targetBnp ] + package[1][1:]) else: printLog(log, "SKIP " + targetBnp) printLog(log, "") From 388050a7fa6348104794224efe3d63538e6ab5cb Mon Sep 17 00:00:00 2001 From: Gary Preston Date: Sun, 31 Jan 2016 18:02:47 +0000 Subject: [PATCH 2/2] Allow bnp_make to process "if" and "ifnot" argumenets multiple times instead of accepting only one instance or each. --- code/nel/tools/misc/bnp_make/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/misc/bnp_make/main.cpp b/code/nel/tools/misc/bnp_make/main.cpp index 98ddf84d6..868f36f62 100644 --- a/code/nel/tools/misc/bnp_make/main.cpp +++ b/code/nel/tools/misc/bnp_make/main.cpp @@ -134,8 +134,8 @@ int main(int argc, char **argv) args.addArg("u", "unpack", "", "Unpack the BNP file to a directory"); args.addArg("l", "list", "", "List the files contained in the BNP file"); args.addArg("o", "output", "destination", "Output directory or file"); - args.addArg("i", "if", "wildcard", "Add the file if it matches the wilcard (at least one 'if' conditions must be met for a file to be adding)"); - args.addArg("n", "ifnot", "wildcard", "Add the file if it doesn't match the wilcard (all the 'ifnot' conditions must be met for a file to be adding)"); + args.addArg("i", "if", "wildcard", "Add the file if it matches the wilcard (at least one 'if' conditions must be met for a file to be adding)", false); + args.addArg("n", "ifnot", "wildcard", "Add the file if it doesn't match the wilcard (all the 'ifnot' conditions must be met for a file to be adding)", false); args.addAdditionalArg("input", "Input directory or BNP file depending on command"); if (!args.parse(argc, argv)) return 1;