diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/common_zka.hxx | 7 | ||||
| -rw-r--r-- | tools/framework.hxx | 13 | ||||
| -rw-r--r-- | tools/make_framework.json | 13 | ||||
| -rw-r--r-- | tools/make_zxd.json | 13 | ||||
| -rw-r--r-- | tools/src/make_framework.cxx | 42 | ||||
| -rw-r--r-- | tools/src/make_zxd.cxx (renamed from tools/src/zxdmake.cxx) | 4 | ||||
| -rw-r--r-- | tools/zxd.hxx | 10 | ||||
| -rw-r--r-- | tools/zxdmake.json | 19 |
8 files changed, 92 insertions, 29 deletions
diff --git a/tools/common_zka.hxx b/tools/common_zka.hxx new file mode 100644 index 00000000..3b7a1b19 --- /dev/null +++ b/tools/common_zka.hxx @@ -0,0 +1,7 @@ +#include <cstdint> +#include <iostream> +#include <fstream> +#include <string> +#include <cstring> +#include <sstream> +#include <filesystem> diff --git a/tools/framework.hxx b/tools/framework.hxx new file mode 100644 index 00000000..555f7aae --- /dev/null +++ b/tools/framework.hxx @@ -0,0 +1,13 @@ +/** + Thu Oct 17 07:57:43 CEST 2024 + (C) ZKA Technologies. +*/ + +#pragma once + +#include <common_zka.hxx> + +#define kFKDLLDirectory "ZKA/DLL/" +#define kFKManifestDirectory "ZKA/Manifests/" +#define kFKRootDirectory "ZKA/" +#define kFKExtension ".framework" diff --git a/tools/make_framework.json b/tools/make_framework.json new file mode 100644 index 00000000..c597e5d6 --- /dev/null +++ b/tools/make_framework.json @@ -0,0 +1,13 @@ +{ + "compiler_path": "g++", + "compiler_std": "c++20", + "headers_path": ["./"], + "sources_path": ["src/make_framework.cxx"], + "output_name": "make_framework.exe", + "cpp_macros": [ + "__MKF_AMD64__", + "cMKFVersion=0x0100", + "cMKFVersionHighest=0x0100", + "cMKFVersionLowest=0x0100" + ] +} diff --git a/tools/make_zxd.json b/tools/make_zxd.json new file mode 100644 index 00000000..1c25c1a2 --- /dev/null +++ b/tools/make_zxd.json @@ -0,0 +1,13 @@ +{ + "compiler_path": "g++", + "compiler_std": "c++20", + "headers_path": ["./"], + "sources_path": ["src/make_zxd.cxx"], + "output_name": "make_zxd.exe", + "cpp_macros": [ + "__DRVSIGN_AMD64__", + "cDSVersion=0x0100", + "cDSVersionHighest=0x0100", + "cDSVersionLowest=0x0100" + ] +} diff --git a/tools/src/make_framework.cxx b/tools/src/make_framework.cxx new file mode 100644 index 00000000..3d719529 --- /dev/null +++ b/tools/src/make_framework.cxx @@ -0,0 +1,42 @@ +/* + * Created on Thu Oct 17 08:00:42 CEST 2024 + * + * Copyright (c) 2024 ZKA Technologies + */ + +#include <filesystem> +#include <framework.hxx> + +/// @brief This program converts a PE32+ driver, into a custom format, the ZXD. +/// @note ZXD is a format for ZKA signed drivers. +int main(int argc, char* argv[]) +{ + for (size_t i = 1ul; i < argc; ++i) + { + if (strcmp(argv[i], "/?") == 0) + { + std::cout << "make_framework: Framework Tool.\n"; + std::cout << "make_framework: © ZKA Technologies, all rights reserved.\n"; + + return 0; + } + } + + auto path = std::string(argv[1]); + + if (!path.ends_with(kFKExtension)) + return 1; + + std::filesystem::path path_arg = path; + + if (std::filesystem::create_directory(path_arg)) + { + std::filesystem::create_directory(path_arg / kFKRootDirectory); + std::filesystem::create_directory(path_arg / kFKManifestDirectory); + std::filesystem::create_directory(path_arg / kFKDLLDirectory); + + return 0; + } + + return 1; +} diff --git a/tools/src/zxdmake.cxx b/tools/src/make_zxd.cxx index 8a3276ff..2a456e28 100644 --- a/tools/src/zxdmake.cxx +++ b/tools/src/make_zxd.cxx @@ -14,8 +14,8 @@ int main(int argc, char* argv[]) { if (strcmp(argv[i], "/?") == 0) { - std::cout << "zxdmake: ZKA ZXD Driver Tool.\n"; - std::cout << "zxdmake: © ZKA Technologies, all rights reserved.\n"; + std::cout << "make_zxd: ZXD Tool.\n"; + std::cout << "make_zxd: © ZKA Technologies, all rights reserved.\n"; return 0; } diff --git a/tools/zxd.hxx b/tools/zxd.hxx index 123c9124..bf942241 100644 --- a/tools/zxd.hxx +++ b/tools/zxd.hxx @@ -6,13 +6,7 @@ #pragma once -#include <cstdint> -#include <iostream> -#include <fstream> -#include <string> -#include <cstring> -#include <sstream> -#include <filesystem> +#include <common_zka.hxx> #define kDriverSignedExt ".zxd" #define kDriverExt ".sys" @@ -53,4 +47,4 @@ namespace ZXD return mz_blob[0] == 'M' && mz_blob[1] == 'Z'; } -} // namespace ZXD
\ No newline at end of file +} // namespace ZXD diff --git a/tools/zxdmake.json b/tools/zxdmake.json deleted file mode 100644 index d24a5de9..00000000 --- a/tools/zxdmake.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compiler_path": "x86_64-w64-mingw32-g++.exe", - "compiler_std": "c++20", - "headers_path": [ "../", "./", "../../" ], - "sources_path": [ "src/zxdmake.cxx" ], - "output_name": "zxdmake.exe", - "compiler_flags": [ - "-ffreestanding", - "-fno-rtti", - "-fno-exceptions", - "-Wl,--subsystem=17" - ], - "cpp_macros": [ - "__DRVSIGN_AMD64__", - "cDSVersion=0x0100", - "cDSVersionHighest=0x0100", - "cDSVersionLowest=0x0100" - ] -} |
