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:
BrettMayson 2023-11-03 11:30:20 -06:00 committed by GitHub
parent 20676a2f03
commit 95e06254eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 58 additions and 37 deletions

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
#define PATCH_SKIP "No Medical"
#endif

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
#define PATCH_SKIP "No Medical"
#endif

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
#define PATCH_SKIP "No Medical"
#endif

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
#define PATCH_SKIP "No Medical"
#endif

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
#define PATCH_SKIP "No Medical"
#endif

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
#define PATCH_SKIP "No Medical"
#endif

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
#define PATCH_SKIP "No Medical"
#endif

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
#define PATCH_SKIP "No Medical"
#endif

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
#define PATCH_SKIP "No Medical"
#endif

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
#define PATCH_SKIP "No Medical"
#endif

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
#define PATCH_SKIP "No Medical"
#endif

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\nomedical\script_component.hpp")
#define PATCH_SKIP "No Medical"
#endif

View File

@ -1,2 +1,3 @@
[rapify]
enabled = false
[tools]
pboProject_noBinConfig = true
sqfvm_skipConfigChecks = true

View File

@ -1,5 +1,6 @@
#include "script_component.hpp"
#pragma hemtt flag pe23_ignore_has_include
#if __has_include("\z\ace\addons\norealisticnames\script_component.hpp")
#define PATCH_SKIP "No Realistic Names"
#endif

View File

@ -1345,16 +1345,13 @@ See the make.cfg file for additional build options.
if os.path.isfile(addonTomlPath):
with open(addonTomlPath, "r") as f:
tomlFile = f.read()
if "preprocess = false" in tomlFile:
print_error("'preprocess = false' not supported")
raise
skipPreprocessing = "[preprocess]\nenabled = false" in tomlFile or "[rapify]\nenabled = false" in tomlFile
skipPreprocessing = "pboProject_noBinConfig = true".lower() in tomlFile.lower()
if os.path.isfile(os.path.join(work_drive, prefix, module, "$NOBIN$")):
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")]
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"]
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"]

View File

@ -32,7 +32,7 @@ def get_files_to_process(basePath):
with open(addonTomlPath, "rb") as f:
tomlFile = tomllib.load(f)
try:
skipPreprocessing = not tomlFile.get('rapify')['enabled']
skipPreprocessing = tomlFile.get('tools')['sqfvm_skipConfigChecks']
except:
pass
if file == "config.cpp" and skipPreprocessing:
@ -42,7 +42,7 @@ def get_files_to_process(basePath):
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:
content = file.read()
if content.startswith("//pragma SKIP_COMPILE"):
@ -71,10 +71,8 @@ def process_file(filePath, skipA3Warnings=True):
if line.startswith("[ERR]"):
fileHasError = True
if not (
skipA3Warnings
and line.startswith("[WRN]")
and ("a3/" in line)
and (("Unexpected IFDEF" in line) or ("defined twice" in line))
(skipA3Warnings and line.startswith("[WRN]") and ("a3/" in line) and (("Unexpected IFDEF" in line) or ("defined twice" in line)))
or (skipPragmaHemtt and line.startswith("[WRN]") and ("Unknown pragma instruction 'hemtt'" in line))
):
print(" {}".format(line))
return fileHasError