From 0582124092d5d7eec47416aa2a1f4fe00fe2b5ea Mon Sep 17 00:00:00 2001 From: xcalibure2 <104156209+xcalibure2@users.noreply.github.com> Date: Wed, 16 Oct 2024 21:09:52 +0100 Subject: [PATCH] Update build.py added a check of existance of build folder., and otherwise create it. --- build.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index 5acf141..050168b 100644 --- a/build.py +++ b/build.py @@ -34,11 +34,15 @@ WIN_MAIN = "int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PW # ----------- # - - def LOG_OUTPUT(string): print(f"[BUILD] {string}") +# check if build folder exists and otherwise create it +if not os.path.exists(BUILD_DIR): + os.makedirs(BUILD_DIR) + LOG_OUTPUT(f"Folder '{BUILD_DIR}' created.") +else: + LOG_OUTPUT(f"Folder '{BUILD_DIR}' already exists.") def generate_random_key(length): return get_random_bytes(length) @@ -194,4 +198,4 @@ if __name__ == '__main__': prepare_src_shellcode() build_resource() build_cpp_src() - link() \ No newline at end of file + link()