summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-11-25 09:25:59 +0000
committerDavid Robillard <d@drobilla.net>2011-11-25 09:25:59 +0000
commitbd85cff0cfe86d87cbe895ac0591d83f7e82c03b (patch)
treea9815c9d3d3db9a7b0500f38fa6beea3e08ddae2
parent7d019ef3ca1396e62049987b099c5c99616fb492 (diff)
downloadpatchage-bd85cff0cfe86d87cbe895ac0591d83f7e82c03b.tar.gz
patchage-bd85cff0cfe86d87cbe895ac0591d83f7e82c03b.tar.bz2
patchage-bd85cff0cfe86d87cbe895ac0591d83f7e82c03b.zip
Fix OSX bundle.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3629 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--osx/Info.plist.in5
-rwxr-xr-xosx/bundleify.sh14
-rw-r--r--src/main.cpp6
3 files changed, 17 insertions, 8 deletions
diff --git a/osx/Info.plist.in b/osx/Info.plist.in
index 691bf9d..e7a1249 100644
--- a/osx/Info.plist.in
+++ b/osx/Info.plist.in
@@ -22,5 +22,10 @@
<string>@PATCHAGE_VERSION@</string>
<key>CFBundleSignature</key>
<string>patc</string>
+ <key>LSEnvironment</key>
+ <dict>
+ <key>DYLD_LIBRARY_PATH</key>
+ <string>lib</string>
+ </dict>
</dict>
</plist>
diff --git a/osx/bundleify.sh b/osx/bundleify.sh
index caf4a26..cc72009 100755
--- a/osx/bundleify.sh
+++ b/osx/bundleify.sh
@@ -3,20 +3,24 @@
bundle=$1
exe=$2
-libs="`otool -L $exe | grep '\.dylib\|\.so' | grep '/User\|/opt/local' | sed 's/(.*//'`"
+libs="`otool -L $exe | grep '\.dylib\|\.so' | grep '/User\|/opt/local\|/usr/local' | sed 's/(.*//'`"
-mkdir "$bundle/Contents/lib"
+mkdir -p "$bundle/Contents/lib"
for l in $libs; do
cp $l $bundle/Contents/lib
done
-mkdir "$bundle/Contents/lib/engines"
+mkdir -p "$bundle/Contents/lib/engines"
cp /opt/local/lib/gtk-2.0/2.10.0/engines/libclearlooks.so $bundle/Contents/lib/engines
-mkdir "$bundle/Contents/lib/modules"
+mkdir -p "$bundle/Contents/lib/modules"
cp /opt/local/lib/pango/1.6.0/modules/*basic*.so $bundle/Contents/lib/modules
-reclibs="`otool -L $bundle/Contents/lib/engines/* $bundle/Contents/lib/modules/* | grep '\.dylib\|\.so' | grep '/User\|/opt/local' | sed 's/(.*//'`"
+reclibs="`otool -L $bundle/Contents/lib/* $bundle/Contents/lib/engines/* $bundle/Contents/lib/modules/* | grep '\.dylib\|\.so' | grep '/User\|/opt/local\|/usr/local' | sed 's/(.*//'`"
+
+for l in $reclibs; do
+ cp $l $bundle/Contents/lib
+done
for l in $libs $reclibs; do
lname=`echo $l | sed 's/.*\///'`
diff --git a/src/main.cpp b/src/main.cpp
index 750cb30..5b954bd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -41,9 +41,9 @@ set_bundle_environment()
const std::string bundle_path = binloc.substr(0, binloc.find_last_of('/'));
- const std::string gtk_path(bundle_path + "/lib");
- setenv("GTK_PATH", gtk_path.c_str(), 1);
- std::cout << "GTK PATH " << gtk_path << std::endl;
+ const std::string lib_path(bundle_path + "/lib");
+ setenv("GTK_PATH", lib_path.c_str(), 1);
+ setenv("DYLD_LIBRARY_PATH", lib_path.c_str(), 1);
chdir(bundle_path.c_str());
const std::string pangorc_path(bundle_path + "/Resources/pangorc");