Skip to content

Commit

Permalink
Add x86_64 architecture support for 'formats' extension
Browse files Browse the repository at this point in the history
Related: #3796
  • Loading branch information
lucydodo committed Nov 12, 2024
1 parent a7e35c2 commit f37031e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion installer/macos/notarize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ for TARGET in $(find build -name "DB Browser for SQL*.app" | sed -e 's/ /_/g');
TARGET=$(echo $TARGET | sed -e 's/_/ /g')
mkdir "$TARGET/Contents/Extensions"

clang -I /opt/homebrew/opt/sqlb-sqlite/include -L /opt/homebrew/opt/sqlb-sqlite/lib -fno-common -dynamiclib src/extensions/extension-formats.c -o "$TARGET/Contents/Extensions/formats.dylib"
arch -x86_64 clang -I /opt/homebrew/opt/sqlb-sqlite/include -L /opt/homebrew/opt/sqlb-sqlite/lib -fno-common -dynamiclib src/extensions/extension-formats.c -o formats_x86_64.dylib
clang -I /opt/homebrew/opt/sqlb-sqlite/include -L /opt/homebrew/opt/sqlb-sqlite/lib -fno-common -dynamiclib src/extensions/extension-formats.c -o formats_arm64.dylib
lipo -create formats_x86_64.dylib formats_arm64.dylib -output "$TARGET/Contents/Extensions/formats.dylib"

if [ -f "$TARGET/Contents/Extensions/formats.dylib" ]; then
install_name_tool -id "@executable_path/../Extensions/formats.dylib" "$TARGET/Contents/Extensions/formats.dylib"
ln -s formats.dylib "$TARGET/Contents/Extensions/formats.dylib.dylib"
Expand Down

0 comments on commit f37031e

Please sign in to comment.