diff options
-rw-r--r-- | Build/OSXMkLibs.hs | 12 | ||||
-rwxr-xr-x | standalone/osx/git-annex.app/Contents/MacOS/runshell | 18 |
2 files changed, 6 insertions, 24 deletions
diff --git a/Build/OSXMkLibs.hs b/Build/OSXMkLibs.hs index 23a824ced..ef3b6701a 100644 --- a/Build/OSXMkLibs.hs +++ b/Build/OSXMkLibs.hs @@ -29,12 +29,11 @@ import qualified Data.Set as S type LibMap = M.Map FilePath String {- Recursively find and install libs, until nothing new to install is found. -} -mklibs :: FilePath -> [FilePath] -> LibMap -> IO [FilePath] +mklibs :: FilePath -> [FilePath] -> LibMap -> IO () mklibs appbase libdirs libmap = do (new, libmap') <- installLibs appbase libmap - if null new - then return (libdirs++new) - else mklibs appbase (libdirs++new) libmap' + unless null new $ + mklibs appbase (libdirs++new) libmap' {- Returns directories into which new libs were installed. -} installLibs :: FilePath -> LibMap -> IO ([FilePath], LibMap) @@ -115,7 +114,4 @@ main :: IO () main = getArgs >>= go where go [] = error "specify OSXAPP_BASE" - go (appbase:_) = do - libdirs <- mklibs appbase [] M.empty - writeFile (appbase </> "libdirs") $ - unlines $ nub libdirs + go (appbase:_) = mklibs appbase [] M.empty diff --git a/standalone/osx/git-annex.app/Contents/MacOS/runshell b/standalone/osx/git-annex.app/Contents/MacOS/runshell index e972b777f..03b6befdf 100755 --- a/standalone/osx/git-annex.app/Contents/MacOS/runshell +++ b/standalone/osx/git-annex.app/Contents/MacOS/runshell @@ -1,6 +1,6 @@ #!/bin/sh -# Runs a shell command (or interactive shell) using the binaries and -# libraries bundled with this app. +# Runs a shell command (or interactive shell) using the binaries +# bundled with this app. set -e @@ -46,20 +46,6 @@ export ORIG_PATH PATH=$base/bin:$PATH export PATH -# This makes the linker first look in the library directories bundled -# in this app. Only if it fails to find a library there will a system -# library be used. -# -# This seems to work better than DYLD_LIBRARY_PATH, which can force -# the wrong version of a library to be used, if the app bundles two -# different versions of a single library. And it seems to work better -# than DYLD_FALLBACK_LIBRARY_PATH, which fails to override old system -# versions of libraries when a program in the app needs a newer version. -#ORIG_DYLD_ROOT_PATH="$DYLD_ROOT_PATH" -#export ORIG_DYLD_ROOT_PATH -#DYLD_ROOT_PATH=$base -#export DYLD_ROOT_PATH - ORIG_GIT_EXEC_PATH="$GIT_EXEC_PATH" export ORIG_GIT_EXEC_PATH GIT_EXEC_PATH=$base |