Embed libcrypto.1.0.0.dylib which been depand by ss-local.
This commit is contained in:
@ -40,6 +40,7 @@
|
||||
9B3FFF4C1D09D8F70019A709 /* install_helper.sh in Resources */ = {isa = PBXBuildFile; fileRef = 9B3FFF4B1D09D8F70019A709 /* install_helper.sh */; };
|
||||
9B3FFF4F1D09D9D50019A709 /* ProxyConfHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B3FFF4E1D09D9D50019A709 /* ProxyConfHelper.m */; };
|
||||
9B3FFF541D09E2D10019A709 /* proxy_conf_helper in Resources */ = {isa = PBXBuildFile; fileRef = 9B3FFF441D09CD3B0019A709 /* proxy_conf_helper */; };
|
||||
9BE8FBBF1D0B211600CAFD01 /* libcrypto.1.0.0.dylib in Resources */ = {isa = PBXBuildFile; fileRef = 9BE8FBBD1D0B1FB900CAFD01 /* libcrypto.1.0.0.dylib */; };
|
||||
9BEEF0691D04D4D500FC52B3 /* install_ss_local.sh in Resources */ = {isa = PBXBuildFile; fileRef = 9BEEF0651D04CB8500FC52B3 /* install_ss_local.sh */; };
|
||||
9BEEF06A1D04D4D500FC52B3 /* start_ss_local.sh in Resources */ = {isa = PBXBuildFile; fileRef = 9BEEF0661D04CE8D00FC52B3 /* start_ss_local.sh */; };
|
||||
9BEEF06B1D04D4D500FC52B3 /* stop_ss_local.sh in Resources */ = {isa = PBXBuildFile; fileRef = 9BEEF0671D04CE9A00FC52B3 /* stop_ss_local.sh */; };
|
||||
@ -148,6 +149,7 @@
|
||||
9B3FFF4E1D09D9D50019A709 /* ProxyConfHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProxyConfHelper.m; sourceTree = "<group>"; };
|
||||
9B3FFF501D09DAEA0019A709 /* proxy_conf_helper_version.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = proxy_conf_helper_version.h; sourceTree = "<group>"; };
|
||||
9B3FFF511D09DBA20019A709 /* ShadowsocksX-NG-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ShadowsocksX-NG-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
9BE8FBBD1D0B1FB900CAFD01 /* libcrypto.1.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libcrypto.1.0.0.dylib; sourceTree = "<group>"; };
|
||||
9BEEF0651D04CB8500FC52B3 /* install_ss_local.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = install_ss_local.sh; sourceTree = "<group>"; };
|
||||
9BEEF0661D04CE8D00FC52B3 /* start_ss_local.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = start_ss_local.sh; sourceTree = "<group>"; };
|
||||
9BEEF0671D04CE9A00FC52B3 /* stop_ss_local.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = stop_ss_local.sh; sourceTree = "<group>"; };
|
||||
@ -217,6 +219,7 @@
|
||||
9B07EFB01D048E900052D9DF /* Support Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BE8FBBD1D0B1FB900CAFD01 /* libcrypto.1.0.0.dylib */,
|
||||
9B172A6C1D0ADDDD00B87B9A /* Localizable.strings */,
|
||||
9B3FFF4B1D09D8F70019A709 /* install_helper.sh */,
|
||||
9B3FFF351D08CF110019A709 /* jquery.min.js */,
|
||||
@ -480,6 +483,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9BE8FBBF1D0B211600CAFD01 /* libcrypto.1.0.0.dylib in Resources */,
|
||||
9B3FFF541D09E2D10019A709 /* proxy_conf_helper in Resources */,
|
||||
9BEEF0691D04D4D500FC52B3 /* install_ss_local.sh in Resources */,
|
||||
9B172A6A1D0ADDDD00B87B9A /* Localizable.strings in Resources */,
|
||||
@ -878,6 +882,7 @@
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/system",
|
||||
"$(PROJECT_DIR)/ShadowsocksX-NG",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.qiuyuzhou.ShadowsocksX-NG";
|
||||
@ -903,6 +908,7 @@
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/system",
|
||||
"$(PROJECT_DIR)/ShadowsocksX-NG",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.qiuyuzhou.ShadowsocksX-NG";
|
||||
|
@ -125,6 +125,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
||||
|
||||
ProxyConfHelper.install()
|
||||
applyConfig()
|
||||
SyncSSLocal()
|
||||
}
|
||||
|
||||
func applicationWillTerminate(aNotification: NSNotification) {
|
||||
|
@ -21,7 +21,8 @@ func getFileSHA1Sum(filepath: String) -> String {
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
// Ref: https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html
|
||||
// Genarate the mac launch agent service plist
|
||||
func generateSSLocalLauchAgentPlist() -> Bool {
|
||||
let sslocalPath = NSHomeDirectory() + APP_SUPPORT_DIR + "ss-local"
|
||||
let logFilePath = NSHomeDirectory() + "/Library/Logs/ss-local.log"
|
||||
@ -42,13 +43,15 @@ func generateSSLocalLauchAgentPlist() -> Bool {
|
||||
}
|
||||
}
|
||||
|
||||
// For a complete listing of the keys, see the launchd.plist manual page.
|
||||
let dict: NSMutableDictionary = [
|
||||
"Label": "com.qiuyuzhou.shadowsocksX-NE.local",
|
||||
"WorkingDirectory": NSHomeDirectory() + APP_SUPPORT_DIR,
|
||||
"KeepAlive": true,
|
||||
"StandardOutPath": logFilePath,
|
||||
"StandardErrorPath": logFilePath,
|
||||
"ProgramArguments": arguments
|
||||
"ProgramArguments": arguments,
|
||||
"EnvironmentVariables": ["DYLD_LIBRARY_PATH": NSHomeDirectory() + APP_SUPPORT_DIR]
|
||||
]
|
||||
dict.writeToFile(plistFilepath, atomically: true)
|
||||
let Sha1Sum = getFileSHA1Sum(plistFilepath)
|
||||
@ -98,7 +101,9 @@ func StopSSLocal() {
|
||||
func InstallSSLocal() {
|
||||
let fileMgr = NSFileManager.defaultManager()
|
||||
let homeDir = NSHomeDirectory()
|
||||
if !fileMgr.fileExistsAtPath(homeDir+APP_SUPPORT_DIR+SS_LOCAL_VERSION+"/ss-local") {
|
||||
let appSupportDir = homeDir+APP_SUPPORT_DIR
|
||||
if !fileMgr.fileExistsAtPath(appSupportDir + SS_LOCAL_VERSION + "/ss-local")
|
||||
|| !fileMgr.fileExistsAtPath(appSupportDir + "libcrypto.1.0.0.dylib") {
|
||||
let bundle = NSBundle.mainBundle()
|
||||
let installerPath = bundle.pathForResource("install_ss_local.sh", ofType: nil)
|
||||
let task = NSTask.launchedTaskWithLaunchPath(installerPath!, arguments: [""])
|
||||
|
@ -12,6 +12,7 @@ mkdir -p "$HOME/Library/Application Support/ShadowsocksX-NE/ss-local-2.4.6"
|
||||
cp -f ss-local "$HOME/Library/Application Support/ShadowsocksX-NE/ss-local-2.4.6/"
|
||||
rm -f "$HOME/Library/Application Support/ShadowsocksX-NE/ss-local"
|
||||
ln -s "$HOME/Library/Application Support/ShadowsocksX-NE/ss-local-2.4.6/ss-local" "$HOME/Library/Application Support/ShadowsocksX-NE/ss-local"
|
||||
#cp -f "com.qiuyuzhou.shadowsocksX-NE.local.plist" "$HOME/Library/LaunchAgents/"
|
||||
|
||||
cp -f libcrypto.1.0.0.dylib "$HOME/Library/Application Support/ShadowsocksX-NE/"
|
||||
|
||||
echo done
|
BIN
ShadowsocksX-NG/libcrypto.1.0.0.dylib
Normal file
BIN
ShadowsocksX-NG/libcrypto.1.0.0.dylib
Normal file
Binary file not shown.
Reference in New Issue
Block a user