├── .gitignore
├── .gitmodules
├── Application
├── AppDelegate.swift
├── Base.lproj
│ └── Main.storyboard
├── Info.plist
├── LanguageTable.swift
├── LanguageView.swift
├── MainView.swift
├── PersistenceView.swift
├── RLWTable.swift
├── RecentlyLearnedWordsView.swift
├── SettingsModel.swift
├── SettingsView.swift
└── VarnamApp.entitlements
├── Common
├── Common.swift
├── Config.swift
├── Logger.swift
└── VarnamConfig.swift
├── GoVarnam
├── .gitignore
├── Varnam.swift
├── build_govarnam.sh
├── govarnam-Bridging-Header.h
└── update_assets.py
├── Input Source
├── AppDelegate.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── icon_1024.png
│ │ ├── icon_128.png
│ │ ├── icon_16x16.png
│ │ ├── icon_256.png
│ │ ├── icon_32.png
│ │ ├── icon_512.png
│ │ └── icon_64.png
│ └── Contents.json
├── AsyncDispatcher.swift
├── ClientManager.swift
├── Flag.psd
├── Info.plist
├── MainMenu.xib
├── TrayIcon.icns
├── VarnamController.swift
└── VarnamIME.entitlements
├── Installation
├── Assets
│ ├── Conclusion.rtfd
│ │ ├── Screenshot 2021-11-14 at 7.14.26 PM.png
│ │ └── TXT.rtf
│ └── Welcome.rtfd
│ │ ├── TXT.rtf
│ │ └── icon_64.png
├── InputSource.swift
├── Scripts
│ ├── postinstall
│ └── preinstall
├── VarnamIME.pkgproj
├── build
└── main.swift
├── LICENSE
├── README.md
└── VarnamIME.xcodeproj
├── project.pbxproj
├── project.xcworkspace
├── contents.xcworkspacedata
└── xcshareddata
│ └── IDEWorkspaceChecks.plist
└── xcshareddata
└── xcschemes
└── VarnamIME.xcscheme
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | xcuserdata
3 | *.xccheckout
4 | *.swp
5 | *.lock
6 | *.app
7 | *.pkg
8 | profile
9 | *~.nib
10 | /build
11 | installer
12 | LipikaEngine_OSX.framework
13 | ShortcutRecorder.framework
14 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "GoVarnam/govarnam"]
2 | path = GoVarnam/govarnam
3 | url = https://github.com/varnamproject/govarnam.git
4 | [submodule "GoVarnam/schemes"]
5 | path = GoVarnam/schemes
6 | url = https://github.com/varnamproject/schemes.git
7 | [submodule "ShortcutRecorder"]
8 | path = ShortcutRecorder
9 | url = https://github.com/Kentzo/ShortcutRecorder.git
10 |
--------------------------------------------------------------------------------
/Application/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamApp is companion application for VarnamIME.
3 | * Copyright (C) 2018 Ranganath Atreya
4 | *
5 | * This program is distributed in the hope that it will be useful,
6 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 | */
9 |
10 | import Cocoa
11 | import SwiftUI
12 |
13 | @NSApplicationMain
14 | class AppDelegate: NSObject, NSApplicationDelegate {
15 | var window: NSWindow!
16 | func applicationDidFinishLaunching(_ aNotification: Notification) {
17 | // Create the SwiftUI view that provides the window contents.
18 | let contentView = MainView()
19 |
20 | // Create the window and set the content view.
21 | window = NSWindow(
22 | contentRect: NSRect(x: 0, y: 0, width: 700, height: 580),
23 | styleMask: [.titled, .closable, .miniaturizable, .fullSizeContentView],
24 | backing: .buffered, defer: false)
25 | window.title = "VarnamApp"
26 | window.setFrameAutosaveName("VarnamApp")
27 | window.contentView = NSHostingView(rootView: contentView)
28 | window.titlebarAppearsTransparent = true
29 | window.makeKeyAndOrderFront(nil)
30 | window.center()
31 | }
32 |
33 | func applicationWillTerminate(_ aNotification: Notification) {
34 | // Insert code here to tear down your application
35 | }
36 |
37 | @IBAction func showUserGroup(_ sender: NSMenuItem) {
38 | NSWorkspace.shared.open(URL(string: "http://facebook.com/groups/varnam.ime")!)
39 | }
40 |
41 | @IBAction func showReleaseNotes(_ sender: NSMenuItem) {
42 | NSWorkspace.shared.open(URL(string: "https://github.com/varnamproject/varnam-macOS/releases")!)
43 | }
44 |
45 | @IBAction func reportIssue(_ sender: NSMenuItem) {
46 | NSWorkspace.shared.open(URL(string: "https://github.com/varnamproject/varnam-macOS/issues/new")!)
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Application/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
--------------------------------------------------------------------------------
/Application/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(MARKETING_VERSION)
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | LSApplicationCategoryType
24 | public.app-category.utilities
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSHumanReadableCopyright
28 | Copyright © 2018 Daivajnanam, © 2021 Subin Siby. All rights reserved.
29 | NSMainStoryboardFile
30 | Main
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Application/LanguageTable.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamApp is companion application for VarnamIME.
3 | * Copyright (C) 2020 Ranganath Atreya - LipikaIME
4 | * Copyright (C) 2021 Subin Siby - VarnamIME
5 | *
6 | * This program is distributed in the hope that it will be useful,
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 | */
10 |
11 | import SwiftUI
12 | import ShortcutRecorder
13 |
14 | struct ShortcutView: View {
15 | @Binding var modifier: String
16 | @Binding var key: String
17 |
18 | var body: some View {
19 | HStack {
20 | MenuButton(modifier) {
21 | ForEach (["⌘", "⌥", "⌃", "⇧"], id: \.self) { (item) in
22 | Button(item) { self.modifier = item }
23 | }
24 | }.fixedSize()
25 | TextField("", text: $key).fixedSize()
26 | }
27 | }
28 | }
29 |
30 |
31 | struct LanguageTable: NSViewControllerRepresentable {
32 | @Binding var mappings: [LanguageConfig]
33 | typealias NSViewControllerType = LanguageTableController
34 |
35 | func makeNSViewController(context: Context) -> LanguageTableController {
36 | return LanguageTableController(self)
37 | }
38 |
39 | func updateNSViewController(_ nsViewController: LanguageTableController, context: Context) {
40 | if nsViewController.mappings != mappings {
41 | nsViewController.mappings = mappings
42 | nsViewController.table.reloadData()
43 | }
44 | }
45 | }
46 |
47 | class ShortcutModel: NSObject {
48 | private let row: Int
49 | private unowned let controller: LanguageTableController
50 |
51 | init(forRow row: Int, ofController controller: LanguageTableController) {
52 | self.row = row
53 | self.controller = controller
54 | }
55 |
56 | @objc func shortcut() -> Shortcut? {
57 | if let key = controller.mappings[row].shortcutKey, let modifiers = controller.mappings[row].shortcutModifiers {
58 | let keyCode = ASCIILiteralKeyCodeTransformer.shared.reverseTransformedValue(key) as! UInt16
59 | return Shortcut(code: KeyCode(rawValue: keyCode)!, modifierFlags: NSEvent.ModifierFlags(rawValue: modifiers), characters: nil, charactersIgnoringModifiers: nil)
60 | }
61 | return nil
62 | }
63 |
64 | @objc func setShortcut(_ shortcut: Any?) {
65 | guard let shortcut = shortcut as? Shortcut? else {
66 | // Bug: key-value coding is calling this method with member variables of Shortcut as well
67 | return
68 | }
69 | if let shortcut = shortcut {
70 | controller.mappings[row].shortcutKey = ASCIILiteralKeyCodeTransformer.shared.transformedValue(shortcut.keyCode.rawValue as NSNumber)
71 | controller.mappings[row].shortcutModifiers = shortcut.modifierFlags.rawValue
72 | }
73 | else {
74 | controller.mappings[row].shortcutKey = nil
75 | controller.mappings[row].shortcutModifiers = nil
76 | }
77 | controller.updateWrapper()
78 | }
79 | }
80 |
81 | class LanguageTableController: NSViewController, NSTableViewDelegate, NSTableViewDataSource, NSTextFieldDelegate {
82 | private var wrapper: LanguageTable
83 | private var dragDropType = NSPasteboard.PasteboardType(rawValue: "private.table-row")
84 | var table = NSTableView()
85 | var mappings: [LanguageConfig]
86 |
87 | init(_ wrapper: LanguageTable) {
88 | self.wrapper = wrapper
89 | self.mappings = wrapper.mappings
90 | super.init(nibName: nil, bundle: nil)
91 | }
92 |
93 | required init?(coder: NSCoder) {
94 | fatalError("init(coder:) has not been implemented")
95 | }
96 |
97 | override func loadView() {
98 | self.view = NSView()
99 | view.autoresizesSubviews = true
100 |
101 | let columns = [
102 | (title: "Identifier", width: 120.0, tooltip: "Factory name for language"),
103 | (title: "Display Name", width: 240.0, tooltip: "Custom name for language"),
104 | (title: "Shortcut", width: 145.0, tooltip: "Shortcut to select language"),
105 | (title: "Enabled", width: 60.0, tooltip: "Show language in IME menu"),
106 | ]
107 | for column in columns {
108 | let tableColumn = NSTableColumn()
109 | tableColumn.headerCell.title = column.title
110 | tableColumn.headerCell.alignment = .center
111 | tableColumn.identifier = NSUserInterfaceItemIdentifier(rawValue: column.title)
112 | tableColumn.width = CGFloat(column.width)
113 | tableColumn.headerToolTip = column.tooltip
114 | table.addTableColumn(tableColumn)
115 | }
116 | table.allowsColumnResizing = false
117 | table.allowsColumnSelection = false
118 | table.allowsMultipleSelection = false
119 | table.allowsColumnReordering = false
120 | table.allowsEmptySelection = true
121 | table.allowsTypeSelect = false
122 | table.usesAlternatingRowBackgroundColors = true
123 | table.intercellSpacing = NSSize(width: 15, height: 7)
124 |
125 | let scroll = NSScrollView()
126 | scroll.documentView = table
127 | scroll.hasVerticalScroller = true
128 | scroll.autoresizingMask = [.height, .width]
129 | scroll.borderType = .bezelBorder
130 | view.addSubview(scroll)
131 | }
132 |
133 | override func viewDidLoad() {
134 | super.viewDidLoad()
135 | table.delegate = self
136 | table.dataSource = self
137 | table.registerForDraggedTypes([dragDropType])
138 | }
139 |
140 | // NSTableViewDelegate
141 | func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
142 | switch tableColumn?.title {
143 | case "Identifier":
144 | let id = NSTextField()
145 | id.identifier = tableColumn!.identifier
146 | id.isEditable = false
147 | id.drawsBackground = false
148 | id.isBordered = false
149 | return id
150 | case "Display Name":
151 | let language = NSTextField()
152 | language.identifier = tableColumn!.identifier
153 | language.delegate = self
154 | return language
155 | case "Shortcut":
156 | let shortcut = RecorderControl()
157 | shortcut.bind(.value, to: ShortcutModel(forRow: row, ofController: self), withKeyPath: "shortcut", options: nil)
158 | shortcut.identifier = tableColumn!.identifier
159 | return shortcut
160 | case "Enabled":
161 | let isEnabled = NSButton(checkboxWithTitle: "", target: self, action: #selector(self.onChange(receiver:)))
162 | isEnabled.identifier = tableColumn!.identifier
163 | return isEnabled
164 | default:
165 | Logger.log.fatal("Unknown column title \(tableColumn!.title)")
166 | fatalError()
167 | }
168 | }
169 |
170 | func tableView(_ tableView: NSTableView, heightOfRow row: Int) -> CGFloat {
171 | return 25
172 | }
173 |
174 | // NSTableViewDataSource
175 | func numberOfRows(in tableView: NSTableView) -> Int {
176 | return mappings.count
177 | }
178 |
179 | func tableView(_ tableView: NSTableView, objectValueFor tableColumn: NSTableColumn?, row: Int) -> Any? {
180 | switch tableColumn!.title {
181 | case "Identifier":
182 | return mappings[row].identifier
183 | case "Display Name":
184 | return mappings[row].language
185 | case "Shortcut":
186 | return nil // Set using key-value binding
187 | case "Enabled":
188 | return mappings[row].isEnabled
189 | default:
190 | Logger.log.fatal("Unknown column title \(tableColumn!.title)")
191 | fatalError()
192 | }
193 | }
194 |
195 | func tableView(_ tableView: NSTableView, pasteboardWriterForRow row: Int) -> NSPasteboardWriting? {
196 | let item = NSPasteboardItem()
197 | item.setString(String(row), forType: dragDropType)
198 | return item
199 | }
200 |
201 | func tableView(_ tableView: NSTableView, validateDrop info: NSDraggingInfo, proposedRow row: Int, proposedDropOperation dropOperation: NSTableView.DropOperation) -> NSDragOperation {
202 | if dropOperation == .above {
203 | return .move
204 | }
205 | return []
206 | }
207 |
208 | func tableView(_ tableView: NSTableView, acceptDrop info: NSDraggingInfo, row: Int, dropOperation: NSTableView.DropOperation) -> Bool {
209 | var oldIndexes = IndexSet()
210 | info.enumerateDraggingItems(options: [], for: tableView, classes: [NSPasteboardItem.self], searchOptions: [:]) { dragItem, _, _ in
211 | if let str = (dragItem.item as! NSPasteboardItem).string(forType: self.dragDropType), let index = Int(str) {
212 | oldIndexes.insert(index)
213 | }
214 | }
215 | mappings.move(fromOffsets: oldIndexes, toOffset: row)
216 | updateWrapper()
217 | table.reloadData()
218 | return true
219 | }
220 |
221 | // NSTextFieldDelegate
222 | func controlTextDidEndEditing(_ obj: Notification) {
223 | onChange(receiver: obj.object!)
224 | }
225 |
226 | // Native API
227 | func updateWrapper() {
228 | if wrapper.mappings != self.mappings {
229 | wrapper.mappings = self.mappings
230 | }
231 | }
232 |
233 | @objc func onChange(receiver: Any) {
234 | let row = table.row(for: receiver as! NSView)
235 | if row == -1 {
236 | // The view has changed under us
237 | return
238 | }
239 | let column = table.column(for: receiver as! NSView)
240 | switch column {
241 | case 1:
242 | mappings[row].language = (receiver as! NSTextField).stringValue
243 | case 3:
244 | mappings[row].isEnabled = (receiver as! NSButton).state == .on
245 | default:
246 | // shortcut uses key-value coding and should never come here
247 | Logger.log.fatal("Unknown column: \(column)")
248 | fatalError()
249 | }
250 | updateWrapper()
251 | }
252 | }
253 |
--------------------------------------------------------------------------------
/Application/LanguageView.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamApp is companion application for VarnamIME.
3 | * Copyright (C) 2020 Ranganath Atreya - LipikaIME
4 | * Copyright (C) 2021 Subin Siby - VarnamIME
5 | *
6 | * This program is distributed in the hope that it will be useful,
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 | */
10 |
11 | import SwiftUI
12 | import Carbon.HIToolbox.Events
13 |
14 | class LanguageModel: ObservableObject, PersistenceModel {
15 | @Published var mappings: [LanguageConfig] {
16 | didSet {
17 | self.reeval()
18 | }
19 | }
20 | @Published var isDirty = false
21 | @Published var isFactory = false
22 | @Published var isValid = true
23 | let config = VarnamConfig()
24 |
25 | init() {
26 | Varnam.setVSTLookupDir(config.vstDir)
27 | mappings = config.languageConfig
28 | reeval()
29 | }
30 |
31 | private func reeval() {
32 | isDirty = mappings != config.languageConfig
33 | isFactory = config.languageConfig == config.factoryLanguageConfig
34 | isValid = !mappings.filter({ $0.isEnabled }).isEmpty
35 | }
36 |
37 | func save() {
38 | config.languageConfig = mappings
39 | let validScripts = config.languageConfig.filter({ $0.isEnabled }).map({ $0.identifier })
40 | if !validScripts.contains(config.schemeID) {
41 | config.schemeID = validScripts.first!
42 | }
43 | reeval()
44 | }
45 |
46 | func reload() {
47 | mappings = config.languageConfig
48 | }
49 |
50 | func reset() {
51 | config.resetLanguageConfig()
52 | reload()
53 | }
54 | }
55 |
56 | struct LanguageView: View {
57 | @ObservedObject var model = LanguageModel()
58 | @State var confirmDiscard = false
59 | @State var confirmReset = false
60 |
61 | var body: some View {
62 | VStack {
63 | LanguageTable(mappings: $model.mappings)
64 | .padding(16)
65 | Spacer(minLength: 10)
66 | PersistenceView(model: model, context: "language configuration")
67 | Spacer(minLength: 25)
68 | }
69 | }
70 | }
71 |
72 | struct LanguageView_Previews: PreviewProvider {
73 | static var previews: some View {
74 | LanguageView()
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Application/MainView.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamApp is companion application for VarnamIME.
3 | * Copyright (C) 2020 Ranganath Atreya
4 | *
5 | * This program is distributed in the hope that it will be useful,
6 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 | */
9 |
10 | import SwiftUI
11 |
12 | struct MainView: View {
13 | @State private var currentTab = 0
14 |
15 | var body: some View {
16 | TabView(selection: $currentTab) {
17 | SettingsView().tabItem {
18 | Text("Settings")
19 | }.tag(0)
20 | .onAppear() {
21 | self.currentTab = 0
22 | }
23 | LanguageView().tabItem {
24 | Text("Languages")
25 | }.tag(1)
26 | .onAppear() {
27 | self.currentTab = 1
28 | }
29 | RecentlyLearnedWordsView().tabItem {
30 | Text("Recently Learned Words")
31 | }.tag(2)
32 | .onAppear() {
33 | self.currentTab = 2
34 | }
35 | }.padding(20)
36 | }
37 | }
38 |
39 | struct MainView_Previews: PreviewProvider {
40 | static var previews: some View {
41 | MainView()
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Application/PersistenceView.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamApp is companion application for VarnamIME.
3 | * Copyright (C) 2020 Ranganath Atreya
4 | *
5 | * This program is distributed in the hope that it will be useful,
6 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 | */
9 |
10 | import SwiftUI
11 |
12 | protocol PersistenceModel: ObservableObject {
13 | var isValid: Bool { get }
14 | var isDirty: Bool { get }
15 | var isFactory: Bool { get }
16 | func save()
17 | func reload()
18 | func reset()
19 | }
20 |
21 | struct PersistenceView: View where Model: PersistenceModel {
22 | @ObservedObject var model: Model
23 | let context: String
24 | @State var confirmDiscard = false
25 | @State var confirmReset = false
26 |
27 | var body: some View {
28 | HStack {
29 | Button("Save Changes") {
30 | self.model.save()
31 | }
32 | .disabled(!model.isDirty || !model.isValid)
33 | .padding([.leading, .trailing], 10)
34 | Button("Discard Changes") {
35 | self.confirmDiscard = true
36 | }
37 | .alert(isPresented: $confirmDiscard) {
38 | Alert(title: Text("Discard current changes?"), message: Text("Do you wish to discard all changes you just made to \(context)?"), primaryButton: .destructive(Text("Discard"), action: { self.model.reload() }), secondaryButton: .cancel(Text("Cancel")))
39 | }
40 | .padding([.leading, .trailing], 10)
41 | .disabled(!model.isDirty)
42 | Button("Factory Defaults") {
43 | self.confirmReset = true
44 | }
45 | .alert(isPresented: $confirmReset) {
46 | Alert(title: Text("Reset to Factory Defaults?"), message: Text("Do you wish to discard all changes ever made to \(context) and reset to factory defaults?"), primaryButton: .destructive(Text("Reset"), action: { self.model.reset() }), secondaryButton: .cancel(Text("Cancel")))
47 | }
48 | .padding([.leading, .trailing], 10)
49 | .disabled(model.isFactory)
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Application/RLWTable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RLWTable.swift
3 | // VarnamApp
4 | //
5 | // Copyright © 2021 Subin Siby
6 | //
7 |
8 | import Foundation
9 |
10 | import SwiftUI
11 |
12 | extension Double {
13 | func getDateTimeStringFromUTC() -> String {
14 | let date = Date(timeIntervalSince1970: self)
15 | let dateFormatter = DateFormatter()
16 | dateFormatter.timeStyle = DateFormatter.Style.medium //Set time style
17 | dateFormatter.dateStyle = DateFormatter.Style.medium //Set date style
18 | dateFormatter.timeZone = .current
19 | return dateFormatter.string(from: date)
20 | }
21 | }
22 |
23 | struct RLWTable: NSViewControllerRepresentable {
24 | var words: [Suggestion]
25 | var unlearn: (String)->()
26 | typealias NSViewControllerType = RLWTableController
27 |
28 | func makeNSViewController(context: Context) -> RLWTableController {
29 | return RLWTableController(self)
30 | }
31 |
32 | func updateNSViewController(_ nsViewController: RLWTableController, context: Context) {
33 | nsViewController.words = words
34 | nsViewController.table.reloadData()
35 | }
36 | }
37 |
38 | class RLWTableController: NSViewController, NSTableViewDelegate, NSTableViewDataSource, NSTextFieldDelegate {
39 | private var wrapper: RLWTable
40 |
41 | var table = NSTableView()
42 | var words: [Suggestion];
43 |
44 | init(_ wrapper: RLWTable) {
45 | self.wrapper = wrapper
46 | self.words = wrapper.words
47 |
48 | super.init(nibName: nil, bundle: nil)
49 | }
50 |
51 | required init?(coder: NSCoder) {
52 | fatalError("init(coder:) has not been implemented")
53 | }
54 |
55 | override func loadView() {
56 | self.view = NSView()
57 | view.autoresizesSubviews = true
58 |
59 | let columns = [
60 | (title: "Learned On", width: 200.0, tooltip: "Factory name for language"),
61 | (title: "Word", width: 250.0, tooltip: "Custom name for language"),
62 | (title: "", width: 10.0, tooltip: "Shortcut to select language"),
63 | ]
64 | for column in columns {
65 | let tableColumn = NSTableColumn()
66 | tableColumn.headerCell.title = column.title
67 | tableColumn.headerCell.alignment = .center
68 | tableColumn.identifier = NSUserInterfaceItemIdentifier(rawValue: column.title)
69 | tableColumn.width = CGFloat(column.width)
70 | tableColumn.headerToolTip = column.tooltip
71 | table.addTableColumn(tableColumn)
72 | }
73 | table.allowsColumnResizing = true
74 | table.allowsColumnSelection = false
75 | table.allowsMultipleSelection = false
76 | table.allowsColumnReordering = false
77 | table.allowsEmptySelection = true
78 | table.allowsTypeSelect = false
79 | table.usesAlternatingRowBackgroundColors = true
80 | table.intercellSpacing = NSSize(width: 15, height: 7)
81 |
82 | let scroll = NSScrollView()
83 | scroll.documentView = table
84 | scroll.hasVerticalScroller = true
85 | scroll.autoresizingMask = [.height, .width]
86 | scroll.borderType = .bezelBorder
87 | view.addSubview(scroll)
88 | }
89 |
90 | override func viewDidLoad() {
91 | super.viewDidLoad()
92 |
93 | table.delegate = self
94 | table.dataSource = self
95 | }
96 |
97 | // NSTableViewDataSource
98 | func numberOfRows(in table: NSTableView) -> Int {
99 | return words.count
100 | }
101 |
102 | // NSTableViewDelegate
103 | func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
104 | switch tableColumn!.title {
105 | case "Learned On":
106 | return NSTextField(string: Double(words[row].LearnedOn).getDateTimeStringFromUTC())
107 | case "Word":
108 | return NSTextField(string: words[row].Word)
109 | case "":
110 | let btn = NSButton(title: "Unlearn", target: self, action: #selector(self.onChange(receiver:)))
111 | btn.identifier = tableColumn!.identifier
112 | return btn
113 | default:
114 | Logger.log.fatal("Unknown column title \(tableColumn!.title)")
115 | fatalError()
116 | }
117 | }
118 |
119 | @objc func onChange(receiver: Any) {
120 | let row = table.row(for: receiver as! NSView)
121 | if row == -1 {
122 | // The view has changed under us
123 | return
124 | }
125 | wrapper.unlearn(words[row].Word)
126 | }
127 | }
128 |
--------------------------------------------------------------------------------
/Application/RecentlyLearnedWordsView.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamApp is companion application for VarnamIME.
3 | * Copyright (C) 2021 Subin Siby - VarnamIME
4 | *
5 | * This program is distributed in the hope that it will be useful,
6 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 | */
9 |
10 | import Foundation
11 |
12 | import SwiftUI
13 |
14 | class RLWModel: ObservableObject {
15 | @Published public var words: [Suggestion] = [Suggestion]();
16 |
17 | @Published var languages: [LanguageConfig];
18 | @Published var schemeID: String = "ml";
19 | @Published var schemeLangName: String = "Malayalam";
20 |
21 | let config = VarnamConfig()
22 | private (set) var varnam: Varnam! = nil;
23 |
24 | private func closeVarnam() {
25 | varnam.close()
26 | varnam = nil
27 | }
28 |
29 | private func initVarnam() -> Bool {
30 | if (varnam != nil) {
31 | closeVarnam()
32 | }
33 | do {
34 | varnam = try Varnam(schemeID)
35 | } catch let error {
36 | Logger.log.error(error.localizedDescription)
37 | return false
38 | }
39 | return true
40 | }
41 |
42 | init() {
43 | Varnam.setVSTLookupDir(config.vstDir)
44 |
45 | // One language = One dictionary
46 | // Same language can have multiple schemes
47 | schemeID = config.schemeID
48 | languages = config.languageConfig
49 |
50 | if initVarnam() {
51 | refreshWords()
52 | }
53 | }
54 |
55 | func refreshWords() {
56 | do {
57 | words = try varnam.getRecentlyLearnedWords()
58 | } catch let error {
59 | Logger.log.error(error.localizedDescription)
60 | }
61 | }
62 |
63 | func unlearn(_ word: String) {
64 | do {
65 | try varnam.unlearn(word)
66 | } catch let error {
67 | Logger.log.error(error.localizedDescription)
68 | }
69 | refreshWords()
70 | }
71 |
72 | func changeScheme(_ id: String) {
73 | schemeID = id
74 | schemeLangName = languages.first(where: { $0.identifier == schemeID })?.DisplayName ?? ""
75 | initVarnam()
76 | refreshWords()
77 | }
78 | }
79 |
80 | struct RecentlyLearnedWordsView: View {
81 | // Changes in model will automatically reload the table view
82 | @ObservedObject var model = RLWModel()
83 |
84 | var body: some View {
85 | VStack(alignment: .leading) {
86 | HStack {
87 | Text("Language: ")
88 | MenuButton(model.schemeLangName) {
89 | ForEach(model.languages, id: \.self) { (lang) in
90 | Button(lang.DisplayName) {
91 | self.model.changeScheme(lang.identifier)
92 | }
93 | }
94 | }
95 | .fixedSize()
96 | .padding(0)
97 | }
98 | Spacer(minLength: 5)
99 | RLWTable(
100 | words: model.words,
101 | unlearn: model.unlearn
102 | )
103 | }.padding(16)
104 | }
105 | }
106 |
107 | struct RecentlyLearnedWordsView_Previews: PreviewProvider {
108 | static var previews: some View {
109 | RecentlyLearnedWordsView()
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/Application/SettingsModel.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamApp is companion application for VarnamIME.
3 | * Copyright (C) 2020 Ranganath Atreya - LipikaIME
4 | * Copyright (C) 2021 Subin Siby - VarnamIME
5 | *
6 | * This program is distributed in the hope that it will be useful,
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 | */
10 |
11 | import SwiftUI
12 |
13 | class SettingsModel: Config, ObservableObject, PersistenceModel {
14 | @Published var logLevelString: String { didSet { self.reeval() } }
15 | @Published var learnWords: Bool { didSet { self.reeval() } }
16 |
17 | @Published var isDirty = false
18 | @Published var isFactory = false
19 | @Published var isValid = true
20 |
21 | override var logLevel: Logger.Level { get { Logger.Level(rawValue: logLevelString)! } }
22 |
23 | var languages: [LanguageConfig] { get {
24 | config.languageConfig.filter({ $0.isEnabled })
25 | }}
26 |
27 | func transliterate(_ input: String) -> String {
28 | return ""
29 | }
30 |
31 | let config = VarnamConfig()
32 |
33 | override init() {
34 | logLevelString = config.logLevel.rawValue
35 | learnWords = config.learnWords
36 | super.init()
37 | NotificationCenter.default.addObserver(self, selector: #selector(self.reeval), name: UserDefaults.didChangeNotification, object: nil)
38 | reeval()
39 | }
40 |
41 | func reset() {
42 | config.resetSettings()
43 | self.reload()
44 | }
45 |
46 | func reload() {
47 | logLevelString = config.logLevel.rawValue
48 | learnWords = config.learnWords
49 | reeval()
50 | }
51 |
52 | func save() {
53 | config.logLevel = logLevel
54 | config.learnWords = learnWords
55 | reeval()
56 | }
57 |
58 | @objc func reeval() {
59 | isDirty =
60 | config.logLevel != logLevel ||
61 | config.learnWords != learnWords
62 | isFactory = config.isFactorySettings()
63 | isValid = true
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/Application/SettingsView.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamApp is companion application for VarnamIME.
3 | * Copyright (C) 2020 Ranganath Atreya - LipikaIME
4 | * Copyright (C) 2021 Subin Siby - VarnamIME
5 | *
6 | * This program is distributed in the hope that it will be useful,
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 | */
10 |
11 | import SwiftUI
12 |
13 | struct SettingsView: View {
14 | @ObservedObject var model = SettingsModel()
15 |
16 | var body: some View {
17 | VStack {
18 | VStack(alignment: .leading, spacing: 20) {
19 | Group {
20 | VStack(alignment: .leading, spacing: 18) {
21 | Toggle(isOn: $model.learnWords) {
22 | Text("Learn Words")
23 | }
24 | }
25 | }
26 | Divider()
27 | VStack(alignment: .leading, spacing: 18) {
28 | HStack {
29 | Text("Output logs to the console at")
30 | MenuButton(model.logLevelString) {
31 | ForEach(Logger.Level.allCases, id: \.self) { (level) in
32 | Button(level.rawValue) { self.model.logLevelString = level.rawValue }
33 | }
34 | }
35 | .fixedSize()
36 | .padding(0)
37 | Text("- Debug is most verbose and Fatal is least verbose")
38 | }
39 | }
40 | }
41 | Spacer(minLength: 50)
42 | PersistenceView(model: model, context: "settings")
43 | }.padding(20)
44 | }
45 | }
46 |
47 | struct SettingsView_Previews: PreviewProvider {
48 | static var previews: some View {
49 | SettingsView()
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Application/VarnamApp.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.application-groups
8 |
9 | group.varnamproject.Varnam
10 |
11 | com.apple.security.files.downloads.read-write
12 |
13 | com.apple.security.files.user-selected.read-write
14 |
15 | com.apple.security.network.client
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Common/Common.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * LipikaEngine is a multi-codepoint, user-configurable, phonetic, Transliteration Engine.
3 | * Copyright (C) 2017 Ranganath Atreya
4 | *
5 | * This program is distributed in the hope that it will be useful,
6 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 | */
9 |
10 | import Foundation
11 |
12 | func synchronize(_ lockObject: AnyObject, _ closure: () -> T) -> T {
13 | objc_sync_enter(lockObject)
14 | defer { objc_sync_exit(lockObject) }
15 | return closure()
16 | }
17 |
18 | func synchronize(_ lockObject: AnyObject, _ closure: () throws -> T) throws -> T {
19 | objc_sync_enter(lockObject)
20 | defer { objc_sync_exit(lockObject) }
21 | return try closure()
22 | }
23 |
24 | let keyBase = Bundle.main.bundleIdentifier ?? "VarnamEngine"
25 |
26 | func getThreadLocalData(key: String) -> Any? {
27 | let fullKey: NSString = "\(keyBase).\(key)" as NSString
28 | return Thread.current.threadDictionary.object(forKey: fullKey)
29 | }
30 |
31 | func setThreadLocalData(key: String, value: Any) {
32 | let fullKey: NSString = "\(keyBase).\(key)" as NSString
33 | Thread.current.threadDictionary.setObject(value, forKey: fullKey)
34 | }
35 |
36 | func removeThreadLocalData(key: String) {
37 | let fullKey: NSString = "\(keyBase).\(key)" as NSString
38 | Thread.current.threadDictionary.removeObject(forKey: fullKey)
39 | }
40 |
41 | func filesInDirectory(directory: URL, withExtension ext: String) throws -> [String] {
42 | let files = try FileManager.default.contentsOfDirectory(at: directory, includingPropertiesForKeys: [], options: [])
43 | return files.filter({$0.pathExtension == ext}).compactMap { $0.deletingPathExtension().lastPathComponent }
44 | }
45 |
46 | extension String {
47 | func unicodeScalars() -> [UnicodeScalar] {
48 | return Array(self.unicodeScalars)
49 | }
50 |
51 | func unicodeScalarReversed() -> String {
52 | var result = ""
53 | result.unicodeScalars.append(contentsOf: self.unicodeScalars.reversed())
54 | return result
55 | }
56 |
57 | static func + (lhs: String, rhs: [UnicodeScalar]) -> String {
58 | var stringRHS = ""
59 | stringRHS.unicodeScalars.append(contentsOf: rhs)
60 | return lhs + stringRHS
61 | }
62 | }
63 |
64 | // Copyright mxcl, CC-BY-SA 4.0
65 | // https://stackoverflow.com/a/46354989/1372424
66 | public extension Array where Element: Hashable {
67 | func uniqued() -> [Element] {
68 | var seen = Set()
69 | return filter{ seen.insert($0).inserted }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Common/Config.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * LipikaEngine is a multi-codepoint, user-configurable, phonetic, Transliteration Engine.
3 | * Copyright (C) 2018 Ranganath Atreya
4 | *
5 | * This program is distributed in the hope that it will be useful,
6 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 | */
9 |
10 | import Foundation
11 |
12 | /// This class provides default config values that the client can override, typically using `UserDefaults` and pass an instance into `LiteratorFactory`.
13 | open class Config {
14 | /**
15 | Empty public init to enable clients to call super.init()
16 | */
17 | public init() {}
18 |
19 | /**
20 | This character is used to break input aggregation. Typically this is the forward-slash character (`\`).
21 |
22 | __Example__: if `a` maps to `1` and `b` maps to `2` and `ab` maps to `3` then inputting `ab` will output `3` but inputting `a\b` will output `12`
23 | */
24 | open var stopCharacter: UnicodeScalar { return "\\" }
25 |
26 | /**
27 | All input characters enclosed by this character will be echoed to the output as-is and not converted.
28 |
29 | __Example__: if `a` maps to `1` and `b` maps to `2` and `ab` maps to `3` then inputting `ab` will output `3` but inputting `` `ab` `` will output `ab`
30 | */
31 | open var escapeCharacter: UnicodeScalar { return "`" }
32 |
33 | /**
34 | The URL path to the top-level directory where the schemes files are present. Usually this would return something like `Bundle.main.bundleURL.appendingPathComponent("Mapping")`
35 | */
36 | open var mappingDirectory: URL { return Bundle(for: Config.self).bundleURL.appendingPathComponent("Resources", isDirectory: true).appendingPathComponent("Mapping", isDirectory: true) }
37 |
38 | /**
39 | The level at which to NSLog log messages generated by LipikaEngine.
40 |
41 | - Important: This configuration only holds within the same thread in which `LiteratorFactory` was initialized.
42 | */
43 | open var logLevel: Logger.Level { return .warning }
44 | }
45 |
--------------------------------------------------------------------------------
/Common/Logger.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * LipikaEngine is a multi-codepoint, user-configurable, phonetic, Transliteration Engine.
3 | * Copyright (C) 2017 Ranganath Atreya
4 | *
5 | * This program is distributed in the hope that it will be useful,
6 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 | */
9 |
10 | import Foundation
11 |
12 | /**
13 | If clients want to use the same log formatting and logger features of LipikaEngine, they are free to use this class.
14 | Logger exposes a thread-local instance called `Logger.log` that needs to be used. Logger itself cannot be instantiated.
15 |
16 | - Important: `logLevel` is thread-local specific and not global.
17 | - Note: message strings passed into Logger are @autoclosure and hence are not *evaluated* unless they are logged.
18 |
19 | __Usage__
20 | ```
21 | Logger.logLevel = .warning
22 | Logger.log.debug("you don't need to know")
23 | Logger.log.warning("you may want to know")
24 | ```
25 | */
26 | public final class Logger {
27 |
28 | /// Enumeration of errors thrown from `Logger`
29 | public enum LoggerError: Error {
30 | /// Indicates that `startCapture` was invoked again without calling `endCapture` in between.
31 | case alreadyCapturing
32 | }
33 |
34 | /// Enumeration of logging levels in the decreasing order of verbosity and increasing order of importance: `Level.debug`, `Level.warning`, `Level.error`, `Level.fatal`.
35 | public enum Level: String, CaseIterable {
36 | /// Lots of informative messages only useful for developers while debugging
37 | case debug = "Debug"
38 | /// Some unexpected execution paths that may be useful for power-users
39 | case warning = "Warning"
40 | /// Only those errors that are real and cause visible issues to the end-users
41 | case error = "Error"
42 | /// Completely unexpected events that are usually indicative of fundamental bugs
43 | case fatal = "Fatal"
44 |
45 | private var weight: Int {
46 | switch self {
47 | case .debug:
48 | return 0
49 | case .warning:
50 | return 1
51 | case .error:
52 | return 2
53 | case .fatal:
54 | return 3
55 | }
56 | }
57 |
58 | static func < (lhs: Level, rhs: Level) -> Bool {
59 | return lhs.weight < rhs.weight
60 | }
61 | static func > (lhs: Level, rhs: Level) -> Bool {
62 | return lhs.weight > rhs.weight
63 | }
64 | static func >= (lhs: Level, rhs: Level) -> Bool {
65 | return lhs.weight >= rhs.weight
66 | }
67 | static func <= (lhs: Level, rhs: Level) -> Bool {
68 | return lhs.weight <= rhs.weight
69 | }
70 | }
71 |
72 | private static let logLevelKey = "logLevel"
73 | private static let loggerInstanceKey = "logger"
74 |
75 | private var capture: [String]?
76 | private let minLevel = Logger.logLevel
77 | private init() { }
78 |
79 | deinit {
80 | if let capture = self.capture {
81 | log(level: .warning, message: "Log capture started but not ended with \(capture.count) log entries!")
82 | }
83 | }
84 |
85 | /// Thread-local singleton instance of Logger that clients must use. `Logger` itself cannot be instantiated.
86 | public static var log: Logger {
87 | var instance = getThreadLocalData(key: loggerInstanceKey) as? Logger
88 | if instance == nil {
89 | instance = Logger()
90 | setThreadLocalData(key: loggerInstanceKey, value: instance!)
91 | }
92 | return instance!
93 | }
94 |
95 | /**
96 | Get or set the level at and after which logs will be recorded.
97 | Levels with decreasing verbosity and increasing importance are `Level.debug`, `Level.warning`, `Level.error` and `Level.fatal`.
98 | When a level of certain level of verbosity is set, all levels at and with lower verbosity are recorded.
99 |
100 | - Returns: Level or defaults to `Level.warning` if a log level has not been set on this thread
101 | */
102 | public static var logLevel: Level {
103 | get {
104 | return getThreadLocalData(key: Logger.logLevelKey) as? Level ?? .warning
105 | }
106 | set(value) {
107 | setThreadLocalData(key: Logger.logLevelKey, value: value)
108 | removeThreadLocalData(key: Logger.loggerInstanceKey)
109 | }
110 | }
111 |
112 | private func log(level: Level, message: @autoclosure() -> String) {
113 | if level < minLevel { return }
114 | let log = "[\(level.rawValue)] \(message())"
115 | NSLog(log)
116 | if var capture = self.capture {
117 | capture.append(log)
118 | }
119 | }
120 |
121 | /// Log the given message at `Level.debug` level of importance
122 | public func debug(_ message: @autoclosure() -> String) {
123 | log(level: .debug, message: message())
124 | }
125 |
126 | /// Log the given message at `Level.warning` level of importance
127 | public func warning(_ message: @autoclosure() -> String) {
128 | log(level: .warning, message: message())
129 | }
130 |
131 | /// Log the given message at `Level.error` level of importance
132 | public func error(_ message: @autoclosure() -> String) {
133 | log(level: .error, message: message())
134 | }
135 |
136 | /// Log the given message at `Level.fatal` level of importance
137 | public func fatal(_ message: @autoclosure() -> String) {
138 | log(level: .fatal, message: message())
139 | }
140 |
141 | /**
142 | Start capturing all messages that is also going to be logged.
143 | This is useful for programatically inspecting or showing logs to end users.
144 |
145 | - Throws: LoggerError.alreadyCapturing if this method is double invoked
146 | */
147 | public func startCapture() throws {
148 | if capture != nil {
149 | throw LoggerError.alreadyCapturing
150 | }
151 | capture = [String]()
152 | }
153 |
154 | /**
155 | End capturing logs.
156 |
157 | - Returns: list of messages that were logged at or above the specified `logLevel`.
158 | */
159 | public func endCapture() -> [String]? {
160 | let result = capture
161 | capture = nil
162 | return result
163 | }
164 | }
165 |
--------------------------------------------------------------------------------
/Common/VarnamConfig.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamIME is a user-configurable phonetic Input Method Engine for Mac OS X.
3 | * Copyright (C) 2018 Ranganath Atreya - LipikaIME
4 | * Copyright (C) 2021 Subin Siby - VarnamIME
5 | *
6 | * This program is distributed in the hope that it will be useful,
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 | */
10 |
11 | import Foundation
12 |
13 | struct LanguageConfig: Codable, Equatable, Hashable {
14 | var identifier: String // Factory default name of the language
15 | var language: String
16 | var isEnabled: Bool
17 | var shortcutKey: String?
18 | var shortcutModifiers: UInt?
19 |
20 | // TODO make this struct same as SchemeDetails
21 | var Identifier: String
22 | var DisplayName: String
23 | var LangCode: String
24 | }
25 |
26 | class VarnamConfig: Config {
27 | private static let kGroupDomainName = "group.varnamproject.Varnam"
28 | private var userDefaults: UserDefaults
29 |
30 | override init() {
31 | guard let groupDefaults = UserDefaults(suiteName: VarnamConfig.kGroupDomainName) else {
32 | fatalError("Unable to open UserDefaults for suite: \(VarnamConfig.kGroupDomainName)!")
33 | }
34 | self.userDefaults = groupDefaults
35 | super.init()
36 | }
37 |
38 | func resetSettings() {
39 | guard var domain = UserDefaults.standard.persistentDomain(forName: VarnamConfig.kGroupDomainName) else { return }
40 | domain.keys.forEach() { key in
41 | if key != "languageConfig" {
42 | domain.removeValue(forKey: key)
43 | }
44 | }
45 | UserDefaults.standard.setPersistentDomain(domain, forName: VarnamConfig.kGroupDomainName)
46 | UserDefaults.standard.synchronize()
47 | }
48 |
49 | func isFactorySettings() -> Bool {
50 | guard let domain = UserDefaults.standard.persistentDomain(forName: VarnamConfig.kGroupDomainName) else { return true }
51 | return domain.keys.isEmpty || (domain.keys.count == 1 && domain.keys.first! == "languageConfig")
52 | }
53 |
54 | func resetLanguageConfig() {
55 | userDefaults.removeObject(forKey: "languageConfig")
56 | }
57 |
58 | override var logLevel: Logger.Level {
59 | get {
60 | if let logLevelString = userDefaults.string(forKey: #function) {
61 | return Logger.Level(rawValue: logLevelString)!
62 | }
63 | else {
64 | return super.logLevel
65 | }
66 | }
67 | set(value) {
68 | userDefaults.set(value.rawValue, forKey: #function)
69 | }
70 | }
71 |
72 | // This is being set because VarnamApp doesn't know
73 | // the location who also access govarnam
74 | var vstDir: String {
75 | get {
76 | return userDefaults.string(forKey: #function) ?? ""
77 | }
78 | set(value) {
79 | userDefaults.set(value, forKey: #function)
80 | }
81 | }
82 |
83 | // Varnam schemeID to use
84 | var schemeID: String {
85 | get {
86 | return userDefaults.string(forKey: #function) ?? languageConfig.first(where: { $0.isEnabled })?.identifier ?? languageConfig.first!.identifier
87 | }
88 | set(value) {
89 | userDefaults.set(value, forKey: #function)
90 | }
91 | }
92 |
93 | var learnWords: Bool {
94 | get {
95 | return userDefaults.bool(forKey: #function)
96 | }
97 | set(value) {
98 | userDefaults.set(value, forKey: #function)
99 | }
100 | }
101 |
102 | var languageConfig: [LanguageConfig] {
103 | get {
104 | var langConfigs = factoryLanguageConfig
105 | if let encoded = userDefaults.data(forKey: #function) {
106 | do {
107 | let savedLangConfigs = try JSONDecoder().decode(Array.self, from: encoded)
108 | for slc in savedLangConfigs {
109 | if let row = langConfigs.firstIndex(where: {$0.identifier == slc.identifier}) {
110 | // Only changing the setting values
111 | // Other properties such as display name are constant,
112 | // They are obtained from VST
113 | langConfigs[row].isEnabled = slc.isEnabled
114 | langConfigs[row].shortcutKey = slc.shortcutKey
115 | langConfigs[row].shortcutModifiers = slc.shortcutModifiers
116 | }
117 | }
118 | }
119 | catch {
120 | Logger.log.error("Exception while trying to decode languageConfig: \(error)")
121 | resetLanguageConfig()
122 | }
123 | }
124 | return langConfigs
125 | }
126 | set(value) {
127 | let encodedData: Data = try! JSONEncoder().encode(value)
128 | userDefaults.set(encodedData, forKey: #function)
129 | }
130 | }
131 |
132 | var factoryLanguageConfig: [LanguageConfig] {
133 | get {
134 | let schemes = Varnam.getAllSchemeDetails()
135 | var configs = [LanguageConfig]()
136 | for scheme in schemes {
137 | configs.append(LanguageConfig(
138 | identifier: scheme.Identifier,
139 | language: scheme.DisplayName,
140 | isEnabled: true,
141 |
142 | Identifier: scheme.Identifier,
143 | DisplayName: scheme.DisplayName,
144 | LangCode: scheme.LangCode
145 | ))
146 | }
147 | return configs
148 | }
149 | }
150 | }
151 |
--------------------------------------------------------------------------------
/GoVarnam/.gitignore:
--------------------------------------------------------------------------------
1 | *.dylib
2 | assets/
3 | *.vst
4 | *.vlf
5 |
--------------------------------------------------------------------------------
/GoVarnam/Varnam.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Varnam.swift
3 | // VarnamIME
4 | //
5 | // Created by Subin on 13/11/21.
6 | // Copyright © 2021 VarnamProject. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | // Thank you Martin R
12 | // https://stackoverflow.com/a/44548174/1372424
13 | public struct VarnamException: Error {
14 | let msg: String
15 | init(_ msg: String) {
16 | self.msg = msg
17 | }
18 | }
19 |
20 | extension VarnamException: LocalizedError {
21 | public var errorDescription: String? {
22 | return NSLocalizedString(msg, comment: "")
23 | }
24 | }
25 |
26 | public struct SchemeDetails {
27 | var Identifier: String
28 | var LangCode: String
29 | var DisplayName: String
30 | var Author: String
31 | var CompiledDate: String
32 | var IsStable: Bool
33 | }
34 |
35 | public struct Suggestion {
36 | var Word: String
37 | var Weight: Int
38 | var LearnedOn: Int
39 | }
40 |
41 | extension String {
42 | func toCStr() -> UnsafeMutablePointer? {
43 | return UnsafeMutablePointer(mutating: (self as NSString).utf8String)
44 | }
45 | }
46 |
47 | public class Varnam {
48 | private var varnamHandle: Int32 = 0;
49 |
50 | // VSTs are stored in VarnamIME.app's assets.
51 | // VarnamApp.app will know this path by a config value
52 | // set by the IME app. Kind of weird, yes.
53 | // Setting the lookup dir to assetsFolderPath only
54 | // works for VarnamIME.app. For VarnamApp, the VST
55 | // lookup path should be set from the config value.
56 |
57 | static let assetsFolderPath = Bundle.main.resourceURL!.appendingPathComponent("assets").path
58 |
59 | static func importAllVLFInAssets() {
60 | // TODO import only necessary ones
61 | let fm = FileManager.default
62 | for scheme in getAllSchemeDetails() {
63 | do {
64 | let varnam = try! Varnam(scheme.Identifier)
65 | let items = try fm.contentsOfDirectory(atPath: assetsFolderPath)
66 |
67 | for item in items {
68 | if item.hasSuffix(".vlf") && item.hasPrefix(scheme.Identifier) {
69 | let path = assetsFolderPath + "/" + item
70 | varnam.importFromFile(path)
71 | }
72 | }
73 | } catch {
74 | Logger.log.error("Couldn't import")
75 | }
76 | }
77 | }
78 |
79 | static func setVSTLookupDir(_ path: String) {
80 | varnam_set_vst_lookup_dir(path.toCStr())
81 | }
82 |
83 | internal init(_ schemeID: String = "ml") throws {
84 | try checkError(varnam_init_from_id(schemeID.toCStr(), &varnamHandle))
85 | }
86 |
87 | public func getLastError() -> String {
88 | return String(cString: varnam_get_last_error(varnamHandle))
89 | }
90 |
91 | public func checkError(_ rc: Int32) throws {
92 | if (rc != VARNAM_SUCCESS) {
93 | throw VarnamException(getLastError())
94 | }
95 | }
96 |
97 | public func close() {
98 | varnam_close(varnamHandle)
99 | }
100 |
101 | public func cancel(_ handleID: Int32) {
102 | varnam_cancel(handleID)
103 | }
104 |
105 | public func transliterate(_ handleID: Int32, _ input: String) -> [String] {
106 | var arr: UnsafeMutablePointer? = varray_init()
107 | varnam_transliterate(
108 | varnamHandle,
109 | handleID,
110 | input.toCStr(),
111 | &arr
112 | )
113 |
114 | var results = [String]()
115 | for i in (0.. [Suggestion] {
137 | var arr: UnsafeMutablePointer? = varray_init()
138 | try checkError(varnam_get_recently_learned_words(varnamHandle, 1, 0, 30, &arr))
139 |
140 | var results = [Suggestion]()
141 | for i in (0.. [SchemeDetails] {
157 | var schemes = [SchemeDetails]()
158 |
159 | let arr = varnam_get_all_scheme_details()
160 | for i in (0.. Void) {
16 | let id = UUID().uuidString
17 | pendingWorkItems[id] = DispatchWorkItem(block: work)
18 | DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(10)) {
19 | self.pendingWorkItems[id]?.perform()
20 | self.pendingWorkItems.removeValue(forKey: id)
21 | }
22 | }
23 |
24 | func cancelAll() {
25 | pendingWorkItems.values.forEach() { $0.cancel() }
26 | pendingWorkItems.removeAll()
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Input Source/ClientManager.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamIME is a user-configurable phonetic Input Method Engine for Mac OS X.
3 | * Copyright (C) 2018 Ranganath Atreya
4 | *
5 | * This program is distributed in the hope that it will be useful,
6 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 | */
9 |
10 | import InputMethodKit
11 |
12 | class ClientManager: CustomStringConvertible {
13 | private let notFoundRange = NSMakeRange(NSNotFound, NSNotFound)
14 | private let config = VarnamConfig()
15 | private let client: IMKTextInput
16 |
17 | private var candidatesWindow: IMKCandidates { return (NSApp.delegate as! AppDelegate).candidatesWindow }
18 | private (set) var candidates = autoreleasepool { return [String]() }
19 | private var tableCursorPos = 0 // Candidates table cursor position
20 |
21 | // Cache, otherwise clients quitting can sometimes SEGFAULT us
22 | private var _description: String
23 | var description: String {
24 | return _description
25 | }
26 |
27 | private var attributes: [NSAttributedString.Key: Any]! {
28 | var rect = NSMakeRect(0, 0, 0, 0)
29 | return client.attributes(forCharacterIndex: 0, lineHeightRectangle: &rect) as? [NSAttributedString.Key : Any]
30 | }
31 |
32 | init?(client: IMKTextInput) {
33 | guard let bundleId = client.bundleIdentifier(), let clientId = client.uniqueClientIdentifierString() else {
34 | Logger.log.warning("bundleIdentifier: \(client.bundleIdentifier() ?? "nil") or uniqueClientIdentifierString: \(client.uniqueClientIdentifierString() ?? "nil") - failing ClientManager.init()")
35 | return nil
36 | }
37 | Logger.log.debug("Initializing client: \(bundleId) with Id: \(clientId)")
38 | self.client = client
39 | if !client.supportsUnicode() {
40 | Logger.log.warning("Client: \(bundleId) does not support Unicode!")
41 | }
42 | if !client.supportsProperty(TSMDocumentPropertyTag(kTSMDocumentSupportDocumentAccessPropertyTag)) {
43 | Logger.log.warning("Client: \(bundleId) does not support Document Access!")
44 | }
45 | _description = "\(bundleId) with Id: \(clientId)"
46 | }
47 |
48 | func setGlobalCursorLocation(_ location: Int) {
49 | Logger.log.debug("Setting global cursor location to: \(location)")
50 | client.setMarkedText("|", selectionRange: NSMakeRange(0, 0), replacementRange: NSMakeRange(location, 0))
51 | client.setMarkedText("", selectionRange: NSMakeRange(0, 0), replacementRange: NSMakeRange(location, 0))
52 | }
53 |
54 | func updatePreedit(_ text: NSAttributedString, _ cursorPos: Int? = nil) {
55 | client.setMarkedText(text, selectionRange: NSMakeRange(cursorPos ?? text.length, 0), replacementRange: notFoundRange)
56 | }
57 |
58 | func updateCandidates(_ sugs: [String]) {
59 | // Remove duplicates
60 | // For some weird reason, when there are duplicates,
61 | // candidate window makes them hidden
62 | candidates = sugs.uniqued()
63 | updateLookupTable()
64 | }
65 |
66 | func updateLookupTable() {
67 | tableCursorPos = 0
68 | candidatesWindow.update()
69 | candidatesWindow.show()
70 | }
71 |
72 | // For moving between items of candidate table
73 | func tableMoveEvent(_ event: NSEvent) {
74 | if event.keyCode == kVK_UpArrow && tableCursorPos > 0 {
75 | // TODO allow moving to the end
76 | // This would need a custom candidate window
77 | // https://github.com/lennylxx/google-input-tools-macos/blob/main/GoogleInputTools/CandidatesWindow.swift
78 | tableCursorPos -= 1
79 | } else if event.keyCode == kVK_DownArrow && tableCursorPos < candidates.count - 1 {
80 | tableCursorPos += 1
81 | }
82 | candidatesWindow.interpretKeyEvents([event])
83 | }
84 |
85 | func getCandidateAt(_ index: Int) -> String? {
86 | if candidates.count > index {
87 | return candidates[index]
88 | } else {
89 | return nil
90 | }
91 | }
92 |
93 | // Get candidate at current highlighted position
94 | func getCandidate() -> String? {
95 | if candidates.count == 0 {
96 | return nil
97 | } else {
98 | return candidates[tableCursorPos]
99 | }
100 | }
101 |
102 | func commitText(_ output: String) {
103 | Logger.log.debug("Finalizing with: \(output)")
104 | client.insertText(output, replacementRange: notFoundRange)
105 | candidatesWindow.hide()
106 | }
107 |
108 | func clear() {
109 | Logger.log.debug("Clearing MarkedText and Candidate window")
110 | client.setMarkedText("", selectionRange: NSMakeRange(0, 0), replacementRange: notFoundRange)
111 | candidates = []
112 | candidatesWindow.hide()
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/Input Source/Flag.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/varnamproject/varnam-macOS/e1bbfb140b651422a5f202d5c6b81f771068219d/Input Source/Flag.psd
--------------------------------------------------------------------------------
/Input Source/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(MARKETING_VERSION)
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | InputMethodConnectionName
22 | VarnamController_Connection
23 | InputMethodServerControllerClass
24 | VarnamController
25 | InputMethodServerDelegateClass
26 | VarnamController
27 | LSApplicationCategoryType
28 | public.app-category.utilities
29 | LSBackgroundOnly
30 |
31 | LSMinimumSystemVersion
32 | $(MACOSX_DEPLOYMENT_TARGET)
33 | NSHumanReadableCopyright
34 | Copyright © 2018 Ranganath Atreya. All rights reserved.
35 | NSMainNibFile
36 | MainMenu
37 | NSPrincipalClass
38 | NSApplication
39 | tsInputMethodCharacterRepertoireKey
40 |
41 | Beng
42 | Deva
43 | Gujr
44 | Guru
45 | Knda
46 | Mlym
47 | Orya
48 | Taml
49 | Telu
50 |
51 | tsInputMethodIconFileKey
52 | TrayIcon.icns
53 |
54 |
55 |
--------------------------------------------------------------------------------
/Input Source/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Input Source/TrayIcon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/varnamproject/varnam-macOS/e1bbfb140b651422a5f202d5c6b81f771068219d/Input Source/TrayIcon.icns
--------------------------------------------------------------------------------
/Input Source/VarnamController.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamIME is a user-configurable phonetic Input Method Engine for Mac OS X.
3 | * Copyright (C) 2018 Ranganath Atreya - LipikaIME
4 | * https://github.com/ratreya/lipika-ime
5 | * Copyright (C) 2021 Subin Siby - VarnamIME
6 | * https://github.com/varnamproject/varnam-macOS
7 | *
8 | * This program is distributed in the hope that it will be useful,
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 | */
12 |
13 | import InputMethodKit
14 | import Carbon.HIToolbox
15 |
16 | @objc(VarnamController)
17 | public class VarnamController: IMKInputController {
18 | let config = VarnamConfig()
19 | let dispatch = AsyncDispatcher()
20 | private let clientManager: ClientManager
21 |
22 | private var cursorPos = 0
23 | private var preedit = ""
24 | private (set) var candidates = autoreleasepool { return [String]() }
25 |
26 | private var schemeID = "ml"
27 | private (set) var varnam: Varnam! = nil
28 |
29 | private (set) var validInputs: CharacterSet;
30 | private (set) var wordBreakChars: CharacterSet;
31 |
32 | private func initVarnam() -> Bool {
33 | if (varnam != nil) {
34 | closeVarnam()
35 | }
36 | schemeID = config.schemeID
37 | do {
38 | varnam = try Varnam(schemeID)
39 | } catch let error {
40 | Logger.log.error(error.localizedDescription)
41 | return false
42 | }
43 | return true
44 | }
45 |
46 | private func closeVarnam() {
47 | varnam.close()
48 | varnam = nil
49 | }
50 |
51 | public override init!(server: IMKServer, delegate: Any!, client inputClient: Any) {
52 | guard let client = inputClient as? IMKTextInput & NSObjectProtocol else {
53 | Logger.log.warning("Client does not conform to the necessary protocols - refusing to initiate VarnamController!")
54 | return nil
55 | }
56 | guard let clientManager = ClientManager(client: client) else {
57 | Logger.log.warning("Client manager failed to initialize - refusing to initiate VarnamController!")
58 | return nil
59 | }
60 | self.clientManager = clientManager
61 |
62 | validInputs = CharacterSet.letters
63 | wordBreakChars = CharacterSet.punctuationCharacters
64 |
65 | // TODO get special characters from varnam via SearchSymbolTable
66 | let validSpecialInputs = [
67 | "_", // Used for ZWJ
68 | "~" // Used usually for virama
69 | ]
70 | for char in validSpecialInputs {
71 | let charScalar = char.unicodeScalars.first!
72 | validInputs.insert(charScalar)
73 | wordBreakChars.remove(charScalar)
74 | }
75 |
76 | super.init(server: server, delegate: delegate, client: inputClient)
77 |
78 | _ = initVarnam()
79 | Logger.log.debug("Initialized Controller for Client: \(clientManager)")
80 | }
81 |
82 | func clearState() {
83 | preedit = ""
84 | cursorPos = 0
85 | clientManager.clear()
86 | }
87 |
88 | func commitText(_ text: String) {
89 | clientManager.commitText(text)
90 | clearState()
91 |
92 | if config.learnWords {
93 | Logger.log.debug("Learning \(text)")
94 | do {
95 | try varnam.learn(text)
96 | } catch let error {
97 | Logger.log.warning(error.localizedDescription)
98 | }
99 | }
100 | }
101 |
102 | func commitCandidateAt(_ position: Int) -> Bool {
103 | if position == 0 {
104 | if preedit.count > 0 {
105 | commitText(preedit)
106 | return true
107 | }
108 | } else if let text = clientManager.getCandidateAt(position-1) {
109 | commitText(text)
110 | return true
111 | }
112 | return false
113 | }
114 |
115 | func commitPreedit() -> Bool {
116 | if preedit.isEmpty {
117 | return false
118 | }
119 | commitText(preedit)
120 | return true
121 | }
122 |
123 | // Commits the first candidate if available
124 | func commit() -> Bool {
125 | if let text = clientManager.getCandidate() {
126 | commitText(text)
127 | return true
128 | }
129 | return false
130 | }
131 |
132 | private func insertAtIndex(_ source: inout String, _ location: String.IndexDistance, _ char: String!) {
133 | let index = source.index(source.startIndex, offsetBy: location)
134 | source.insert(Character(char), at: index)
135 | }
136 |
137 | private func removeAtIndex(_ source: inout String, _ position: String.IndexDistance) {
138 | if let index = source.index(source.startIndex, offsetBy: position, limitedBy: source.endIndex) {
139 | source.remove(at: index)
140 | } else {
141 | // out of range
142 | }
143 | }
144 |
145 | // Handle events
146 | public override func handle(_ event: NSEvent!, client sender: Any!) -> Bool {
147 | if event.type != NSEvent.EventType.keyDown {
148 | return false
149 | }
150 |
151 | let keyCode = Int(event.keyCode)
152 |
153 | if event.modifierFlags.contains(.command) || event.modifierFlags.contains(.control) {
154 | if preedit.count == 0 {
155 | return false
156 | }
157 | if keyCode == kVK_Delete || keyCode == kVK_ForwardDelete {
158 | Logger.log.debug("CMD + DEL = Unlearn word")
159 | if let text = clientManager.getCandidate() {
160 | try! varnam.unlearn(text)
161 | updateLookupTable()
162 | return true
163 | }
164 | }
165 | }
166 |
167 | switch keyCode {
168 | case kVK_Space:
169 | let text = clientManager.getCandidate()
170 | if text == nil {
171 | commitText(preedit + " ")
172 | } else {
173 | commitText(text! + " ")
174 | }
175 | return true
176 | case kVK_Return:
177 | let text = clientManager.getCandidate()
178 | if text == nil {
179 | return commitPreedit()
180 | } else {
181 | commitText(text!)
182 | }
183 | return true
184 | case kVK_Escape:
185 | return commitPreedit()
186 | case kVK_LeftArrow:
187 | if preedit.isEmpty {
188 | return false
189 | }
190 | if cursorPos > 0 {
191 | cursorPos -= 1
192 | updatePreedit()
193 | }
194 | return true
195 | case kVK_RightArrow:
196 | if preedit.isEmpty {
197 | return false
198 | }
199 | if cursorPos < preedit.count {
200 | cursorPos += 1
201 | updatePreedit()
202 | }
203 | return true
204 | case kVK_UpArrow, kVK_DownArrow:
205 | if preedit.isEmpty {
206 | return false
207 | }
208 | clientManager.tableMoveEvent(event)
209 | return true
210 | case kVK_Delete:
211 | if preedit.isEmpty {
212 | return false
213 | }
214 | if (cursorPos > 0) {
215 | cursorPos -= 1
216 | removeAtIndex(&preedit, cursorPos)
217 | updatePreedit()
218 | updateLookupTable()
219 | if preedit.isEmpty {
220 | /* Current backspace has cleared the preedit. Need to reset the engine state */
221 | clearState()
222 | }
223 | }
224 | return true
225 | case kVK_ForwardDelete:
226 | if preedit.isEmpty {
227 | return false
228 | }
229 | if cursorPos < preedit.count {
230 | removeAtIndex(&preedit, cursorPos)
231 | updatePreedit()
232 | updateLookupTable()
233 | if preedit.isEmpty {
234 | /* Current delete has cleared the preedit. Need to reset the engine state */
235 | clearState()
236 | }
237 | }
238 | return true
239 | default:
240 | if let chars = event.characters, chars.unicodeScalars.count == 1 {
241 | let numericKey: Int = Int(chars) ?? 10
242 |
243 | if numericKey >= 0 && numericKey <= 9 {
244 | // Numeric key press
245 | return commitCandidateAt(numericKey)
246 | }
247 |
248 | let charScalar = chars.unicodeScalars.first!
249 |
250 | if wordBreakChars.contains(charScalar) {
251 | if let text = clientManager.getCandidate() {
252 | commitText(text + chars)
253 | return true
254 | }
255 | return false
256 | }
257 |
258 | if event.modifierFlags.isSubset(of: [.capsLock, .shift]), validInputs.contains(charScalar) {
259 | Logger.log.debug("character event: \(chars)")
260 | return processInput(chars)
261 | }
262 | }
263 | }
264 |
265 | return false
266 | }
267 |
268 | public func processInput(_ input: String!) -> Bool {
269 | insertAtIndex(&preedit, cursorPos, input)
270 | cursorPos += 1
271 | updatePreedit()
272 |
273 | // Naming to be consistent with govarnam-ibus
274 | updateLookupTable()
275 |
276 | return true
277 | }
278 |
279 | private func updatePreedit() {
280 | let attributes = mark(forStyle: kTSMHiliteSelectedRawText, at: client().selectedRange()) as! [NSAttributedString.Key : Any]
281 | let clientText = NSMutableAttributedString(string: preedit)
282 | clientText.addAttributes(attributes, range: NSMakeRange(0, clientText.length))
283 | clientManager.updatePreedit(clientText, cursorPos)
284 | }
285 |
286 | private func updateLookupTable() {
287 | let handleID: Int32 = 1
288 | varnam.cancel(handleID)
289 | let sugs = varnam.transliterate(handleID, preedit)
290 | clientManager.updateCandidates(sugs)
291 | }
292 |
293 | /// This message is sent when our client looses focus
294 | public override func deactivateServer(_ sender: Any!) {
295 | Logger.log.debug("Client: \(clientManager) loosing focus by: \((sender as? IMKTextInput)?.bundleIdentifier() ?? "unknown")")
296 | // Do this in case the application is quitting, otherwise we will end up with a SIGSEGV
297 | dispatch.cancelAll()
298 | clearState()
299 | closeVarnam()
300 | }
301 |
302 | /// This message is sent when our client gains focus
303 | public override func activateServer(_ sender: Any!) {
304 | Logger.log.debug("Client: \(clientManager) gained focus by: \((sender as? IMKTextInput)?.bundleIdentifier() ?? "unknown")")
305 | // There are three sources for current script selection - (a) self.schemeID, (b) config.schemeID and (c) selectedMenuItem.title
306 | // (b) could have changed while we were in background - converge (a) -> (b) if global script selection is configured
307 | if schemeID != config.schemeID {
308 | Logger.log.debug("Initializing varnam: \(schemeID) to: \(config.schemeID)")
309 | _ = initVarnam()
310 | }
311 | if (varnam == nil) {
312 | _ = initVarnam()
313 | }
314 | }
315 |
316 | public override func menu() -> NSMenu! {
317 | Logger.log.debug("Returning menu")
318 | // Set the system trey menu selection to reflect our literators; converge (c) -> (a)
319 | let systemTrayMenu = (NSApp.delegate as! AppDelegate).systemTrayMenu!
320 | systemTrayMenu.items.forEach() { $0.state = .off }
321 | systemTrayMenu.items.first(where: { ($0.representedObject as! String) == schemeID } )?.state = .on
322 | return systemTrayMenu
323 | }
324 |
325 | public override func candidates(_ sender: Any!) -> [Any]! {
326 | Logger.log.debug("Returning Candidates for sender: \((sender as? IMKTextInput)?.bundleIdentifier() ?? "unknown")")
327 | return clientManager.candidates
328 | }
329 |
330 | public override func candidateSelected(_ candidateString: NSAttributedString!) {
331 | Logger.log.debug("Candidate selected: \(candidateString!)")
332 | commitText(candidateString.string)
333 | }
334 |
335 | public override func commitComposition(_ sender: Any!) {
336 | Logger.log.debug("Commit Composition called by: \((sender as? IMKTextInput)?.bundleIdentifier() ?? "unknown")")
337 | // This is usually called when current input method is changed.
338 | // Some apps also call to commit
339 | _ = commitPreedit()
340 | }
341 |
342 | @objc public func menuItemSelected(sender: NSDictionary) {
343 | let item = sender.value(forKey: kIMKCommandMenuItemName) as! NSMenuItem
344 | Logger.log.debug("Menu Item Selected: \(item.title)")
345 | // Converge (b) -> (c)
346 | config.schemeID = item.representedObject as! String
347 | // Converge (a) -> (b)
348 | _ = initVarnam()
349 | }
350 | }
351 |
--------------------------------------------------------------------------------
/Input Source/VarnamIME.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.temporary-exception.mach-register.global-name
8 | VarnamController_Connection
9 | com.apple.security.application-groups
10 |
11 | group.varnamproject.Varnam
12 |
13 | com.apple.security.cs.allow-unsigned-executable-memory
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Installation/Assets/Conclusion.rtfd/Screenshot 2021-11-14 at 7.14.26 PM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/varnamproject/varnam-macOS/e1bbfb140b651422a5f202d5c6b81f771068219d/Installation/Assets/Conclusion.rtfd/Screenshot 2021-11-14 at 7.14.26 PM.png
--------------------------------------------------------------------------------
/Installation/Assets/Conclusion.rtfd/TXT.rtf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/varnamproject/varnam-macOS/e1bbfb140b651422a5f202d5c6b81f771068219d/Installation/Assets/Conclusion.rtfd/TXT.rtf
--------------------------------------------------------------------------------
/Installation/Assets/Welcome.rtfd/TXT.rtf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/varnamproject/varnam-macOS/e1bbfb140b651422a5f202d5c6b81f771068219d/Installation/Assets/Welcome.rtfd/TXT.rtf
--------------------------------------------------------------------------------
/Installation/Assets/Welcome.rtfd/icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/varnamproject/varnam-macOS/e1bbfb140b651422a5f202d5c6b81f771068219d/Installation/Assets/Welcome.rtfd/icon_64.png
--------------------------------------------------------------------------------
/Installation/InputSource.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamIME is a user-configurable phonetic Input Method Engine for Mac OS X.
3 | * Copyright (C) 2018 Ranganath Atreya
4 | *
5 | * This program is distributed in the hope that it will be useful,
6 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 | */
9 |
10 | import Carbon
11 |
12 | class InputSource {
13 | enum VarnamError: Error {
14 | case systemError(String)
15 | }
16 |
17 | private init() {}
18 |
19 | static func getVarnam() -> Array {
20 | let options: CFDictionary = [kTISPropertyBundleID as String: "com.varnamproject.mac.inputmethod.Varnam"] as CFDictionary
21 | if let rawList = TISCreateInputSourceList(options, true) {
22 | let inputSourceNSArray = rawList.takeRetainedValue() as NSArray
23 | let inputSourceList = inputSourceNSArray as! [TISInputSource]
24 | return inputSourceList
25 | }
26 | else {
27 | return []
28 | }
29 | }
30 |
31 | static func getAll() -> Array {
32 | if let rawList = TISCreateInputSourceList(nil, true) {
33 | let inputSourceNSArray = rawList.takeRetainedValue() as NSArray
34 | let inputSourceList = inputSourceNSArray as! [TISInputSource]
35 | return inputSourceList
36 | }
37 | else {
38 | return []
39 | }
40 | }
41 |
42 | static func register(inputSourcePath: String) throws {
43 | let path = NSURL(fileURLWithPath: inputSourcePath)
44 | let status = TISRegisterInputSource(path)
45 | if (Int(status) == paramErr) {
46 | throw VarnamError.systemError("Failed to register: \(inputSourcePath) due to: \(status)!")
47 | }
48 | }
49 |
50 | static func remove(inputSource: TISInputSource) throws {
51 | let status = TISDisableInputSource(inputSource)
52 | if (Int(status) == paramErr) {
53 | throw VarnamError.systemError("Failed to remove due to: \(status)!")
54 | }
55 | }
56 |
57 | static func enable(inputSource: TISInputSource) throws {
58 | let status = TISEnableInputSource(inputSource)
59 | if (Int(status) == paramErr) {
60 | throw VarnamError.systemError("Failed to enable due to: \(status)!")
61 | }
62 | }
63 |
64 | static func select(inputSource: TISInputSource) throws {
65 | let status = TISSelectInputSource(inputSource)
66 | if (Int(status) == paramErr) {
67 | throw VarnamError.systemError("Failed to select due to: \(status)!")
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/Installation/Scripts/postinstall:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | open /Library/Input\ Methods/VarnamIME.app
3 | sleep 1
4 | until ./installer --register
5 | do
6 | sleep 1
7 | done
8 | until ./installer --enable
9 | do
10 | sleep 1
11 | done
12 | /Library/Input\ Methods/VarnamIME.app/Contents/MacOS/VarnamIME -import
13 | exit 0
14 |
--------------------------------------------------------------------------------
/Installation/Scripts/preinstall:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | ./installer --remove
3 | sleep 1
4 | killall VarnamIME
5 | exit 0
6 |
--------------------------------------------------------------------------------
/Installation/build:
--------------------------------------------------------------------------------
1 | #!/bin/zsh
2 |
3 | dev_account="ranganath.atreya@gmail.com"
4 | dev_team="2P8V429HRL"
5 | dev_keychain_label="Developer-altool"
6 |
7 | # functions
8 | requeststatus() { # $1: requestUUID
9 | requestUUID=${1?:"need a request UUID"}
10 | req_status=$(xcrun altool --notarization-info "$requestUUID" \
11 | --username "$dev_account" \
12 | --password "@keychain:$dev_keychain_label" 2>&1 \
13 | | awk -F ': ' '/Status:/ { print $2; }' )
14 | echo "$req_status"
15 | }
16 |
17 | notarizefile() { # $1: path to file to notarize, $2: identifier
18 | filepath=${1:?"need a filepath"}
19 | identifier=${2:?"need an identifier"}
20 |
21 | # if app then zip before uploading
22 | filename=$(basename -- "$filepath")
23 | if [[ ${filename##*.} == "app" ]]; then
24 | ditto -c -k --keepParent "$filename" "${filename%.*}.zip"
25 | filename="${filename%.*}.zip"
26 | fi
27 |
28 | # upload file
29 | echo "## uploading $filepath for notarization"
30 | requestUUID=$(xcrun altool --notarize-app \
31 | --primary-bundle-id "$identifier" \
32 | --username "$dev_account" \
33 | --password "@keychain:$dev_keychain_label" \
34 | --asc-provider "$dev_team" \
35 | --file "${filename}" 2>&1 \
36 | | awk '/RequestUUID/ { print $NF; }')
37 |
38 | echo "Notarization RequestUUID: $requestUUID"
39 |
40 | if [[ $requestUUID == "" ]]; then
41 | echo "could not upload for notarization"
42 | exit 1
43 | fi
44 |
45 | # wait for status to be not "in progress" any more
46 | request_status="in progress"
47 | while [[ "$request_status" == "in progress" ]]; do
48 | echo -n "waiting... "
49 | sleep 10
50 | request_status=$(requeststatus "$requestUUID")
51 | echo "$request_status"
52 | done
53 |
54 | # print status information
55 | xcrun altool --notarization-info "$requestUUID" \
56 | --username "$dev_account" \
57 | --password "@keychain:$dev_keychain_label"
58 | echo
59 |
60 | if [[ $request_status != "success" ]]; then
61 | echo "## could not notarize $filepath"
62 | exit 1
63 | fi
64 |
65 | # staple result
66 | echo "## Stapling $filepath"
67 | xcrun stapler staple "$filepath"
68 | }
69 |
70 | clean() {
71 | rm -rf ./VarnamIME.app
72 | rm -rf ./VarnamIME.zip
73 | rm -rf ./VarnamApp.app
74 | rm -rf ./VarnamApp.zip
75 | rm -rf ./VarnamIME.pkg
76 | rm ./Scripts/installer
77 | }
78 |
79 | build_varnam_ime() {
80 | rm -rf ./VarnamIME.app
81 | xcodebuild -project ../VarnamIME.xcodeproj -scheme VarnamIME -configuration Release clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO || exit 1
82 | cp -R ../build/Release/VarnamIME.app .
83 | # notarizefile "VarnamIME.app" "com.varnamproject.mac.Varnam"
84 | }
85 |
86 | build_shortcut_recorder() {
87 | xcodebuild -project ../ShortcutRecorder/ShortcutRecorder.xcodeproj -scheme "ShortcutRecorder.framework" -configuration Release clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO || exit 1
88 | rm -rf ../Application/ShortcutRecorder.framework
89 | cp -R ../ShortcutRecorder/build/Release/ShortcutRecorder.framework ../Application/ || exit 1
90 | }
91 |
92 | build_varnam_app() {
93 | rm -rf ./VarnamApp.app
94 | xcodebuild -project ../VarnamIME.xcodeproj -scheme VarnamApp -configuration Release clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO || exit 1
95 | cp -R ../build/Release/VarnamApp.app .
96 | # notarizefile "VarnamApp.app" "com.varnamproject.mac.VarnamApp"
97 | }
98 |
99 | build_varnam_installer() {
100 | rm ./Scripts/installer
101 | xcodebuild -project ../VarnamIME.xcodeproj -scheme Installer -configuration Release clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO || exit 1
102 | cp ../build/Release/installer ./Scripts/
103 | }
104 |
105 | build_pkg() {
106 | packagesbuild -v VarnamIME.pkgproj
107 | # notarizefile "VarnamIME.pkg" "com.varnamproject.mac.VarnamApp"
108 | }
109 |
110 | if [[ "$1" == "clean" ]]; then
111 | clean
112 | exit 0
113 | fi
114 |
115 | if [[ "$1" == "ime" ]]; then
116 | rm -rf ./VarnamIME.zip
117 | build_varnam_ime
118 | exit 0
119 | fi
120 |
121 | if [[ "$1" == "app" ]]; then
122 | rm -rf ./VarnamApp.zip
123 | build_varnam_app
124 | exit 0
125 | fi
126 |
127 | if [[ "$1" == "ShortcutRecorder" ]]; then
128 | build_shortcut_recorder
129 | exit 0
130 | fi
131 |
132 | if [ ! -d ../Application/ShortcutRecorder.framework ]; then
133 | build_shortcut_recorder
134 | fi
135 |
136 | build_varnam_ime
137 | build_varnam_app
138 | build_varnam_installer
139 | build_pkg
140 |
141 | exit 0
142 |
--------------------------------------------------------------------------------
/Installation/main.swift:
--------------------------------------------------------------------------------
1 | /*
2 | * VarnamIME is a user-configurable phonetic Input Method Engine for Mac OS X.
3 | * Copyright (C) 2018 Ranganath Atreya
4 | *
5 | * This program is distributed in the hope that it will be useful,
6 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 | */
9 |
10 | import Foundation
11 |
12 | public final class Installer {
13 | enum Argument: String {
14 | case register = "--register"
15 | case remove = "--remove"
16 | case enable = "--enable"
17 | case select = "--select"
18 | }
19 | private let argument: Argument
20 |
21 | public init(arguments: [String] = CommandLine.arguments) {
22 | if arguments.count != 2 {
23 | print("[ERROR] You should specify one of --register, --remove, --enable or --select")
24 | exit(-1)
25 | }
26 | guard let argument = Argument(rawValue: arguments[1]) else {
27 | print("Unrecognized argument: \(arguments[1])")
28 | exit(-1)
29 | }
30 | self.argument = argument
31 | }
32 |
33 | public func run() {
34 | switch argument {
35 | case .register:
36 | register()
37 | case .enable:
38 | register()
39 | enable()
40 | case .select:
41 | register()
42 | enable()
43 | select()
44 | case .remove:
45 | remove()
46 | }
47 | }
48 |
49 | private func register() {
50 | try! InputSource.register(inputSourcePath: "/Library/Input Methods/VarnamIME.app")
51 | }
52 |
53 | private func enable() {
54 | if let varnam = InputSource.getVarnam().first {
55 | try! InputSource.enable(inputSource: varnam)
56 | }
57 | else {
58 | print("[ERROR] VarnamIME input source not found")
59 | }
60 | }
61 |
62 | private func select() {
63 | if let varnam = InputSource.getVarnam().first {
64 | try! InputSource.select(inputSource: varnam)
65 | }
66 | else {
67 | print("[ERROR] VarnamIME input source not found")
68 | }
69 | }
70 |
71 | private func remove() {
72 | if let varnam = InputSource.getVarnam().first {
73 | try! InputSource.remove(inputSource: varnam)
74 | }
75 | else {
76 | print("[ERROR] VarnamIME input source not found")
77 | }
78 | }
79 | }
80 |
81 | // Now run it!
82 | Installer().run()
83 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 |
3 | Version 3, 29 June 2007
4 |
5 | Copyright (C) 2007 Free Software Foundation, Inc.
6 |
7 | Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for software and other kinds of works.
11 |
12 | The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
13 |
14 | When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
15 |
16 | To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
17 |
18 | For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
19 |
20 | Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
21 |
22 | For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
23 |
24 | Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
25 |
26 | Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
27 |
28 | The precise terms and conditions for copying, distribution and modification follow.
29 | TERMS AND CONDITIONS
30 | 0. Definitions.
31 |
32 | “This License” refers to version 3 of the GNU General Public License.
33 |
34 | “Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
35 |
36 | “The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
37 |
38 | To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
39 |
40 | A “covered work” means either the unmodified Program or a work based on the Program.
41 |
42 | To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
43 |
44 | To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
45 |
46 | An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
47 | 1. Source Code.
48 |
49 | The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
50 |
51 | A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
52 |
53 | The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
54 |
55 | The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
56 |
57 | The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
58 |
59 | The Corresponding Source for a work in source code form is that same work.
60 | 2. Basic Permissions.
61 |
62 | All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
63 |
64 | You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
65 |
66 | Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
67 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
68 |
69 | No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
70 |
71 | When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
72 | 4. Conveying Verbatim Copies.
73 |
74 | You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
75 |
76 | You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
77 | 5. Conveying Modified Source Versions.
78 |
79 | You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
80 |
81 | a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
82 | b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
83 | c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
84 | d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
85 |
86 | A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
87 | 6. Conveying Non-Source Forms.
88 |
89 | You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
90 |
91 | a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
92 | b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
93 | c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
94 | d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
95 | e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
96 |
97 | A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
98 |
99 | A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
100 |
101 | “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
102 |
103 | If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
104 |
105 | The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
106 |
107 | Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
108 | 7. Additional Terms.
109 |
110 | “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
111 |
112 | When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
113 |
114 | Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
115 |
116 | a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
117 | b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
118 | c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
119 | d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
120 | e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
121 | f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
122 |
123 | All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
124 |
125 | If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
126 |
127 | Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
128 | 8. Termination.
129 |
130 | You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
131 |
132 | However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
133 |
134 | Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
135 |
136 | Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
137 | 9. Acceptance Not Required for Having Copies.
138 |
139 | You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
140 | 10. Automatic Licensing of Downstream Recipients.
141 |
142 | Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
143 |
144 | An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
145 |
146 | You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
147 | 11. Patents.
148 |
149 | A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
150 |
151 | A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
152 |
153 | Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
154 |
155 | In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
156 |
157 | If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
158 |
159 | If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
160 |
161 | A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
162 |
163 | Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
164 | 12. No Surrender of Others' Freedom.
165 |
166 | If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
167 | 13. Use with the GNU Affero General Public License.
168 |
169 | Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
170 | 14. Revised Versions of this License.
171 |
172 | The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
173 |
174 | Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
175 |
176 | If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
177 |
178 | Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
179 | 15. Disclaimer of Warranty.
180 |
181 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
182 | 16. Limitation of Liability.
183 |
184 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
185 | 17. Interpretation of Sections 15 and 16.
186 |
187 | If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
188 |
189 | END OF TERMS AND CONDITIONS
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # VarnamIME for macOS
2 |
3 | Easily type Indian languages on macOS using [Varnam transliteration engine](https://varnamproject.github.io/).
4 |
5 | ## Installation
6 |
7 | [See this](https://varnamproject.com/download/mac/)
8 |
9 | See a demo of how Varnam works: https://www.youtube.com/watch?v=7bvahY0sdWo
10 |
11 | ## Building
12 |
13 | * Make sure XCode is installed
14 | * Clone and do `git submodule update --init`
15 | * `cd Installation && ./build`
16 | * Run the newly built `VarnamIME.pkg` installer
17 |
18 | ## About
19 |
20 | Built at FOSSUnited's [FOSSHack21](https://fossunited.org/fosshack/2021/project?project=Type%20Indian%20Languages%20natively%20on%20Mac).
21 |
22 | This project is a hard-fork of [lipika-ime](https://github.com/ratreya/Lipika_IME)
23 |
24 | ### Resources
25 |
26 | There aren't many documentation on how to make IMEs for macOS, especially in **English**. Getting started with XCode is also tricky for beginners. Setting up **Lipika** was also difficult.
27 |
28 | Resources that helped in making IME on macOS (ordered by most important to the least):
29 | * https://blog.inoki.cc/2021/06/19/Write-your-own-IME-on-macOS-1/ (The last section is very important!)
30 | * https://jyhong836.github.io/tech/2015/07/29/add-3rd-part-dynamic-library-dylib-to-xcode-target.html
31 | * https://github.com/lennylxx/google-input-tools-macos (An IME made 2 months ago, Has GitHub CI builds)
32 | * https://github.com/nh7a/hiragany (Simple Japanese IME)
33 | * https://github.com/pkamb/NumberInput_IMKit_Sample/issues/1
34 | * API Docs: https://developer.apple.com/documentation/inputmethodkit/imkcandidates
35 |
36 | ### License
37 |
38 | > Copyright (C) 2018 Ranganath Atreya
39 | >
40 | > Copyright (C) 2021 Subin Siby
41 |
42 | ```
43 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU
44 | General Public License as published by the Free Software Foundation; either version 3 of the License,
45 | or (at your option) any later version.
46 |
47 | This program comes with ABSOLUTELY NO WARRANTY; see LICENSE file.
48 | ```
49 |
--------------------------------------------------------------------------------
/VarnamIME.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 040A907E27523D2F008E365B /* RLWTable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040A907D27523D2F008E365B /* RLWTable.swift */; };
11 | 043C818D274139D900E6832E /* Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D0A69827411F47006C3B54 /* Config.swift */; };
12 | 043C818E274139DC00E6832E /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D0A69A27411F6D006C3B54 /* Logger.swift */; };
13 | 043C818F274139DE00E6832E /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D0A69C27411FB1006C3B54 /* Common.swift */; };
14 | 043C819427413B3800E6832E /* Varnam.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D0A682273FC367006C3B54 /* Varnam.swift */; };
15 | 043C819B27413CB500E6832E /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043C819A27413CB500E6832E /* SettingsView.swift */; };
16 | 043C819C27413D8000E6832E /* libgovarnam.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 04D0A67F273FC2BC006C3B54 /* libgovarnam.dylib */; };
17 | 043C819D27413D8000E6832E /* libgovarnam.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 04D0A67F273FC2BC006C3B54 /* libgovarnam.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
18 | 0460D233274D668B005B91DB /* RecentlyLearnedWordsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0460D232274D668B005B91DB /* RecentlyLearnedWordsView.swift */; };
19 | 04D0A680273FC2BC006C3B54 /* libgovarnam.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 04D0A67F273FC2BC006C3B54 /* libgovarnam.dylib */; };
20 | 04D0A681273FC2C0006C3B54 /* libgovarnam.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 04D0A67F273FC2BC006C3B54 /* libgovarnam.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
21 | 04D0A683273FC367006C3B54 /* Varnam.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D0A682273FC367006C3B54 /* Varnam.swift */; };
22 | 04D0A697274112BE006C3B54 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 04D0A696274112BE006C3B54 /* assets */; };
23 | 04D0A69927411F47006C3B54 /* Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D0A69827411F47006C3B54 /* Config.swift */; };
24 | 04D0A69B27411F6D006C3B54 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D0A69A27411F6D006C3B54 /* Logger.swift */; };
25 | 04D0A69D27411FB1006C3B54 /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D0A69C27411FB1006C3B54 /* Common.swift */; };
26 | A5122A4E20D42A2000575848 /* InputSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53AD01A20CC658000C95844 /* InputSource.swift */; };
27 | A5122A4F20D42A2000575848 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5122A4220D420E100575848 /* main.swift */; };
28 | A5122A5020D42A9500575848 /* InputMethodKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A546182A20CC6BF3003A73EB /* InputMethodKit.framework */; };
29 | A5122A5120D42AA600575848 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A546182820CC6BEA003A73EB /* Cocoa.framework */; };
30 | A53AD00120CC347900C95844 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53AD00020CC347900C95844 /* AppDelegate.swift */; };
31 | A53AD00320CC347900C95844 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A53AD00220CC347900C95844 /* Assets.xcassets */; };
32 | A53AD01720CC654700C95844 /* VarnamConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53AD01620CC654700C95844 /* VarnamConfig.swift */; };
33 | A53AD01D20CC659C00C95844 /* ClientManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53AD01C20CC659C00C95844 /* ClientManager.swift */; };
34 | A53AD01F20CC660900C95844 /* VarnamController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53AD01E20CC660900C95844 /* VarnamController.swift */; };
35 | A54397CC20D4D2F20011C7B7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A54397CB20D4D2F20011C7B7 /* AppDelegate.swift */; };
36 | A54397D320D4D2F30011C7B7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A54397D120D4D2F30011C7B7 /* Main.storyboard */; };
37 | A54397DB20D4D5E90011C7B7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A53AD00220CC347900C95844 /* Assets.xcassets */; };
38 | A54397DF20D4D6170011C7B7 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A546182820CC6BEA003A73EB /* Cocoa.framework */; };
39 | A54397E020D4D6840011C7B7 /* VarnamConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53AD01620CC654700C95844 /* VarnamConfig.swift */; };
40 | A546182720CC6BB2003A73EB /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = A546181E20CC6A06003A73EB /* LICENSE */; };
41 | A546182920CC6BEA003A73EB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A546182820CC6BEA003A73EB /* Cocoa.framework */; };
42 | A546182B20CC6BF3003A73EB /* InputMethodKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A546182A20CC6BF3003A73EB /* InputMethodKit.framework */; };
43 | A5698AE9247EFA8E00443158 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A52905DC234EC67900A8D95E /* MainView.swift */; };
44 | A585A17D24AC28FC00816D1E /* PersistenceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A585A17C24AC28FC00816D1E /* PersistenceView.swift */; };
45 | A59281E120D45653003013B8 /* TrayIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = A59281E020D45634003013B8 /* TrayIcon.icns */; };
46 | A59E32562495A93300736334 /* LanguageTable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A59E32552495A93300736334 /* LanguageTable.swift */; };
47 | A5BDA2F620D06FFC00C9D006 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = A5BDA2F520D06FFC00C9D006 /* MainMenu.xib */; };
48 | A5C06C7C24A1358600FBD1E9 /* ShortcutRecorder.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A5C06C7B24A1358600FBD1E9 /* ShortcutRecorder.framework */; };
49 | A5C06C7D24A1358F00FBD1E9 /* ShortcutRecorder.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A5C06C7B24A1358600FBD1E9 /* ShortcutRecorder.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
50 | A5DC681F22335F72006FC519 /* AsyncDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5DC681E22335F72006FC519 /* AsyncDispatcher.swift */; };
51 | A5E20D8424944B6E00EF7B1C /* LanguageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5E20D8324944B6E00EF7B1C /* LanguageView.swift */; };
52 | A5E982802480658900D7B9A9 /* SettingsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5E9827F2480658900D7B9A9 /* SettingsModel.swift */; };
53 | /* End PBXBuildFile section */
54 |
55 | /* Begin PBXContainerItemProxy section */
56 | A5122A5320D43D8800575848 /* PBXContainerItemProxy */ = {
57 | isa = PBXContainerItemProxy;
58 | containerPortal = A53ACFF520CC347900C95844 /* Project object */;
59 | proxyType = 1;
60 | remoteGlobalIDString = A53ACFFC20CC347900C95844;
61 | remoteInfo = VarnamIME;
62 | };
63 | /* End PBXContainerItemProxy section */
64 |
65 | /* Begin PBXCopyFilesBuildPhase section */
66 | 04D0A69527411260006C3B54 /* Copy Files */ = {
67 | isa = PBXCopyFilesBuildPhase;
68 | buildActionMask = 2147483647;
69 | dstPath = "";
70 | dstSubfolderSpec = 7;
71 | files = (
72 | );
73 | name = "Copy Files";
74 | runOnlyForDeploymentPostprocessing = 0;
75 | };
76 | A53AD01320CC643700C95844 /* Embed Frameworks */ = {
77 | isa = PBXCopyFilesBuildPhase;
78 | buildActionMask = 2147483647;
79 | dstPath = "";
80 | dstSubfolderSpec = 10;
81 | files = (
82 | 04D0A681273FC2C0006C3B54 /* libgovarnam.dylib in Embed Frameworks */,
83 | );
84 | name = "Embed Frameworks";
85 | runOnlyForDeploymentPostprocessing = 0;
86 | };
87 | A54397DE20D4D6090011C7B7 /* Embed Frameworks */ = {
88 | isa = PBXCopyFilesBuildPhase;
89 | buildActionMask = 2147483647;
90 | dstPath = "";
91 | dstSubfolderSpec = 10;
92 | files = (
93 | A5C06C7D24A1358F00FBD1E9 /* ShortcutRecorder.framework in Embed Frameworks */,
94 | 043C819D27413D8000E6832E /* libgovarnam.dylib in Embed Frameworks */,
95 | );
96 | name = "Embed Frameworks";
97 | runOnlyForDeploymentPostprocessing = 0;
98 | };
99 | /* End PBXCopyFilesBuildPhase section */
100 |
101 | /* Begin PBXFileReference section */
102 | 040A907D27523D2F008E365B /* RLWTable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RLWTable.swift; sourceTree = ""; };
103 | 043C819027413A2400E6832E /* LipikaEngine_OSX.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LipikaEngine_OSX.framework; path = "../lipika-engine/build/Release/LipikaEngine_OSX.framework"; sourceTree = ""; };
104 | 043C819527413C1E00E6832E /* govarnam-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "govarnam-Bridging-Header.h"; sourceTree = ""; };
105 | 043C819A27413CB500E6832E /* SettingsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; };
106 | 0460D232274D668B005B91DB /* RecentlyLearnedWordsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecentlyLearnedWordsView.swift; sourceTree = ""; };
107 | 04D0A67F273FC2BC006C3B54 /* libgovarnam.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libgovarnam.dylib; sourceTree = ""; };
108 | 04D0A682273FC367006C3B54 /* Varnam.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Varnam.swift; sourceTree = ""; };
109 | 04D0A696274112BE006C3B54 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; path = assets; sourceTree = ""; };
110 | 04D0A69827411F47006C3B54 /* Config.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Config.swift; sourceTree = ""; };
111 | 04D0A69A27411F6D006C3B54 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; };
112 | 04D0A69C27411FB1006C3B54 /* Common.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Common.swift; sourceTree = ""; };
113 | A5122A4220D420E100575848 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; };
114 | A5122A4720D429D300575848 /* Installer */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Installer; sourceTree = BUILT_PRODUCTS_DIR; };
115 | A52905DC234EC67900A8D95E /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = ""; };
116 | A52DCDBB20D17767001F34AC /* VarnamIME.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = VarnamIME.entitlements; sourceTree = ""; };
117 | A53ACFFD20CC347900C95844 /* VarnamIME.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VarnamIME.app; sourceTree = BUILT_PRODUCTS_DIR; };
118 | A53AD00020CC347900C95844 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
119 | A53AD00220CC347900C95844 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
120 | A53AD00720CC347900C95844 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
121 | A53AD00F20CC641900C95844 /* LipikaEngine_OSX.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = LipikaEngine_OSX.framework; sourceTree = ""; };
122 | A53AD01620CC654700C95844 /* VarnamConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VarnamConfig.swift; sourceTree = ""; };
123 | A53AD01A20CC658000C95844 /* InputSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InputSource.swift; sourceTree = ""; };
124 | A53AD01C20CC659C00C95844 /* ClientManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClientManager.swift; sourceTree = ""; };
125 | A53AD01E20CC660900C95844 /* VarnamController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VarnamController.swift; sourceTree = ""; };
126 | A54397C920D4D2F10011C7B7 /* VarnamApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VarnamApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
127 | A54397CB20D4D2F20011C7B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
128 | A54397D220D4D2F30011C7B7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
129 | A54397D420D4D2F30011C7B7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
130 | A54397D520D4D2F30011C7B7 /* VarnamApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = VarnamApp.entitlements; sourceTree = ""; };
131 | A546181E20CC6A06003A73EB /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; };
132 | A546181F20CC6A06003A73EB /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = CONTRIBUTING.md; path = .github/CONTRIBUTING.md; sourceTree = ""; };
133 | A546182020CC6A06003A73EB /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = .github/README.md; sourceTree = ""; };
134 | A546182120CC6A06003A73EB /* PULL_REQUEST_TEMPLATE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = PULL_REQUEST_TEMPLATE.md; path = .github/PULL_REQUEST_TEMPLATE.md; sourceTree = ""; };
135 | A546182220CC6A06003A73EB /* CODE_OF_CONDUCT.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = CODE_OF_CONDUCT.md; path = .github/CODE_OF_CONDUCT.md; sourceTree = ""; };
136 | A546182320CC6A23003A73EB /* bug_report.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = bug_report.md; path = .github/ISSUE_TEMPLATE/bug_report.md; sourceTree = ""; };
137 | A546182420CC6A23003A73EB /* feature_request.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = feature_request.md; path = .github/ISSUE_TEMPLATE/feature_request.md; sourceTree = ""; };
138 | A546182820CC6BEA003A73EB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
139 | A546182A20CC6BF3003A73EB /* InputMethodKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = InputMethodKit.framework; path = System/Library/Frameworks/InputMethodKit.framework; sourceTree = SDKROOT; };
140 | A585A17C24AC28FC00816D1E /* PersistenceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersistenceView.swift; sourceTree = ""; };
141 | A59281E020D45634003013B8 /* TrayIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = TrayIcon.icns; sourceTree = ""; };
142 | A59E32552495A93300736334 /* LanguageTable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageTable.swift; sourceTree = ""; };
143 | A5BDA2F520D06FFC00C9D006 /* MainMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainMenu.xib; sourceTree = ""; };
144 | A5C06C7B24A1358600FBD1E9 /* ShortcutRecorder.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ShortcutRecorder.framework; sourceTree = ""; };
145 | A5DC681E22335F72006FC519 /* AsyncDispatcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncDispatcher.swift; sourceTree = ""; };
146 | A5E20D8324944B6E00EF7B1C /* LanguageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageView.swift; sourceTree = ""; };
147 | A5E9827F2480658900D7B9A9 /* SettingsModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsModel.swift; sourceTree = ""; };
148 | /* End PBXFileReference section */
149 |
150 | /* Begin PBXFrameworksBuildPhase section */
151 | A5122A4420D429D300575848 /* Frameworks */ = {
152 | isa = PBXFrameworksBuildPhase;
153 | buildActionMask = 2147483647;
154 | files = (
155 | A5122A5120D42AA600575848 /* Cocoa.framework in Frameworks */,
156 | A5122A5020D42A9500575848 /* InputMethodKit.framework in Frameworks */,
157 | );
158 | runOnlyForDeploymentPostprocessing = 0;
159 | };
160 | A53ACFFA20CC347900C95844 /* Frameworks */ = {
161 | isa = PBXFrameworksBuildPhase;
162 | buildActionMask = 2147483647;
163 | files = (
164 | A546182920CC6BEA003A73EB /* Cocoa.framework in Frameworks */,
165 | 04D0A680273FC2BC006C3B54 /* libgovarnam.dylib in Frameworks */,
166 | A546182B20CC6BF3003A73EB /* InputMethodKit.framework in Frameworks */,
167 | );
168 | runOnlyForDeploymentPostprocessing = 0;
169 | };
170 | A54397C620D4D2F10011C7B7 /* Frameworks */ = {
171 | isa = PBXFrameworksBuildPhase;
172 | buildActionMask = 2147483647;
173 | files = (
174 | A5C06C7C24A1358600FBD1E9 /* ShortcutRecorder.framework in Frameworks */,
175 | 043C819C27413D8000E6832E /* libgovarnam.dylib in Frameworks */,
176 | A54397DF20D4D6170011C7B7 /* Cocoa.framework in Frameworks */,
177 | );
178 | runOnlyForDeploymentPostprocessing = 0;
179 | };
180 | /* End PBXFrameworksBuildPhase section */
181 |
182 | /* Begin PBXGroup section */
183 | 043C818C274139C900E6832E /* Common */ = {
184 | isa = PBXGroup;
185 | children = (
186 | 04D0A69827411F47006C3B54 /* Config.swift */,
187 | 04D0A69A27411F6D006C3B54 /* Logger.swift */,
188 | 04D0A69C27411FB1006C3B54 /* Common.swift */,
189 | A53AD01620CC654700C95844 /* VarnamConfig.swift */,
190 | );
191 | path = Common;
192 | sourceTree = "";
193 | };
194 | 04D0A67A273FC1F1006C3B54 /* GoVarnam */ = {
195 | isa = PBXGroup;
196 | children = (
197 | 04D0A696274112BE006C3B54 /* assets */,
198 | 04D0A67F273FC2BC006C3B54 /* libgovarnam.dylib */,
199 | 04D0A682273FC367006C3B54 /* Varnam.swift */,
200 | 043C819527413C1E00E6832E /* govarnam-Bridging-Header.h */,
201 | );
202 | path = GoVarnam;
203 | sourceTree = "";
204 | };
205 | A53ACFF420CC347900C95844 = {
206 | isa = PBXGroup;
207 | children = (
208 | 043C818C274139C900E6832E /* Common */,
209 | 04D0A67A273FC1F1006C3B54 /* GoVarnam */,
210 | A546181D20CC69EC003A73EB /* Documents */,
211 | A53ACFFF20CC347900C95844 /* Input Source */,
212 | A57F18EA20D1FBA1007C9745 /* Installation */,
213 | A54397CA20D4D2F20011C7B7 /* Application */,
214 | A53ACFFE20CC347900C95844 /* Products */,
215 | A53AD01420CC64FD00C95844 /* Frameworks */,
216 | );
217 | sourceTree = "";
218 | };
219 | A53ACFFE20CC347900C95844 /* Products */ = {
220 | isa = PBXGroup;
221 | children = (
222 | A53ACFFD20CC347900C95844 /* VarnamIME.app */,
223 | A5122A4720D429D300575848 /* Installer */,
224 | A54397C920D4D2F10011C7B7 /* VarnamApp.app */,
225 | );
226 | name = Products;
227 | sourceTree = "";
228 | };
229 | A53ACFFF20CC347900C95844 /* Input Source */ = {
230 | isa = PBXGroup;
231 | children = (
232 | A54397D920D4D3D80011C7B7 /* Resources */,
233 | A53AD00020CC347900C95844 /* AppDelegate.swift */,
234 | A53AD01C20CC659C00C95844 /* ClientManager.swift */,
235 | A53AD01E20CC660900C95844 /* VarnamController.swift */,
236 | A5DC681E22335F72006FC519 /* AsyncDispatcher.swift */,
237 | );
238 | path = "Input Source";
239 | sourceTree = "";
240 | };
241 | A53AD01420CC64FD00C95844 /* Frameworks */ = {
242 | isa = PBXGroup;
243 | children = (
244 | 043C819027413A2400E6832E /* LipikaEngine_OSX.framework */,
245 | A546182820CC6BEA003A73EB /* Cocoa.framework */,
246 | A546182A20CC6BF3003A73EB /* InputMethodKit.framework */,
247 | );
248 | name = Frameworks;
249 | sourceTree = "";
250 | };
251 | A54397CA20D4D2F20011C7B7 /* Application */ = {
252 | isa = PBXGroup;
253 | children = (
254 | A54397DA20D4D3F50011C7B7 /* Resources */,
255 | A54397CB20D4D2F20011C7B7 /* AppDelegate.swift */,
256 | A52905DC234EC67900A8D95E /* MainView.swift */,
257 | A5E9827F2480658900D7B9A9 /* SettingsModel.swift */,
258 | A59E32552495A93300736334 /* LanguageTable.swift */,
259 | 0460D232274D668B005B91DB /* RecentlyLearnedWordsView.swift */,
260 | A5E20D8324944B6E00EF7B1C /* LanguageView.swift */,
261 | A585A17C24AC28FC00816D1E /* PersistenceView.swift */,
262 | 043C819A27413CB500E6832E /* SettingsView.swift */,
263 | 040A907D27523D2F008E365B /* RLWTable.swift */,
264 | );
265 | path = Application;
266 | sourceTree = "";
267 | };
268 | A54397D920D4D3D80011C7B7 /* Resources */ = {
269 | isa = PBXGroup;
270 | children = (
271 | A53AD00220CC347900C95844 /* Assets.xcassets */,
272 | A53AD00720CC347900C95844 /* Info.plist */,
273 | A59281E020D45634003013B8 /* TrayIcon.icns */,
274 | A5BDA2F520D06FFC00C9D006 /* MainMenu.xib */,
275 | A52DCDBB20D17767001F34AC /* VarnamIME.entitlements */,
276 | A53AD00F20CC641900C95844 /* LipikaEngine_OSX.framework */,
277 | );
278 | name = Resources;
279 | sourceTree = "";
280 | };
281 | A54397DA20D4D3F50011C7B7 /* Resources */ = {
282 | isa = PBXGroup;
283 | children = (
284 | A5C06C7B24A1358600FBD1E9 /* ShortcutRecorder.framework */,
285 | A54397D120D4D2F30011C7B7 /* Main.storyboard */,
286 | A54397D420D4D2F30011C7B7 /* Info.plist */,
287 | A54397D520D4D2F30011C7B7 /* VarnamApp.entitlements */,
288 | );
289 | name = Resources;
290 | sourceTree = "";
291 | };
292 | A546181D20CC69EC003A73EB /* Documents */ = {
293 | isa = PBXGroup;
294 | children = (
295 | A546182320CC6A23003A73EB /* bug_report.md */,
296 | A546182420CC6A23003A73EB /* feature_request.md */,
297 | A546182220CC6A06003A73EB /* CODE_OF_CONDUCT.md */,
298 | A546181F20CC6A06003A73EB /* CONTRIBUTING.md */,
299 | A546181E20CC6A06003A73EB /* LICENSE */,
300 | A546182120CC6A06003A73EB /* PULL_REQUEST_TEMPLATE.md */,
301 | A546182020CC6A06003A73EB /* README.md */,
302 | );
303 | name = Documents;
304 | sourceTree = "";
305 | };
306 | A57F18EA20D1FBA1007C9745 /* Installation */ = {
307 | isa = PBXGroup;
308 | children = (
309 | A53AD01A20CC658000C95844 /* InputSource.swift */,
310 | A5122A4220D420E100575848 /* main.swift */,
311 | );
312 | path = Installation;
313 | sourceTree = "";
314 | };
315 | /* End PBXGroup section */
316 |
317 | /* Begin PBXNativeTarget section */
318 | A5122A4620D429D300575848 /* Installer */ = {
319 | isa = PBXNativeTarget;
320 | buildConfigurationList = A5122A4B20D429D300575848 /* Build configuration list for PBXNativeTarget "Installer" */;
321 | buildPhases = (
322 | A5122A4320D429D300575848 /* Sources */,
323 | A5122A4420D429D300575848 /* Frameworks */,
324 | A5122A5520D43EE200575848 /* ShellScript */,
325 | );
326 | buildRules = (
327 | );
328 | dependencies = (
329 | A5122A5420D43D8800575848 /* PBXTargetDependency */,
330 | );
331 | name = Installer;
332 | productName = Installer;
333 | productReference = A5122A4720D429D300575848 /* Installer */;
334 | productType = "com.apple.product-type.tool";
335 | };
336 | A53ACFFC20CC347900C95844 /* VarnamIME */ = {
337 | isa = PBXNativeTarget;
338 | buildConfigurationList = A53AD00B20CC347900C95844 /* Build configuration list for PBXNativeTarget "VarnamIME" */;
339 | buildPhases = (
340 | A53ACFF920CC347900C95844 /* Sources */,
341 | A53ACFFA20CC347900C95844 /* Frameworks */,
342 | A53ACFFB20CC347900C95844 /* Resources */,
343 | A53AD01320CC643700C95844 /* Embed Frameworks */,
344 | 04D0A69527411260006C3B54 /* Copy Files */,
345 | );
346 | buildRules = (
347 | );
348 | dependencies = (
349 | );
350 | name = VarnamIME;
351 | productName = VarnamIME;
352 | productReference = A53ACFFD20CC347900C95844 /* VarnamIME.app */;
353 | productType = "com.apple.product-type.application";
354 | };
355 | A54397C820D4D2F10011C7B7 /* VarnamApp */ = {
356 | isa = PBXNativeTarget;
357 | buildConfigurationList = A54397D620D4D2F30011C7B7 /* Build configuration list for PBXNativeTarget "VarnamApp" */;
358 | buildPhases = (
359 | A54397C520D4D2F10011C7B7 /* Sources */,
360 | A54397C620D4D2F10011C7B7 /* Frameworks */,
361 | A54397C720D4D2F10011C7B7 /* Resources */,
362 | A54397DE20D4D6090011C7B7 /* Embed Frameworks */,
363 | );
364 | buildRules = (
365 | );
366 | dependencies = (
367 | );
368 | name = VarnamApp;
369 | productName = VarnamApp;
370 | productReference = A54397C920D4D2F10011C7B7 /* VarnamApp.app */;
371 | productType = "com.apple.product-type.application";
372 | };
373 | /* End PBXNativeTarget section */
374 |
375 | /* Begin PBXProject section */
376 | A53ACFF520CC347900C95844 /* Project object */ = {
377 | isa = PBXProject;
378 | attributes = {
379 | LastSwiftUpdateCheck = 0940;
380 | LastUpgradeCheck = 1250;
381 | ORGANIZATIONNAME = VarnamProject;
382 | TargetAttributes = {
383 | A5122A4620D429D300575848 = {
384 | CreatedOnToolsVersion = 9.4;
385 | LastSwiftMigration = 1030;
386 | };
387 | A53ACFFC20CC347900C95844 = {
388 | CreatedOnToolsVersion = 9.4;
389 | LastSwiftMigration = 1250;
390 | SystemCapabilities = {
391 | com.apple.ApplicationGroups.Mac = {
392 | enabled = 1;
393 | };
394 | };
395 | };
396 | A54397C820D4D2F10011C7B7 = {
397 | CreatedOnToolsVersion = 9.4;
398 | LastSwiftMigration = 1250;
399 | SystemCapabilities = {
400 | com.apple.ApplicationGroups.Mac = {
401 | enabled = 1;
402 | };
403 | };
404 | };
405 | };
406 | };
407 | buildConfigurationList = A53ACFF820CC347900C95844 /* Build configuration list for PBXProject "VarnamIME" */;
408 | compatibilityVersion = "Xcode 9.3";
409 | developmentRegion = en;
410 | hasScannedForEncodings = 0;
411 | knownRegions = (
412 | en,
413 | Base,
414 | );
415 | mainGroup = A53ACFF420CC347900C95844;
416 | productRefGroup = A53ACFFE20CC347900C95844 /* Products */;
417 | projectDirPath = "";
418 | projectRoot = "";
419 | targets = (
420 | A53ACFFC20CC347900C95844 /* VarnamIME */,
421 | A5122A4620D429D300575848 /* Installer */,
422 | A54397C820D4D2F10011C7B7 /* VarnamApp */,
423 | );
424 | };
425 | /* End PBXProject section */
426 |
427 | /* Begin PBXResourcesBuildPhase section */
428 | A53ACFFB20CC347900C95844 /* Resources */ = {
429 | isa = PBXResourcesBuildPhase;
430 | buildActionMask = 2147483647;
431 | files = (
432 | 04D0A697274112BE006C3B54 /* assets in Resources */,
433 | A546182720CC6BB2003A73EB /* LICENSE in Resources */,
434 | A59281E120D45653003013B8 /* TrayIcon.icns in Resources */,
435 | A5BDA2F620D06FFC00C9D006 /* MainMenu.xib in Resources */,
436 | A53AD00320CC347900C95844 /* Assets.xcassets in Resources */,
437 | );
438 | runOnlyForDeploymentPostprocessing = 0;
439 | };
440 | A54397C720D4D2F10011C7B7 /* Resources */ = {
441 | isa = PBXResourcesBuildPhase;
442 | buildActionMask = 2147483647;
443 | files = (
444 | A54397DB20D4D5E90011C7B7 /* Assets.xcassets in Resources */,
445 | A54397D320D4D2F30011C7B7 /* Main.storyboard in Resources */,
446 | );
447 | runOnlyForDeploymentPostprocessing = 0;
448 | };
449 | /* End PBXResourcesBuildPhase section */
450 |
451 | /* Begin PBXShellScriptBuildPhase section */
452 | A5122A5520D43EE200575848 /* ShellScript */ = {
453 | isa = PBXShellScriptBuildPhase;
454 | buildActionMask = 8;
455 | files = (
456 | );
457 | inputPaths = (
458 | );
459 | outputPaths = (
460 | );
461 | runOnlyForDeploymentPostprocessing = 1;
462 | shellPath = /bin/sh;
463 | shellScript = "set -ex\n${TARGET_BUILD_DIR}/Installer --remove\nif ! killall VarnamIME; then\n echo \"note: no VarnamIME process to kill\"\nfi\nrm -rf /Library/Input\\ Methods/VarnamIME.app\ncp -r ${TARGET_BUILD_DIR}/VarnamIME.app /Library/Input\\ Methods/\nopen /Library/Input\\ Methods/VarnamIME.app\n${TARGET_BUILD_DIR}/Installer --enable\n";
464 | };
465 | /* End PBXShellScriptBuildPhase section */
466 |
467 | /* Begin PBXSourcesBuildPhase section */
468 | A5122A4320D429D300575848 /* Sources */ = {
469 | isa = PBXSourcesBuildPhase;
470 | buildActionMask = 2147483647;
471 | files = (
472 | A5122A4E20D42A2000575848 /* InputSource.swift in Sources */,
473 | A5122A4F20D42A2000575848 /* main.swift in Sources */,
474 | );
475 | runOnlyForDeploymentPostprocessing = 0;
476 | };
477 | A53ACFF920CC347900C95844 /* Sources */ = {
478 | isa = PBXSourcesBuildPhase;
479 | buildActionMask = 2147483647;
480 | files = (
481 | A53AD00120CC347900C95844 /* AppDelegate.swift in Sources */,
482 | A53AD01F20CC660900C95844 /* VarnamController.swift in Sources */,
483 | 04D0A683273FC367006C3B54 /* Varnam.swift in Sources */,
484 | A53AD01720CC654700C95844 /* VarnamConfig.swift in Sources */,
485 | 04D0A69B27411F6D006C3B54 /* Logger.swift in Sources */,
486 | A53AD01D20CC659C00C95844 /* ClientManager.swift in Sources */,
487 | 04D0A69927411F47006C3B54 /* Config.swift in Sources */,
488 | 04D0A69D27411FB1006C3B54 /* Common.swift in Sources */,
489 | A5DC681F22335F72006FC519 /* AsyncDispatcher.swift in Sources */,
490 | );
491 | runOnlyForDeploymentPostprocessing = 0;
492 | };
493 | A54397C520D4D2F10011C7B7 /* Sources */ = {
494 | isa = PBXSourcesBuildPhase;
495 | buildActionMask = 2147483647;
496 | files = (
497 | 043C819427413B3800E6832E /* Varnam.swift in Sources */,
498 | A5698AE9247EFA8E00443158 /* MainView.swift in Sources */,
499 | A59E32562495A93300736334 /* LanguageTable.swift in Sources */,
500 | 043C818D274139D900E6832E /* Config.swift in Sources */,
501 | 0460D233274D668B005B91DB /* RecentlyLearnedWordsView.swift in Sources */,
502 | 043C818F274139DE00E6832E /* Common.swift in Sources */,
503 | 040A907E27523D2F008E365B /* RLWTable.swift in Sources */,
504 | A5E20D8424944B6E00EF7B1C /* LanguageView.swift in Sources */,
505 | A585A17D24AC28FC00816D1E /* PersistenceView.swift in Sources */,
506 | 043C818E274139DC00E6832E /* Logger.swift in Sources */,
507 | A54397E020D4D6840011C7B7 /* VarnamConfig.swift in Sources */,
508 | 043C819B27413CB500E6832E /* SettingsView.swift in Sources */,
509 | A54397CC20D4D2F20011C7B7 /* AppDelegate.swift in Sources */,
510 | A5E982802480658900D7B9A9 /* SettingsModel.swift in Sources */,
511 | );
512 | runOnlyForDeploymentPostprocessing = 0;
513 | };
514 | /* End PBXSourcesBuildPhase section */
515 |
516 | /* Begin PBXTargetDependency section */
517 | A5122A5420D43D8800575848 /* PBXTargetDependency */ = {
518 | isa = PBXTargetDependency;
519 | target = A53ACFFC20CC347900C95844 /* VarnamIME */;
520 | targetProxy = A5122A5320D43D8800575848 /* PBXContainerItemProxy */;
521 | };
522 | /* End PBXTargetDependency section */
523 |
524 | /* Begin PBXVariantGroup section */
525 | A54397D120D4D2F30011C7B7 /* Main.storyboard */ = {
526 | isa = PBXVariantGroup;
527 | children = (
528 | A54397D220D4D2F30011C7B7 /* Base */,
529 | );
530 | name = Main.storyboard;
531 | sourceTree = "";
532 | };
533 | /* End PBXVariantGroup section */
534 |
535 | /* Begin XCBuildConfiguration section */
536 | A5122A4C20D429D300575848 /* Debug */ = {
537 | isa = XCBuildConfiguration;
538 | buildSettings = {
539 | CODE_SIGN_IDENTITY = "Apple Development";
540 | CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
541 | CODE_SIGN_STYLE = Automatic;
542 | DEVELOPMENT_TEAM = 2P8V429HRL;
543 | ENABLE_HARDENED_RUNTIME = YES;
544 | OTHER_CODE_SIGN_FLAGS = "--timestamp";
545 | PRODUCT_BUNDLE_IDENTIFIER = com.varnamproject.mac.inputmethod.Varnam.Installer;
546 | PRODUCT_NAME = "$(TARGET_NAME)";
547 | PROVISIONING_PROFILE_SPECIFIER = "";
548 | };
549 | name = Debug;
550 | };
551 | A5122A4D20D429D300575848 /* Release */ = {
552 | isa = XCBuildConfiguration;
553 | buildSettings = {
554 | CODE_SIGN_IDENTITY = "Apple Development";
555 | CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
556 | CODE_SIGN_STYLE = Automatic;
557 | DEVELOPMENT_TEAM = 2P8V429HRL;
558 | ENABLE_HARDENED_RUNTIME = YES;
559 | OTHER_CODE_SIGN_FLAGS = "--timestamp";
560 | PRODUCT_BUNDLE_IDENTIFIER = com.varnamproject.mac.inputmethod.Varnam.Installer;
561 | PRODUCT_NAME = "$(TARGET_NAME)";
562 | PROVISIONING_PROFILE_SPECIFIER = "";
563 | };
564 | name = Release;
565 | };
566 | A53AD00920CC347900C95844 /* Debug */ = {
567 | isa = XCBuildConfiguration;
568 | buildSettings = {
569 | ALWAYS_SEARCH_USER_PATHS = NO;
570 | CLANG_ANALYZER_NONNULL = YES;
571 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
572 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
573 | CLANG_CXX_LIBRARY = "libc++";
574 | CLANG_ENABLE_MODULES = YES;
575 | CLANG_ENABLE_OBJC_ARC = YES;
576 | CLANG_ENABLE_OBJC_WEAK = YES;
577 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
578 | CLANG_WARN_BOOL_CONVERSION = YES;
579 | CLANG_WARN_COMMA = YES;
580 | CLANG_WARN_CONSTANT_CONVERSION = YES;
581 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
582 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
583 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
584 | CLANG_WARN_EMPTY_BODY = YES;
585 | CLANG_WARN_ENUM_CONVERSION = YES;
586 | CLANG_WARN_INFINITE_RECURSION = YES;
587 | CLANG_WARN_INT_CONVERSION = YES;
588 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
589 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
590 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
591 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
592 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
593 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
594 | CLANG_WARN_STRICT_PROTOTYPES = YES;
595 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
596 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
597 | CLANG_WARN_UNREACHABLE_CODE = YES;
598 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
599 | CODE_SIGN_IDENTITY = "Apple Development";
600 | CODE_SIGN_STYLE = Manual;
601 | CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
602 | COPY_PHASE_STRIP = NO;
603 | DEBUG_INFORMATION_FORMAT = dwarf;
604 | DEVELOPMENT_TEAM = 2P8V429HRL;
605 | ENABLE_HARDENED_RUNTIME = YES;
606 | ENABLE_STRICT_OBJC_MSGSEND = YES;
607 | ENABLE_TESTABILITY = YES;
608 | GCC_C_LANGUAGE_STANDARD = gnu11;
609 | GCC_DYNAMIC_NO_PIC = NO;
610 | GCC_NO_COMMON_BLOCKS = YES;
611 | GCC_OPTIMIZATION_LEVEL = 0;
612 | GCC_PREPROCESSOR_DEFINITIONS = (
613 | "DEBUG=1",
614 | "$(inherited)",
615 | );
616 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
617 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
618 | GCC_WARN_UNDECLARED_SELECTOR = YES;
619 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
620 | GCC_WARN_UNUSED_FUNCTION = YES;
621 | GCC_WARN_UNUSED_VARIABLE = YES;
622 | MACOSX_DEPLOYMENT_TARGET = 10.15;
623 | MTL_ENABLE_DEBUG_INFO = YES;
624 | ONLY_ACTIVE_ARCH = YES;
625 | SDKROOT = macosx;
626 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
627 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
628 | SWIFT_VERSION = 5.0;
629 | };
630 | name = Debug;
631 | };
632 | A53AD00A20CC347900C95844 /* Release */ = {
633 | isa = XCBuildConfiguration;
634 | buildSettings = {
635 | ALWAYS_SEARCH_USER_PATHS = NO;
636 | CLANG_ANALYZER_NONNULL = YES;
637 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
638 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
639 | CLANG_CXX_LIBRARY = "libc++";
640 | CLANG_ENABLE_MODULES = YES;
641 | CLANG_ENABLE_OBJC_ARC = YES;
642 | CLANG_ENABLE_OBJC_WEAK = YES;
643 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
644 | CLANG_WARN_BOOL_CONVERSION = YES;
645 | CLANG_WARN_COMMA = YES;
646 | CLANG_WARN_CONSTANT_CONVERSION = YES;
647 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
648 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
649 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
650 | CLANG_WARN_EMPTY_BODY = YES;
651 | CLANG_WARN_ENUM_CONVERSION = YES;
652 | CLANG_WARN_INFINITE_RECURSION = YES;
653 | CLANG_WARN_INT_CONVERSION = YES;
654 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
655 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
656 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
657 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
658 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
659 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
660 | CLANG_WARN_STRICT_PROTOTYPES = YES;
661 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
662 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
663 | CLANG_WARN_UNREACHABLE_CODE = YES;
664 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
665 | CODE_SIGN_IDENTITY = "Apple Development";
666 | CODE_SIGN_STYLE = Manual;
667 | CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
668 | COPY_PHASE_STRIP = NO;
669 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
670 | DEVELOPMENT_TEAM = 2P8V429HRL;
671 | ENABLE_HARDENED_RUNTIME = YES;
672 | ENABLE_NS_ASSERTIONS = NO;
673 | ENABLE_STRICT_OBJC_MSGSEND = YES;
674 | GCC_C_LANGUAGE_STANDARD = gnu11;
675 | GCC_NO_COMMON_BLOCKS = YES;
676 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
677 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
678 | GCC_WARN_UNDECLARED_SELECTOR = YES;
679 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
680 | GCC_WARN_UNUSED_FUNCTION = YES;
681 | GCC_WARN_UNUSED_VARIABLE = YES;
682 | MACOSX_DEPLOYMENT_TARGET = 10.15;
683 | MTL_ENABLE_DEBUG_INFO = NO;
684 | SDKROOT = macosx;
685 | SWIFT_COMPILATION_MODE = wholemodule;
686 | SWIFT_OPTIMIZATION_LEVEL = "-O";
687 | SWIFT_VERSION = 5.0;
688 | };
689 | name = Release;
690 | };
691 | A53AD00C20CC347900C95844 /* Debug */ = {
692 | isa = XCBuildConfiguration;
693 | buildSettings = {
694 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
695 | CLANG_ENABLE_MODULES = YES;
696 | CODE_SIGN_ENTITLEMENTS = "Input Source/VarnamIME.entitlements";
697 | CODE_SIGN_IDENTITY = "Apple Development";
698 | CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
699 | CODE_SIGN_STYLE = Automatic;
700 | COMBINE_HIDPI_IMAGES = YES;
701 | CURRENT_PROJECT_VERSION = 2.2;
702 | DEVELOPMENT_TEAM = 2P8V429HRL;
703 | ENABLE_HARDENED_RUNTIME = YES;
704 | FRAMEWORK_SEARCH_PATHS = (
705 | "$(inherited)",
706 | "$(PROJECT_DIR)/Input\\ Source",
707 | );
708 | INFOPLIST_FILE = "$(SRCROOT)/Input Source/Info.plist";
709 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Input Methods";
710 | LD_RUNPATH_SEARCH_PATHS = (
711 | "$(inherited)",
712 | "@executable_path/../Frameworks",
713 | );
714 | LIBRARY_SEARCH_PATHS = (
715 | "$(inherited)",
716 | "$(PROJECT_DIR)/GoVarnam",
717 | );
718 | MARKETING_VERSION = 2.2;
719 | OTHER_CODE_SIGN_FLAGS = "--timestamp";
720 | PRODUCT_BUNDLE_IDENTIFIER = com.varnamproject.mac.Varnam;
721 | PRODUCT_NAME = "$(TARGET_NAME)";
722 | PROVISIONING_PROFILE_SPECIFIER = "";
723 | SWIFT_OBJC_BRIDGING_HEADER = "GoVarnam/govarnam-Bridging-Header.h";
724 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
725 | SWIFT_VERSION = 5.0;
726 | VERSIONING_SYSTEM = "apple-generic";
727 | };
728 | name = Debug;
729 | };
730 | A53AD00D20CC347900C95844 /* Release */ = {
731 | isa = XCBuildConfiguration;
732 | buildSettings = {
733 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
734 | CLANG_ENABLE_MODULES = YES;
735 | CODE_SIGN_ENTITLEMENTS = "Input Source/VarnamIME.entitlements";
736 | CODE_SIGN_IDENTITY = "Apple Development";
737 | CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
738 | CODE_SIGN_STYLE = Automatic;
739 | COMBINE_HIDPI_IMAGES = YES;
740 | CURRENT_PROJECT_VERSION = 2.2;
741 | DEVELOPMENT_TEAM = 2P8V429HRL;
742 | ENABLE_HARDENED_RUNTIME = YES;
743 | FRAMEWORK_SEARCH_PATHS = (
744 | "$(inherited)",
745 | "$(PROJECT_DIR)/Input\\ Source",
746 | );
747 | INFOPLIST_FILE = "$(SRCROOT)/Input Source/Info.plist";
748 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Input Methods";
749 | LD_RUNPATH_SEARCH_PATHS = (
750 | "$(inherited)",
751 | "@executable_path/../Frameworks",
752 | );
753 | LIBRARY_SEARCH_PATHS = (
754 | "$(inherited)",
755 | "$(PROJECT_DIR)/GoVarnam",
756 | );
757 | MARKETING_VERSION = 2.2;
758 | OTHER_CODE_SIGN_FLAGS = "--timestamp";
759 | PRODUCT_BUNDLE_IDENTIFIER = com.varnamproject.mac.inputmethod.Varnam;
760 | PRODUCT_NAME = "$(TARGET_NAME)";
761 | PROVISIONING_PROFILE_SPECIFIER = "";
762 | SWIFT_OBJC_BRIDGING_HEADER = "GoVarnam/govarnam-Bridging-Header.h";
763 | SWIFT_VERSION = 5.0;
764 | VERSIONING_SYSTEM = "apple-generic";
765 | };
766 | name = Release;
767 | };
768 | A54397D720D4D2F30011C7B7 /* Debug */ = {
769 | isa = XCBuildConfiguration;
770 | buildSettings = {
771 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
772 | CLANG_ENABLE_MODULES = YES;
773 | CODE_SIGN_ENTITLEMENTS = Application/VarnamApp.entitlements;
774 | CODE_SIGN_IDENTITY = "Apple Development";
775 | CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
776 | CODE_SIGN_STYLE = Manual;
777 | COMBINE_HIDPI_IMAGES = YES;
778 | CURRENT_PROJECT_VERSION = 2.0;
779 | DEVELOPMENT_TEAM = "";
780 | ENABLE_HARDENED_RUNTIME = YES;
781 | FRAMEWORK_SEARCH_PATHS = (
782 | "$(inherited)",
783 | "$(PROJECT_DIR)/Input\\ Source",
784 | "$(PROJECT_DIR)/Application",
785 | );
786 | INFOPLIST_FILE = "$(SRCROOT)/Application/Info.plist";
787 | LD_RUNPATH_SEARCH_PATHS = (
788 | "$(inherited)",
789 | "@executable_path/../Frameworks",
790 | );
791 | LIBRARY_SEARCH_PATHS = (
792 | "$(inherited)",
793 | "$(PROJECT_DIR)/GoVarnam",
794 | );
795 | MARKETING_VERSION = 2.0;
796 | OTHER_CODE_SIGN_FLAGS = "--timestamp";
797 | PRODUCT_BUNDLE_IDENTIFIER = com.varnamproject.mac.VarnamApp;
798 | PRODUCT_NAME = "$(TARGET_NAME)";
799 | PROVISIONING_PROFILE_SPECIFIER = "";
800 | SWIFT_OBJC_BRIDGING_HEADER = "GoVarnam/govarnam-Bridging-Header.h";
801 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
802 | SWIFT_VERSION = 5.0;
803 | VERSIONING_SYSTEM = "apple-generic";
804 | };
805 | name = Debug;
806 | };
807 | A54397D820D4D2F30011C7B7 /* Release */ = {
808 | isa = XCBuildConfiguration;
809 | buildSettings = {
810 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
811 | CLANG_ENABLE_MODULES = YES;
812 | CODE_SIGN_ENTITLEMENTS = Application/VarnamApp.entitlements;
813 | CODE_SIGN_IDENTITY = "Apple Development";
814 | CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
815 | CODE_SIGN_STYLE = Manual;
816 | COMBINE_HIDPI_IMAGES = YES;
817 | CURRENT_PROJECT_VERSION = 2.0;
818 | DEVELOPMENT_TEAM = "";
819 | ENABLE_HARDENED_RUNTIME = YES;
820 | FRAMEWORK_SEARCH_PATHS = (
821 | "$(inherited)",
822 | "$(PROJECT_DIR)/Input\\ Source",
823 | "$(PROJECT_DIR)/Application",
824 | );
825 | INFOPLIST_FILE = "$(SRCROOT)/Application/Info.plist";
826 | LD_RUNPATH_SEARCH_PATHS = (
827 | "$(inherited)",
828 | "@executable_path/../Frameworks",
829 | );
830 | LIBRARY_SEARCH_PATHS = (
831 | "$(inherited)",
832 | "$(PROJECT_DIR)/GoVarnam",
833 | );
834 | MARKETING_VERSION = 2.0;
835 | OTHER_CODE_SIGN_FLAGS = "--timestamp";
836 | PRODUCT_BUNDLE_IDENTIFIER = com.varnamproject.mac.VarnamApp;
837 | PRODUCT_NAME = "$(TARGET_NAME)";
838 | PROVISIONING_PROFILE_SPECIFIER = "";
839 | SWIFT_OBJC_BRIDGING_HEADER = "GoVarnam/govarnam-Bridging-Header.h";
840 | SWIFT_VERSION = 5.0;
841 | VERSIONING_SYSTEM = "apple-generic";
842 | };
843 | name = Release;
844 | };
845 | /* End XCBuildConfiguration section */
846 |
847 | /* Begin XCConfigurationList section */
848 | A5122A4B20D429D300575848 /* Build configuration list for PBXNativeTarget "Installer" */ = {
849 | isa = XCConfigurationList;
850 | buildConfigurations = (
851 | A5122A4C20D429D300575848 /* Debug */,
852 | A5122A4D20D429D300575848 /* Release */,
853 | );
854 | defaultConfigurationIsVisible = 0;
855 | defaultConfigurationName = Release;
856 | };
857 | A53ACFF820CC347900C95844 /* Build configuration list for PBXProject "VarnamIME" */ = {
858 | isa = XCConfigurationList;
859 | buildConfigurations = (
860 | A53AD00920CC347900C95844 /* Debug */,
861 | A53AD00A20CC347900C95844 /* Release */,
862 | );
863 | defaultConfigurationIsVisible = 0;
864 | defaultConfigurationName = Release;
865 | };
866 | A53AD00B20CC347900C95844 /* Build configuration list for PBXNativeTarget "VarnamIME" */ = {
867 | isa = XCConfigurationList;
868 | buildConfigurations = (
869 | A53AD00C20CC347900C95844 /* Debug */,
870 | A53AD00D20CC347900C95844 /* Release */,
871 | );
872 | defaultConfigurationIsVisible = 0;
873 | defaultConfigurationName = Release;
874 | };
875 | A54397D620D4D2F30011C7B7 /* Build configuration list for PBXNativeTarget "VarnamApp" */ = {
876 | isa = XCConfigurationList;
877 | buildConfigurations = (
878 | A54397D720D4D2F30011C7B7 /* Debug */,
879 | A54397D820D4D2F30011C7B7 /* Release */,
880 | );
881 | defaultConfigurationIsVisible = 0;
882 | defaultConfigurationName = Release;
883 | };
884 | /* End XCConfigurationList section */
885 | };
886 | rootObject = A53ACFF520CC347900C95844 /* Project object */;
887 | }
888 |
--------------------------------------------------------------------------------
/VarnamIME.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/VarnamIME.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/VarnamIME.xcodeproj/xcshareddata/xcschemes/VarnamIME.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
45 |
51 |
52 |
53 |
54 |
60 |
62 |
68 |
69 |
70 |
71 |
73 |
74 |
77 |
78 |
79 |
--------------------------------------------------------------------------------