Updates SwiftOpenCC.
This commit is contained in:
parent
789ea50213
commit
1f8cd8d06f
|
@ -49,7 +49,6 @@
|
||||||
6AFF97F3253B299E007F1C49 /* OVNonModalAlertWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6AFF97F1253B299E007F1C49 /* OVNonModalAlertWindowController.m */; };
|
6AFF97F3253B299E007F1C49 /* OVNonModalAlertWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6AFF97F1253B299E007F1C49 /* OVNonModalAlertWindowController.m */; };
|
||||||
D427A9C125ED28CC005D43E0 /* OpenCCBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = D427A9C025ED28CC005D43E0 /* OpenCCBridge.swift */; };
|
D427A9C125ED28CC005D43E0 /* OpenCCBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = D427A9C025ED28CC005D43E0 /* OpenCCBridge.swift */; };
|
||||||
D48550A325EBE689006A204C /* OpenCC in Frameworks */ = {isa = PBXBuildFile; productRef = D48550A225EBE689006A204C /* OpenCC */; };
|
D48550A325EBE689006A204C /* OpenCC in Frameworks */ = {isa = PBXBuildFile; productRef = D48550A225EBE689006A204C /* OpenCC */; };
|
||||||
E7582E69262A528E0003B31B /* OpenCCDictionary.bundle in Embed PlugIns */ = {isa = PBXBuildFile; fileRef = E7582E68262A528E0003B31B /* OpenCCDictionary.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
@ -69,20 +68,6 @@
|
||||||
};
|
};
|
||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
|
||||||
D48550BE25EC0D97006A204C /* Embed PlugIns */ = {
|
|
||||||
isa = PBXCopyFilesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
dstPath = "";
|
|
||||||
dstSubfolderSpec = 13;
|
|
||||||
files = (
|
|
||||||
E7582E69262A528E0003B31B /* OpenCCDictionary.bundle in Embed PlugIns */,
|
|
||||||
);
|
|
||||||
name = "Embed PlugIns";
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXCopyFilesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
6A0421A615FEF3F50061ED63 /* FastLM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FastLM.cpp; sourceTree = "<group>"; };
|
6A0421A615FEF3F50061ED63 /* FastLM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FastLM.cpp; sourceTree = "<group>"; };
|
||||||
6A0421A715FEF3F50061ED63 /* FastLM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FastLM.h; sourceTree = "<group>"; };
|
6A0421A715FEF3F50061ED63 /* FastLM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FastLM.h; sourceTree = "<group>"; };
|
||||||
|
@ -227,6 +212,7 @@
|
||||||
6AFF97F1253B299E007F1C49 /* OVNonModalAlertWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OVNonModalAlertWindowController.m; sourceTree = "<group>"; };
|
6AFF97F1253B299E007F1C49 /* OVNonModalAlertWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OVNonModalAlertWindowController.m; sourceTree = "<group>"; };
|
||||||
D427A9BF25ED28CC005D43E0 /* McBopomofo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "McBopomofo-Bridging-Header.h"; sourceTree = "<group>"; };
|
D427A9BF25ED28CC005D43E0 /* McBopomofo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "McBopomofo-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||||
D427A9C025ED28CC005D43E0 /* OpenCCBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenCCBridge.swift; sourceTree = "<group>"; };
|
D427A9C025ED28CC005D43E0 /* OpenCCBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenCCBridge.swift; sourceTree = "<group>"; };
|
||||||
|
D47412EF273BFBFB0036C336 /* OpenCCDictionary.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = OpenCCDictionary.bundle; path = "../../Library/Developer/Xcode/DerivedData/McBopomofo-czkkfmaoaedhszarcriztoynjmen/SourcePackages/checkouts/SwiftyOpenCC/OpenCCDictionary.bundle"; sourceTree = "<group>"; };
|
||||||
E7582E68262A528E0003B31B /* OpenCCDictionary.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = OpenCCDictionary.bundle; path = "../../../Library/Developer/Xcode/DerivedData/McBopomofo-cqkraatnslbuvlhcaetfahesllst/SourcePackages/checkouts/SwiftyOpenCC/OpenCCDictionary.bundle"; sourceTree = "<group>"; };
|
E7582E68262A528E0003B31B /* OpenCCDictionary.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = OpenCCDictionary.bundle; path = "../../../Library/Developer/Xcode/DerivedData/McBopomofo-cqkraatnslbuvlhcaetfahesllst/SourcePackages/checkouts/SwiftyOpenCC/OpenCCDictionary.bundle"; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
@ -274,6 +260,7 @@
|
||||||
6A0D4EA515FC0D2D00ABF4B3 /* Frameworks */ = {
|
6A0D4EA515FC0D2D00ABF4B3 /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
D47412EF273BFBFB0036C336 /* OpenCCDictionary.bundle */,
|
||||||
6A0D4EA915FC0D2D00ABF4B3 /* AppKit.framework */,
|
6A0D4EA915FC0D2D00ABF4B3 /* AppKit.framework */,
|
||||||
6A38BC2915FC161000A8A51F /* Carbon.framework */,
|
6A38BC2915FC161000A8A51F /* Carbon.framework */,
|
||||||
6A0D4EA615FC0D2D00ABF4B3 /* Cocoa.framework */,
|
6A0D4EA615FC0D2D00ABF4B3 /* Cocoa.framework */,
|
||||||
|
@ -526,7 +513,6 @@
|
||||||
6A0D4E9E15FC0D2D00ABF4B3 /* Sources */,
|
6A0D4E9E15FC0D2D00ABF4B3 /* Sources */,
|
||||||
6A0D4E9F15FC0D2D00ABF4B3 /* Frameworks */,
|
6A0D4E9F15FC0D2D00ABF4B3 /* Frameworks */,
|
||||||
6A0D4EA015FC0D2D00ABF4B3 /* Resources */,
|
6A0D4EA015FC0D2D00ABF4B3 /* Resources */,
|
||||||
D48550BE25EC0D97006A204C /* Embed PlugIns */,
|
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
|
@ -1146,8 +1132,8 @@
|
||||||
isa = XCRemoteSwiftPackageReference;
|
isa = XCRemoteSwiftPackageReference;
|
||||||
repositoryURL = "https://github.com/ddddxxx/SwiftyOpenCC.git";
|
repositoryURL = "https://github.com/ddddxxx/SwiftyOpenCC.git";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = upToNextMajorVersion;
|
kind = revision;
|
||||||
minimumVersion = 1.0.1;
|
revision = 1d8105a0f7199c90af722bff62728050c858e777;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/* End XCRemoteSwiftPackageReference section */
|
/* End XCRemoteSwiftPackageReference section */
|
||||||
|
|
|
@ -8,14 +8,7 @@ class OpenCCBridge : NSObject {
|
||||||
private var conveter: ChineseConverter?
|
private var conveter: ChineseConverter?
|
||||||
|
|
||||||
override init() {
|
override init() {
|
||||||
let mainBundle = Bundle.main
|
try? conveter = ChineseConverter(options: .simplify)
|
||||||
let dictionaryBundleUrl = mainBundle.bundleURL
|
|
||||||
.appendingPathComponent("Contents", isDirectory: true)
|
|
||||||
.appendingPathComponent("Plugins", isDirectory: true)
|
|
||||||
.appendingPathComponent("OpenCCDictionary.bundle")
|
|
||||||
if let dictionaryBundle = Bundle(url:dictionaryBundleUrl) {
|
|
||||||
try? conveter = ChineseConverter(bundle: dictionaryBundle, option: .simplify)
|
|
||||||
}
|
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue