diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2024-10-26 07:59:10 +0200 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2024-10-26 07:59:10 +0200 |
| commit | 05f085c9055fa5bd13bdba40fc40fb3f00d69fab (patch) | |
| tree | eccb2acb77b05c0e8ca073a3cea845acc0a35eec /tools/src/MakeFramework.cc | |
| parent | 0d0829659be019b3695795e1604d36591a3c3785 (diff) | |
IMP: Fixes and improvements.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'tools/src/MakeFramework.cc')
| -rw-r--r-- | tools/src/MakeFramework.cc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/src/MakeFramework.cc b/tools/src/MakeFramework.cc new file mode 100644 index 00000000..11077ddf --- /dev/null +++ b/tools/src/MakeFramework.cc @@ -0,0 +1,42 @@ +/* + * Created on Thu Oct 17 08:00:42 CEST 2024 + * + * Copyright (c) 2024 ZKA Web Services Co + */ + +#include <filesystem> +#include <framework.h> + +/// @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 Creation Tool.\n"; + std::cout << "make_framework: © ZKA Web Services Co, 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; +} |
