From 4b8eee50a30f7a202a69a14612a94d9238549413 Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Fri, 1 Nov 2024 04:03:00 +0800 Subject: [PATCH] Updated build script for disabling libui build on Apple M1 systems. --- build.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build.py b/build.py index b588339..d1c599f 100644 --- a/build.py +++ b/build.py @@ -46,6 +46,7 @@ cc_files = [] def get_ext_instructions(): + print('Checking extended instruction availability...') features_to_check = [ "mmx", "sse", "sse2", "sse3", "sse4", "sse4_1", "sse4_2", @@ -77,7 +78,7 @@ def download_libui(): zip_path = url.split('/')[-1] - print('Downloading file...') + print('Downloading libui release...') response = requests.get(url) with open(zip_path, 'wb') as file: file.write(response.content) @@ -238,11 +239,15 @@ def download_libui(): core_build_args = exe_build_args + ['-shared', '-o', OUTPUT_CORE] exe_build_args += ['-o', OUTPUT_EXECUTABLE] + libui_dylib = ( + '' if PLATFORM == 'Darwin' and platform.machine() == 'arm64' + else os.path.join(OUT_DIR, 'libui.dylib') + ) lib_build_args = [ '/opt/homebrew/opt/llvm/bin/clang++', '-Iinclude', '-Ilib', '-I' + os.path.join(TEMP_DIR, 'include'), '-shared', '-o', OUTPUT_LIBRARY + '.dylib', OUTPUT_CORE, - os.path.join(OUT_DIR, 'libui.dylib') + libui_dylib ] + cc_files print("Executing:")