Skip to content

Commit

Permalink
Updated build script for disabling libui build on Apple M1 systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Oct 31, 2024
1 parent 290e81c commit 4b8eee5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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:")
Expand Down

0 comments on commit 4b8eee5

Please sign in to comment.