From c72dd39691637ae3fc57f68fff5651726afeae29 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 7 Apr 2015 13:53:40 -0500 Subject: [PATCH] Build script: use cmd line cfgConvert --- .../pabstFrankensteinBuilder.py | 38 ++++++++----------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/tools/ace_build_tool/pabstFrankensteinBuilder.py b/tools/ace_build_tool/pabstFrankensteinBuilder.py index a0c57f2b3e..09b12a5dc3 100644 --- a/tools/ace_build_tool/pabstFrankensteinBuilder.py +++ b/tools/ace_build_tool/pabstFrankensteinBuilder.py @@ -576,33 +576,25 @@ See the make.cfg file for additional build options. if build_tool == "pboproject": try: #PABST: Convert config (run the macro'd config.cpp through CfgConvert twice to produce a de-macro'd cpp that pboProject can read without fucking up: - os.chdir(os.path.join(arma3tools_path, "CfgConvert")) shutil.copyfile(os.path.join(work_drive, prefix, module, "config.cpp"), os.path.join(work_drive, prefix, module, "config.backup")) - ret = subprocess.call(["cfgConvertGUI.exe", os.path.join(work_drive, prefix, module, "config.cpp")]) - if ret != 0: - print_error("cfgConvertGUI (bin) return code == " + str(ret)) - input("Press Enter to continue...") - - #PABST: Need micro sleeps because cfgConvertGUI can return before it's finished procressing - time.sleep(0.05) - - ret = subprocess.call(["cfgConvertGUI.exe", os.path.join(work_drive, prefix, module, "config.bin")]) - if ret != 0: - print_error("cfgConvertGUI (txt) return code == " + str(ret)) - input("Press Enter to continue...") - - time.sleep(0.05) - - #cmd = [rapifyTool, "-L", "-P", os.path.join(work_drive, prefix, module, "config.cpp")]; - #ret = subprocess.call(cmd) - #if ret != 0: - # print_error("rapifyTool return code == " + str(ret) + str(cmd)) - # input("Press Enter to continue...") - - # Call pboProject os.chdir("P:\\") + cmd = [os.path.join(work_drive, "CfgConvert", "CfgConvert.exe"), "-bin", "-dst", os.path.join(work_drive, prefix, module, "config.bin"), os.path.join(work_drive, prefix, module, "config.cpp")] + ret = subprocess.call(cmd) + #ret = subprocess.call(["cfgConvertGUI.exe", os.path.join(work_drive, prefix, module, "config.cpp")]) + + if ret != 0: + print_error("CfgConvert -bin return code == " + str(ret)) + input("Press Enter to continue...") + + + cmd = [os.path.join(work_drive, "CfgConvert", "CfgConvert.exe"), "-txt", "-dst", os.path.join(work_drive, prefix, module, "config.cpp"), os.path.join(work_drive, prefix, module, "config.bin")] + ret = subprocess.call(cmd) + if ret != 0: + print_error("CfgConvert -txt) return code == " + str(ret)) + input("Press Enter to continue...") + if os.path.isfile(os.path.join(work_drive, prefix, module, "$NOBIN$")): print_green("$NOBIN$ Found. Proceeding with non-binarizing!") cmd = [makepboTool, "-P","-A","-L","-N","-G", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"Addons")]