New premake flags for debugging anticheat, library loading and forcing unit tests.
- --debug-detections sets the "DEBUG_DETECTIONS" define to show whenever a mismatch in the anticheat hashing occurs. - --debug-load-library sets the "DEBUG_LOAD_LIBRARY" define to show libraries as they are loaded during runtime in the debug console. - --force-unit-tests sets the "FORCE_UNIT_TESTS" define to enforce compiling the unit tests into the binary.
This commit is contained in:
parent
1db207497b
commit
6dfd22c07a
26
premake5.lua
26
premake5.lua
@ -15,6 +15,21 @@ newoption {
|
|||||||
description = "Copy debug information for binaries as well to the path given via --copy-to."
|
description = "Copy debug information for binaries as well to the path given via --copy-to."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newoption {
|
||||||
|
trigger = "debug-detections",
|
||||||
|
description = "Log anticheat detections."
|
||||||
|
}
|
||||||
|
|
||||||
|
newoption {
|
||||||
|
trigger = "debug-load-library",
|
||||||
|
description = "Log libraries that get loaded."
|
||||||
|
}
|
||||||
|
|
||||||
|
newoption {
|
||||||
|
trigger = "force-unit-tests",
|
||||||
|
description = "Always compile unit tests."
|
||||||
|
}
|
||||||
|
|
||||||
newaction {
|
newaction {
|
||||||
trigger = "version",
|
trigger = "version",
|
||||||
description = "Returns the version string for the current commit of the source code.",
|
description = "Returns the version string for the current commit of the source code.",
|
||||||
@ -134,6 +149,17 @@ workspace "iw4x"
|
|||||||
"$(ProjectDir)src" -- fix for VS IDE
|
"$(ProjectDir)src" -- fix for VS IDE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Debug flags
|
||||||
|
if _OPTIONS["debug-detections"] then
|
||||||
|
defines { "DEBUG_DETECTIONS" }
|
||||||
|
end
|
||||||
|
if _OPTIONS["debug-load-library"] then
|
||||||
|
defines { "DEBUG_LOAD_LIBRARY" }
|
||||||
|
end
|
||||||
|
if _OPTIONS["force-unit-tests"] then
|
||||||
|
defines { "FORCE_UNIT_TESTS" }
|
||||||
|
end
|
||||||
|
|
||||||
-- Pre-compiled header
|
-- Pre-compiled header
|
||||||
pchheader "STDInclude.hpp" -- must be exactly same as used in #include directives
|
pchheader "STDInclude.hpp" -- must be exactly same as used in #include directives
|
||||||
pchsource "src/STDInclude.cpp" -- real path
|
pchsource "src/STDInclude.cpp" -- real path
|
||||||
|
@ -1,10 +1,3 @@
|
|||||||
// Uncomment that to see if we are preventing necessary libraries from being loaded
|
|
||||||
//#define DEBUG_LOAD_LIBRARY
|
|
||||||
|
|
||||||
// Log detections
|
|
||||||
// Make sure to disable that before releasig!
|
|
||||||
#define DEBUG_DETECTIONS
|
|
||||||
|
|
||||||
namespace Components
|
namespace Components
|
||||||
{
|
{
|
||||||
class AntiCheat : public Component
|
class AntiCheat : public Component
|
||||||
|
@ -144,9 +144,6 @@ using namespace std::literals;
|
|||||||
|
|
||||||
#define Assert_Size(x, size) static_assert(sizeof(x) == size, STRINGIZE(x) " structure has an invalid size.")
|
#define Assert_Size(x, size) static_assert(sizeof(x) == size, STRINGIZE(x) " structure has an invalid size.")
|
||||||
|
|
||||||
// Enable unit-test flag for release builds
|
|
||||||
//#define FORCE_UNIT_TESTS
|
|
||||||
|
|
||||||
// Resource stuff
|
// Resource stuff
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
Loading…
Reference in New Issue
Block a user