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"