Skip to content

Commit c0d198a

Browse files
author
Paweł Salawa
committed
Attempt to fix MacOS build for plugins
1 parent aa96baa commit c0d198a

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

SQLiteStudio3/create_macosx_bundle.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,33 @@ function fixPluginPaths() {
9393
}
9494
fixPluginPaths SQLiteStudio.app/Contents/PlugIns
9595

96+
fixPluginLibPath() {
97+
local PLUGIN="$1"
98+
local LIBNAME="$2"
99+
100+
if [ -z "$PLUGIN" ] || [ -z "$LIBNAME" ]; then
101+
echo "Usage: fixPluginLibPath <plugin.dylib> <libname.dylib>"
102+
return 1
103+
fi
104+
105+
# Znalezienie aktualnego wpisu z otool -L
106+
local OLD
107+
OLD=$(otool -L "$PLUGIN" | awk -v lib="$LIBNAME" '$1 ~ lib {print $1; exit}')
108+
109+
if [ -z "$OLD" ]; then
110+
echo "WARNING: Library $LIBNAME not found in $PLUGIN"
111+
return 0
112+
fi
113+
114+
# Nowa ścieżka
115+
local NEW="@rpath/$LIBNAME"
116+
117+
echo "Fixing $PLUGIN: $OLD$NEW"
118+
install_name_tool -change "$OLD" "$NEW" "$PLUGIN"
119+
}
120+
fixPluginLibPath SQLiteStudio.app/Contents/PlugIns/libDbSqliteCipher.dylib libcrypto.3.dylib
121+
fixPluginLibPath SQLiteStudio.app/Contents/PlugIns/libScriptingTcl.dylib libtcl8.6.dylib
122+
96123
function replaceInfo() {
97124
cdir=`pwd`
98125
echo Replacing Info.plist

0 commit comments

Comments
 (0)