From 53aa6615397619ac4257ad782a84033bc953be5c Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Sat, 14 Dec 2024 00:32:00 +0800 Subject: [PATCH] Updated build script for Glfw inclusion in Windows target. --- build.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index 1075c1d..09ab1d5 100644 --- a/build.py +++ b/build.py @@ -34,13 +34,21 @@ os.makedirs(OUT_DIR) os.makedirs(TEMP_DIR) -os.makedirs(os.path.join('dist', 'n8lang', 'bin')) try: src = 'modules' + shutil.copytree( + src, + os.path.join(OUT_DIR, os.path.basename(src)), + dirs_exist_ok=True + ) - shutil.copytree(src, os.path.join(OUT_DIR, os.path.basename(src)), dirs_exist_ok=True) print(f"Successfully copied '{src}' to '{OUT_DIR}'") + os.makedirs(os.path.join('dist', 'n8lang', 'bin')) + os.makedirs(os.path.join( + 'dist', 'n8lang', 'modules', + 'core@1.0.0', 'lib' + )) except Exception as e: print("Failed to copy modules.") @@ -49,7 +57,11 @@ PLATFORM = platform.system() ARCH = platform.architecture()[0] OUTPUT_EXECUTABLE = os.path.join(OUT_DIR, 'bin', 'n8') -OUTPUT_LIBRARY = os.path.join(OUT_DIR, 'modules', 'core@1.0.0', 'lib', 'core') +OUTPUT_LIBRARY = os.path.join( + OUT_DIR, + 'modules', 'core@1.0.0', + 'lib', 'core' +) cpp_files = [] cc_files = []