mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Tools: HEMTT ignore has_include (#9613)
* Tools: HEMTT ignore has_include * Fix make.py and sqfvmChecker.py for changes --------- Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
20676a2f03
commit
95e06254eb
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Medical"
|
#define PATCH_SKIP "No Medical"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Medical"
|
#define PATCH_SKIP "No Medical"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Medical"
|
#define PATCH_SKIP "No Medical"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Medical"
|
#define PATCH_SKIP "No Medical"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Medical"
|
#define PATCH_SKIP "No Medical"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Medical"
|
#define PATCH_SKIP "No Medical"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Medical"
|
#define PATCH_SKIP "No Medical"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Medical"
|
#define PATCH_SKIP "No Medical"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Medical"
|
#define PATCH_SKIP "No Medical"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Medical"
|
#define PATCH_SKIP "No Medical"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Medical"
|
#define PATCH_SKIP "No Medical"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Medical"
|
#define PATCH_SKIP "No Medical"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
[rapify]
|
[tools]
|
||||||
enabled = false
|
pboProject_noBinConfig = true
|
||||||
|
sqfvm_skipConfigChecks = true
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#pragma hemtt flag pe23_ignore_has_include
|
||||||
#if __has_include("\z\ace\addons\norealisticnames\script_component.hpp")
|
#if __has_include("\z\ace\addons\norealisticnames\script_component.hpp")
|
||||||
#define PATCH_SKIP "No Realistic Names"
|
#define PATCH_SKIP "No Realistic Names"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1345,16 +1345,13 @@ See the make.cfg file for additional build options.
|
|||||||
if os.path.isfile(addonTomlPath):
|
if os.path.isfile(addonTomlPath):
|
||||||
with open(addonTomlPath, "r") as f:
|
with open(addonTomlPath, "r") as f:
|
||||||
tomlFile = f.read()
|
tomlFile = f.read()
|
||||||
if "preprocess = false" in tomlFile:
|
skipPreprocessing = "pboProject_noBinConfig = true".lower() in tomlFile.lower()
|
||||||
print_error("'preprocess = false' not supported")
|
|
||||||
raise
|
|
||||||
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!")
|
||||||
cmd = [makepboTool, "-P","-A","-X=*.backup", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"addons")]
|
cmd = [makepboTool, "-P","-A","-X=*.backup", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"addons")]
|
||||||
elif skipPreprocessing:
|
elif skipPreprocessing:
|
||||||
print_green("addon.toml set [preprocess.enabled = false]. Proceeding with non-binerized config build!")
|
print_green("addon.toml set [pboProject_noBinConfig = true]. Proceeding with non-binerized config build!")
|
||||||
cmd = [pboproject, "-B", "-P", os.path.join(work_drive, prefix, module), "+Engine=Arma3", "-S", "+Noisy", "+Clean", "-Warnings", "+Mod="+os.path.join(module_root, release_dir, project), "-Key"]
|
cmd = [pboproject, "-B", "-P", os.path.join(work_drive, prefix, module), "+Engine=Arma3", "-S", "+Noisy", "+Clean", "-Warnings", "+Mod="+os.path.join(module_root, release_dir, project), "-Key"]
|
||||||
else:
|
else:
|
||||||
cmd = [pboproject, "+B", "-P", os.path.join(work_drive, prefix, module), "+Engine=Arma3", "-S", "+Noisy", "+Clean", "-Warnings", "+Mod="+os.path.join(module_root, release_dir, project), "-Key"]
|
cmd = [pboproject, "+B", "-P", os.path.join(work_drive, prefix, module), "+Engine=Arma3", "-S", "+Noisy", "+Clean", "-Warnings", "+Mod="+os.path.join(module_root, release_dir, project), "-Key"]
|
||||||
|
@ -32,7 +32,7 @@ def get_files_to_process(basePath):
|
|||||||
with open(addonTomlPath, "rb") as f:
|
with open(addonTomlPath, "rb") as f:
|
||||||
tomlFile = tomllib.load(f)
|
tomlFile = tomllib.load(f)
|
||||||
try:
|
try:
|
||||||
skipPreprocessing = not tomlFile.get('rapify')['enabled']
|
skipPreprocessing = tomlFile.get('tools')['sqfvm_skipConfigChecks']
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if file == "config.cpp" and skipPreprocessing:
|
if file == "config.cpp" and skipPreprocessing:
|
||||||
@ -42,7 +42,7 @@ def get_files_to_process(basePath):
|
|||||||
return arma_files
|
return arma_files
|
||||||
|
|
||||||
|
|
||||||
def process_file(filePath, skipA3Warnings=True):
|
def process_file(filePath, skipA3Warnings=True, skipPragmaHemtt=True):
|
||||||
with open(filePath, "r", encoding="utf-8", errors="ignore") as file:
|
with open(filePath, "r", encoding="utf-8", errors="ignore") as file:
|
||||||
content = file.read()
|
content = file.read()
|
||||||
if content.startswith("//pragma SKIP_COMPILE"):
|
if content.startswith("//pragma SKIP_COMPILE"):
|
||||||
@ -71,10 +71,8 @@ def process_file(filePath, skipA3Warnings=True):
|
|||||||
if line.startswith("[ERR]"):
|
if line.startswith("[ERR]"):
|
||||||
fileHasError = True
|
fileHasError = True
|
||||||
if not (
|
if not (
|
||||||
skipA3Warnings
|
(skipA3Warnings and line.startswith("[WRN]") and ("a3/" in line) and (("Unexpected IFDEF" in line) or ("defined twice" in line)))
|
||||||
and line.startswith("[WRN]")
|
or (skipPragmaHemtt and line.startswith("[WRN]") and ("Unknown pragma instruction 'hemtt'" in line))
|
||||||
and ("a3/" in line)
|
|
||||||
and (("Unexpected IFDEF" in line) or ("defined twice" in line))
|
|
||||||
):
|
):
|
||||||
print(" {}".format(line))
|
print(" {}".format(line))
|
||||||
return fileHasError
|
return fileHasError
|
||||||
|
Loading…
Reference in New Issue
Block a user