mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Update configValidator tool for Mikero changes (#5537)
This commit is contained in:
parent
41e1b25397
commit
942ab122d3
@ -28,15 +28,29 @@ def Fract_Sec(s):
|
|||||||
sec = temp
|
sec = temp
|
||||||
return d,h,m,sec
|
return d,h,m,sec
|
||||||
|
|
||||||
def CheckPBO(p,makePboArgs,errors):
|
def CheckPBO(p,useMakePbo,checkExternalFiles,errors):
|
||||||
try:
|
try:
|
||||||
subprocess.run([
|
if useMakePbo:
|
||||||
"makepbo",
|
makePboArgs = "-PGU"
|
||||||
makePboArgs,
|
if not checkExternalFiles:
|
||||||
"-@={}\\{}\\addons\\{}".format(MAINPREFIX,PREFIX.rstrip("_"),p),
|
makePboArgs = "-PU"
|
||||||
p,
|
subprocess.run([
|
||||||
"{}_{}.pbo".format(PREFIX,p)
|
"makepbo",
|
||||||
], stdin=None, input=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
|
makePboArgs,
|
||||||
|
"-@={}\\{}\\addons\\{}".format(MAINPREFIX,PREFIX.rstrip("_"),p),
|
||||||
|
p,
|
||||||
|
"{}_{}.pbo".format(PREFIX,p)
|
||||||
|
], stdin=None, input=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
|
||||||
|
else:
|
||||||
|
makePboArgs = "-LEP"
|
||||||
|
if not checkExternalFiles:
|
||||||
|
makePboArgs = "-LP"
|
||||||
|
subprocess.run([
|
||||||
|
"rapify",
|
||||||
|
makePboArgs,
|
||||||
|
p
|
||||||
|
], stdin=None, input=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
|
||||||
|
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
print("!! Problem With {} ret {} !!".format(p, e.returncode))
|
print("!! Problem With {} ret {} !!".format(p, e.returncode))
|
||||||
print(" stderr: {}".format(e.stderr))
|
print(" stderr: {}".format(e.stderr))
|
||||||
@ -49,7 +63,7 @@ def fullDump(p):
|
|||||||
try:
|
try:
|
||||||
subprocess.run([
|
subprocess.run([
|
||||||
"makepbo",
|
"makepbo",
|
||||||
"-PQGs", #Q Lint only - Gs Check external references and show deRap - P dont pause
|
"-PGUS", #G Check external references -S show deRap - P dont pause
|
||||||
"-@={}\\{}\\addons\\{}".format(MAINPREFIX,PREFIX.rstrip("_"),p),
|
"-@={}\\{}\\addons\\{}".format(MAINPREFIX,PREFIX.rstrip("_"),p),
|
||||||
p,
|
p,
|
||||||
"{}_{}.pbo".format(PREFIX,p)
|
"{}_{}.pbo".format(PREFIX,p)
|
||||||
@ -75,11 +89,17 @@ def main(argv):
|
|||||||
except:
|
except:
|
||||||
raise Exception("Failed to switch to addon dir on P:")
|
raise Exception("Failed to switch to addon dir on P:")
|
||||||
|
|
||||||
#Q Lint only - G Check external references - P dont pause (Gs) does full derap
|
useMakePbo = False
|
||||||
makePboArgs = "-PQG"
|
checkExternalFiles = True
|
||||||
|
|
||||||
if "skipExt" in argv:
|
if "skipExt" in argv:
|
||||||
print("Skipping External Files Check");
|
print("Skipping External Files Check");
|
||||||
makePboArgs = "-PQ"
|
checkExternalFiles = False
|
||||||
|
if "make" in argv:
|
||||||
|
# will check more files like RTM and RVMats but twice as slow
|
||||||
|
# This also actually builds a pbo (in same spot as build.py)
|
||||||
|
print("Using makePbo to verify all files");
|
||||||
|
useMakePbo = True
|
||||||
|
|
||||||
errors = []
|
errors = []
|
||||||
|
|
||||||
@ -89,7 +109,7 @@ def main(argv):
|
|||||||
continue
|
continue
|
||||||
if p[0] == ".":
|
if p[0] == ".":
|
||||||
continue
|
continue
|
||||||
CheckPBO(p,makePboArgs,errors)
|
CheckPBO(p,useMakePbo,checkExternalFiles,errors)
|
||||||
|
|
||||||
|
|
||||||
d,h,m,s = Fract_Sec(timeit.default_timer() - start_time)
|
d,h,m,s = Fract_Sec(timeit.default_timer() - start_time)
|
||||||
|
Loading…
Reference in New Issue
Block a user