Tools - Update addon.toml to HEMTT 1.9.1 (#9511)

Tools - Update addon.toml to hemtt1.91
This commit is contained in:
PabstMirror 2023-10-18 14:19:20 -05:00 committed by GitHub
parent 262b7fe5c6
commit 902e365536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 28 additions and 32 deletions

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1,2 +1,2 @@
[preprocess]
[rapify]
enabled = false

View File

@ -1329,7 +1329,7 @@ See the make.cfg file for additional build options.
if "preprocess = false" in tomlFile:
print_error("'preprocess = false' not supported")
raise
skipPreprocessing = "[preprocess]\nenabled = false" in tomlFile
skipPreprocessing = "[preprocess]\nenabled = false" in tomlFile or "[rapify]\nenabled = false" in tomlFile
if os.path.isfile(os.path.join(work_drive, prefix, module, "$NOBIN$")):
print_green("$NOBIN$ Found. Proceeding with non-binarizing!")

View File

@ -60,6 +60,7 @@ def Paste( data ):
def getFunctions(filepath):
selfmodule = (re.search(r'addons[\W]*([_a-zA-Z0-9]*)', filepath)).group(1)
# print("Checking {0} from {1}".format(filepath,selfmodule))
if (selfmodule.startswith("compat")): return []
with open(filepath, 'r') as file:
content = file.read()
@ -85,6 +86,7 @@ def getFunctions(filepath):
def getStrings(filepath):
selfmodule = (re.search(r'addons[\W]*([_a-zA-Z0-9]*)', filepath)).group(1)
# print("Checking {0} from {1}".format(filepath,selfmodule))
if (selfmodule.startswith("compat")): return []
with open(filepath, 'r') as file:
content = file.read()
@ -121,7 +123,8 @@ def main():
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default=".")
args = parser.parse_args()
for root, dirnames, filenames in os.walk('../addons' + '/' + args.module):
addon_base_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
for root, dirnames, filenames in os.walk(addon_base_path +"/" + 'addons' + '/' + args.module):
for filename in fnmatch.filter(filenames, '*.sqf'):
sqf_list.append(os.path.join(root, filename))
for filename in fnmatch.filter(filenames, '*.cpp'):

View File

@ -2,8 +2,9 @@ import os
import sys
import subprocess
import concurrent.futures
import tomllib
addon_base_path = os.path.dirname(os.getcwd())
addon_base_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
files_to_ignore_lower = [
x.lower() for x in ["initSettings.sqf", "initKeybinds.sqf", "XEH_PREP.sqf"]
@ -26,22 +27,14 @@ def get_files_to_process(basePath):
if file.lower() in files_to_ignore_lower:
continue
skipPreprocessing = False
addonTomlPath = os.path.join(root, "addon.toml")
if os.path.isfile(addonTomlPath):
with open(addonTomlPath, "r") as f:
tomlFile = f.read()
if "preprocess = false" in tomlFile:
print("'preprocess = false' not supported")
raise
skipPreprocessing = "[preprocess]\nenabled = false" in tomlFile
addonTomlPath = os.path.join(os.path.dirname(root), "addon.toml")
if os.path.isfile(addonTomlPath):
with open(addonTomlPath, "r") as f:
tomlFile = f.read()
if "preprocess = false" in tomlFile:
print("'preprocess = false' not supported")
raise
skipPreprocessing = "[preprocess]\nenabled = false" in tomlFile
for addonTomlPath in [os.path.join(root, "addon.toml"), os.path.join(os.path.dirname(root), "addon.toml")]:
if os.path.isfile(addonTomlPath):
with open(addonTomlPath, "rb") as f:
tomlFile = tomllib.load(f)
try:
skipPreprocessing = not tomlFile.get('rapify')['enabled']
except:
pass
if file == "config.cpp" and skipPreprocessing:
continue # ignore configs with __has_include
filePath = os.path.join(root, file)