Update build.py

added a check of existance of build folder., and otherwise create it.
This commit is contained in:
xcalibure2
2024-10-16 21:09:52 +01:00
committed by GitHub
parent 797b1e59e1
commit 0582124092
+7 -3
View File
@@ -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()
link()