mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Build script: possibly fixed cfgConvert problems
This commit is contained in:
parent
d34cfdb003
commit
18b51aa2b5
@ -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
|
||||
@ -577,9 +578,27 @@ See the make.cfg file for additional build options.
|
||||
#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")])
|
||||
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:\\")
|
||||
@ -625,12 +644,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"))
|
||||
|
Loading…
Reference in New Issue
Block a user