This commit is contained in:
commy2 2015-04-07 20:54:45 +02:00
commit ba618a69ec
125 changed files with 3033 additions and 3022 deletions

View File

@ -48,6 +48,7 @@ import hashlib
import configparser
import json
import traceback
import time
if sys.platform == "win32":
import winreg
@ -538,8 +539,8 @@ See the make.cfg file for additional build options.
input("Press Enter to continue...")
print("Resuming build...")
continue
else:
print("WARNING: Module is stored on work drive (" + work_drive + ").")
#else:
#print("WARNING: Module is stored on work drive (" + work_drive + ").")
try:
# Remove the old pbo, key, and log
@ -575,15 +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"))
print_green("\Pabst (double converting):" + "cfgConvertGUI.exe " + os.path.join(work_drive, prefix, module, "config.cpp"))
ret = subprocess.call(["cfgConvertGUI.exe", os.path.join(work_drive, prefix, module, "config.cpp")])
ret = subprocess.call(["cfgConvertGUI.exe", os.path.join(work_drive, prefix, module, "config.bin")])
# 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")]
@ -625,12 +636,12 @@ See the make.cfg file for additional build options.
if not build_successful:
print_error("pboProject return code == " + str(ret))
print_error("Module not successfully built/signed.")
#input("Press Enter to continue...")
input("Press Enter to continue...")
print ("Resuming build...")
continue
#PABST: cleanup config BS (you could comment this out to see the "de-macroed" cpp
print_green("\Pabst (restoring): " + os.path.join(work_drive, prefix, module, "config.cpp"))
#print_green("\Pabst (restoring): " + os.path.join(work_drive, prefix, module, "config.cpp"))
os.remove(os.path.join(work_drive, prefix, module, "config.cpp"))
os.remove(os.path.join(work_drive, prefix, module, "config.bin"))
os.rename(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp"))