From 55d300d4370a1a1caf060ce727a6af5b9a8fd0f4 Mon Sep 17 00:00:00 2001 From: Qiu Yuzhou Date: Tue, 28 Mar 2017 23:34:30 +0800 Subject: [PATCH] Fix dependences error of ss-local. --- ShadowsocksX-NG/LaunchAgentUtils.swift | 3 ++- ShadowsocksX-NG/install_ss_local.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ShadowsocksX-NG/LaunchAgentUtils.swift b/ShadowsocksX-NG/LaunchAgentUtils.swift index 5cbfff5..7314e71 100644 --- a/ShadowsocksX-NG/LaunchAgentUtils.swift +++ b/ShadowsocksX-NG/LaunchAgentUtils.swift @@ -103,7 +103,8 @@ func InstallSSLocal() { let fileMgr = FileManager.default let homeDir = NSHomeDirectory() let appSupportDir = homeDir+APP_SUPPORT_DIR - if !fileMgr.fileExists(atPath: appSupportDir + "ss-local-\(SS_LOCAL_VERSION)/ss-local") { + if !fileMgr.fileExists(atPath: appSupportDir + "ss-local-\(SS_LOCAL_VERSION)/ss-local") + || !fileMgr.fileExists(atPath: appSupportDir + "ss-local-\(SS_LOCAL_VERSION)/libmbedcrypto.0.dylib") { let bundle = Bundle.main let installerPath = bundle.path(forResource: "install_ss_local.sh", ofType: nil) let task = Process.launchedProcess(launchPath: installerPath!, arguments: [""]) diff --git a/ShadowsocksX-NG/install_ss_local.sh b/ShadowsocksX-NG/install_ss_local.sh index 78eec6a..e37edc3 100755 --- a/ShadowsocksX-NG/install_ss_local.sh +++ b/ShadowsocksX-NG/install_ss_local.sh @@ -22,6 +22,7 @@ ln -s "$TargetDir" "$LatestTargetDir" cp -f libev.4.dylib "$TargetDir" cp -f libmbedcrypto.2.4.2.dylib "$TargetDir" +ln -s "$TargetDir/libmbedcrypto.2.4.2.dylib" "$TargetDir/libmbedcrypto.0.dylib" cp -f libpcre.1.dylib "$TargetDir" cp -f libsodium.18.dylib "$TargetDir" cp -f libudns.0.dylib "$TargetDir"