mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Tools - Update addon.toml
to HEMTT 1.9.1 (#9511)
Tools - Update addon.toml to hemtt1.91
This commit is contained in:
parent
262b7fe5c6
commit
902e365536
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[preprocess]
|
[rapify]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
@ -1329,7 +1329,7 @@ See the make.cfg file for additional build options.
|
|||||||
if "preprocess = false" in tomlFile:
|
if "preprocess = false" in tomlFile:
|
||||||
print_error("'preprocess = false' not supported")
|
print_error("'preprocess = false' not supported")
|
||||||
raise
|
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$")):
|
if os.path.isfile(os.path.join(work_drive, prefix, module, "$NOBIN$")):
|
||||||
print_green("$NOBIN$ Found. Proceeding with non-binarizing!")
|
print_green("$NOBIN$ Found. Proceeding with non-binarizing!")
|
||||||
|
@ -60,6 +60,7 @@ def Paste( data ):
|
|||||||
def getFunctions(filepath):
|
def getFunctions(filepath):
|
||||||
selfmodule = (re.search(r'addons[\W]*([_a-zA-Z0-9]*)', filepath)).group(1)
|
selfmodule = (re.search(r'addons[\W]*([_a-zA-Z0-9]*)', filepath)).group(1)
|
||||||
# print("Checking {0} from {1}".format(filepath,selfmodule))
|
# print("Checking {0} from {1}".format(filepath,selfmodule))
|
||||||
|
if (selfmodule.startswith("compat")): return []
|
||||||
|
|
||||||
with open(filepath, 'r') as file:
|
with open(filepath, 'r') as file:
|
||||||
content = file.read()
|
content = file.read()
|
||||||
@ -85,6 +86,7 @@ def getFunctions(filepath):
|
|||||||
def getStrings(filepath):
|
def getStrings(filepath):
|
||||||
selfmodule = (re.search(r'addons[\W]*([_a-zA-Z0-9]*)', filepath)).group(1)
|
selfmodule = (re.search(r'addons[\W]*([_a-zA-Z0-9]*)', filepath)).group(1)
|
||||||
# print("Checking {0} from {1}".format(filepath,selfmodule))
|
# print("Checking {0} from {1}".format(filepath,selfmodule))
|
||||||
|
if (selfmodule.startswith("compat")): return []
|
||||||
|
|
||||||
with open(filepath, 'r') as file:
|
with open(filepath, 'r') as file:
|
||||||
content = file.read()
|
content = file.read()
|
||||||
@ -121,7 +123,8 @@ def main():
|
|||||||
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default=".")
|
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default=".")
|
||||||
args = parser.parse_args()
|
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'):
|
for filename in fnmatch.filter(filenames, '*.sqf'):
|
||||||
sqf_list.append(os.path.join(root, filename))
|
sqf_list.append(os.path.join(root, filename))
|
||||||
for filename in fnmatch.filter(filenames, '*.cpp'):
|
for filename in fnmatch.filter(filenames, '*.cpp'):
|
||||||
|
@ -2,8 +2,9 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import concurrent.futures
|
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 = [
|
files_to_ignore_lower = [
|
||||||
x.lower() for x in ["initSettings.sqf", "initKeybinds.sqf", "XEH_PREP.sqf"]
|
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:
|
if file.lower() in files_to_ignore_lower:
|
||||||
continue
|
continue
|
||||||
skipPreprocessing = False
|
skipPreprocessing = False
|
||||||
addonTomlPath = os.path.join(root, "addon.toml")
|
for addonTomlPath in [os.path.join(root, "addon.toml"), os.path.join(os.path.dirname(root), "addon.toml")]:
|
||||||
if os.path.isfile(addonTomlPath):
|
if os.path.isfile(addonTomlPath):
|
||||||
with open(addonTomlPath, "r") as f:
|
with open(addonTomlPath, "rb") as f:
|
||||||
tomlFile = f.read()
|
tomlFile = tomllib.load(f)
|
||||||
if "preprocess = false" in tomlFile:
|
try:
|
||||||
print("'preprocess = false' not supported")
|
skipPreprocessing = not tomlFile.get('rapify')['enabled']
|
||||||
raise
|
except:
|
||||||
skipPreprocessing = "[preprocess]\nenabled = false" in tomlFile
|
pass
|
||||||
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
|
|
||||||
if file == "config.cpp" and skipPreprocessing:
|
if file == "config.cpp" and skipPreprocessing:
|
||||||
continue # ignore configs with __has_include
|
continue # ignore configs with __has_include
|
||||||
filePath = os.path.join(root, file)
|
filePath = os.path.join(root, file)
|
||||||
|
Loading…
Reference in New Issue
Block a user