diff --git a/Source/Data b/Source/Data index e4143b8b..3fc29bcb 160000 --- a/Source/Data +++ b/Source/Data @@ -1 +1 @@ -Subproject commit e4143b8b79e3cf1acde79eba68c5c8e61349090e +Subproject commit 3fc29bcbc321f412e8a1656774fdae3009f01ac3 diff --git a/Source/Modules/AppDelegate.swift b/Source/Modules/AppDelegate.swift index 4f9aca18..2f747e21 100644 --- a/Source/Modules/AppDelegate.swift +++ b/Source/Modules/AppDelegate.swift @@ -199,6 +199,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega ctlPrefWindowInstance?.window?.center() ctlPrefWindowInstance?.window?.orderFrontRegardless() // 逼著屬性視窗往最前方顯示 ctlPrefWindowInstance?.window?.level = .statusBar + ctlPrefWindowInstance?.window?.titlebarAppearsTransparent = true } // New About Window diff --git a/Source/Modules/ControllerModules/KeyHandler.mm b/Source/Modules/ControllerModules/KeyHandler.mm index 457353bb..864e0dc9 100644 --- a/Source/Modules/ControllerModules/KeyHandler.mm +++ b/Source/Modules/ControllerModules/KeyHandler.mm @@ -433,8 +433,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; return YES; } - // MARK: Space and Down, plus PageUp / PageDn / PageLeft / PageRight. - // keyCode 125 = Down, charCode 32 = Space + // MARK: Calling candidate window using Space or Down or PageUp / PageDn. if (_bpmfReadingBuffer->isEmpty() && [state isKindOfClass:[InputStateNotEmpty class]] && ([input isExtraChooseCandidateKey] || [input isExtraChooseCandidateKeyReverse] @@ -527,7 +526,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; // MARK: Enter if ([input isEnter]) { if ([input isControlHold]) { - if (![input isCommandHold]) { + if (ctlInputMethod.areWeUsingOurOwnPhraseEditor || [input isCommandHold]) { return [self _handleCtrlEnterWithState:state stateCallback:stateCallback errorCallback:errorCallback]; } } @@ -586,7 +585,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; // Lukhnos 這裡的處理反而會使得 Apple 倚天注音動態鍵盤佈局「敲不了半形大寫英文」的缺點曝露無疑,所以注釋掉。 // 至於他試圖用這種處理來解決的上游 UPR293 的問題,其實針對詞庫檔案的排序做點手腳就可以解決。威注音本來也就是這麼做的。 - if (/*[state isKindOfClass:[InputStateNotEmpty class]] && */(char) charCode >= 'A' && (char) charCode <= 'Z') { + if (/*[state isKindOfClass:[InputStateNotEmpty class]] && */[input isUpperCaseASCIILetterKey]) { std::string letter = std::string("_letter_") + std::string(1, (char) charCode); if ([self _handlePunctuation:letter state:state usingVerticalMode:input.useVerticalMode stateCallback:stateCallback errorCallback:errorCallback]) { return YES; @@ -1254,7 +1253,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; BOOL shouldAutoSelectCandidate = _bpmfReadingBuffer->isValidKey((char) charCode) || _languageModel->hasUnigramsForKey(customPunctuation) || _languageModel->hasUnigramsForKey(punctuation); - if (!shouldAutoSelectCandidate && (char) charCode >= 'A' && (char) charCode <= 'Z') { + if (!shouldAutoSelectCandidate && [input isUpperCaseASCIILetterKey]) { std::string letter = std::string("_letter_") + std::string(1, (char) charCode); if (_languageModel->hasUnigramsForKey(letter)) { shouldAutoSelectCandidate = YES; diff --git a/Source/Modules/ControllerModules/KeyHandlerInput.swift b/Source/Modules/ControllerModules/KeyHandlerInput.swift index 7ab70873..f29097fa 100644 --- a/Source/Modules/ControllerModules/KeyHandlerInput.swift +++ b/Source/Modules/ControllerModules/KeyHandlerInput.swift @@ -233,6 +233,11 @@ class KeyHandlerInput: NSObject { KeyCode(rawValue: keyCode) == verticalModeOnlyChooseCandidateKey } + @objc var isUpperCaseASCIILetterKey: Bool { + // 這裡必須加上「flags == .shift」,否則會出現某些情況下輸入法「誤判當前鍵入的非 Shift 字符為大寫」的問題。 + self.charCode >= 65 && self.charCode <= 90 && flags == .shift + } + @objc var isSymbolMenuPhysicalKey: Bool { // 這裡必須用 KeyCode,這樣才不會受隨 macOS 版本更動的 Apple 動態注音鍵盤排列內容的影響。 // 只是必須得與 ![input isShift] 搭配使用才可以(也就是僅判定 Shift 沒被摁下的情形)。 diff --git a/Source/Modules/FileHandlers/LMConsolidator.mm b/Source/Modules/FileHandlers/LMConsolidator.mm index cd4fd9b3..0c26866d 100644 --- a/Source/Modules/FileHandlers/LMConsolidator.mm +++ b/Source/Modules/FileHandlers/LMConsolidator.mm @@ -72,7 +72,8 @@ bool LMConsolidator::FixEOF(const char *path) // CONTENT CONSOLIDATOR. CREDIT: Shiki Suen. bool LMConsolidator::ConsolidateContent(const char *path, bool shouldCheckPragma) { - if (LMConsolidator::CheckPragma(path) && shouldCheckPragma){ + bool pragmaCheckResult = LMConsolidator::CheckPragma(path); + if (pragmaCheckResult && shouldCheckPragma){ return true; } @@ -107,7 +108,7 @@ bool LMConsolidator::ConsolidateContent(const char *path, bool shouldCheckPragma std::reverse(vecEntry.begin(), vecEntry.end()); // 再顛倒回來。 // 統整完畢。開始將統整過的內容寫入檔案。 ofstream zfdContentConsolidatorOutput(path); // 這裡是要從頭開始重寫檔案內容,所以不需要「 ios_base::app 」。 - if (!LMConsolidator::CheckPragma(path)){ + if (!pragmaCheckResult){ zfdContentConsolidatorOutput< #include @@ -89,8 +90,11 @@ public: /// @param userPhrasesPath The path of user phrases. /// @param excludedPhrasesPath The path of excluded phrases. void loadUserPhrases(const char* userPhrasesPath, const char* excludedPhrasesPath); + /// Asks to load the user symbol data at the given path. + /// @param userSymbolDataPath The path of user symbol data. + void loadUserSymbolData(const char* userPhrasesPath); /// Asks to load the user associated phrases at the given path. - /// @param userAssociatedPhrasesPath The path of the phrase replacement table. + /// @param userAssociatedPhrasesPath The path of the user associated phrases. void loadUserAssociatedPhrases(const char* userAssociatedPhrasesPath); /// Asks to load the phrase replacement table at the given path. /// @param phraseReplacementPath The path of the phrase replacement table. @@ -150,6 +154,7 @@ protected: CNSLM m_cnsModel; UserPhrasesLM m_userPhrases; UserPhrasesLM m_excludedPhrases; + UserSymbolLM m_userSymbolModel; PhraseReplacementMap m_phraseReplacement; AssociatedPhrases m_associatedPhrases; bool m_phraseReplacementEnabled; diff --git a/Source/Modules/LangModelRelated/LMInstantiator.mm b/Source/Modules/LangModelRelated/LMInstantiator.mm index 948f9aff..870468c8 100644 --- a/Source/Modules/LangModelRelated/LMInstantiator.mm +++ b/Source/Modules/LangModelRelated/LMInstantiator.mm @@ -32,6 +32,7 @@ LMInstantiator::~LMInstantiator() m_languageModel.close(); m_miscModel.close(); m_userPhrases.close(); + m_userSymbolModel.close(); m_cnsModel.close(); m_excludedPhrases.close(); m_phraseReplacement.close(); @@ -103,6 +104,14 @@ void LMInstantiator::loadUserPhrases(const char* userPhrasesDataPath, } } +void LMInstantiator::loadUserSymbolData(const char *userSymbolDataPath) +{ + if (userSymbolDataPath) { + m_userSymbolModel.close(); + m_userSymbolModel.open(userSymbolDataPath); + } +} + void LMInstantiator::loadUserAssociatedPhrases(const char *userAssociatedPhrasesPath) { if (userAssociatedPhrasesPath) { @@ -140,6 +149,7 @@ const std::vector LMInstantiator::unigramsForKey(const std std::vector miscUnigrams; std::vector symbolUnigrams; std::vector userUnigrams; + std::vector userSymbolUnigrams; std::vector cnsUnigrams; std::unordered_set excludedValues; @@ -175,6 +185,11 @@ const std::vector LMInstantiator::unigramsForKey(const std symbolUnigrams = filterAndTransformUnigrams(rawSymbolUnigrams, excludedValues, insertedValues); } + if (m_userSymbolModel.hasUnigramsForKey(key) && m_symbolEnabled) { + std::vector rawUserSymbolUnigrams = m_userSymbolModel.unigramsForKey(key); + userSymbolUnigrams = filterAndTransformUnigrams(rawUserSymbolUnigrams, excludedValues, insertedValues); + } + if (m_cnsModel.hasUnigramsForKey(key) && m_cnsEnabled) { std::vector rawCNSUnigrams = m_cnsModel.unigramsForKey(key); cnsUnigrams = filterAndTransformUnigrams(rawCNSUnigrams, excludedValues, insertedValues); @@ -183,6 +198,7 @@ const std::vector LMInstantiator::unigramsForKey(const std allUnigrams.insert(allUnigrams.begin(), userUnigrams.begin(), userUnigrams.end()); allUnigrams.insert(allUnigrams.end(), cnsUnigrams.begin(), cnsUnigrams.end()); allUnigrams.insert(allUnigrams.begin(), miscUnigrams.begin(), miscUnigrams.end()); + allUnigrams.insert(allUnigrams.end(), userSymbolUnigrams.begin(), userSymbolUnigrams.end()); allUnigrams.insert(allUnigrams.end(), symbolUnigrams.begin(), symbolUnigrams.end()); return allUnigrams; } diff --git a/Source/Modules/LangModelRelated/SubLanguageModels/InstantiatedModels/SymbolLM.h b/Source/Modules/LangModelRelated/SubLanguageModels/InstantiatedModels/SymbolLM.h index e2402f91..48409bc4 100644 --- a/Source/Modules/LangModelRelated/SubLanguageModels/InstantiatedModels/SymbolLM.h +++ b/Source/Modules/LangModelRelated/SubLanguageModels/InstantiatedModels/SymbolLM.h @@ -35,7 +35,7 @@ public: return false; } virtual float overridedValue() override { - return -12.0; + return -13.0; } }; diff --git a/Source/Modules/LangModelRelated/SubLanguageModels/InstantiatedModels/UserSymbolLM.h b/Source/Modules/LangModelRelated/SubLanguageModels/InstantiatedModels/UserSymbolLM.h new file mode 100644 index 00000000..96ee02d5 --- /dev/null +++ b/Source/Modules/LangModelRelated/SubLanguageModels/InstantiatedModels/UserSymbolLM.h @@ -0,0 +1,44 @@ +// Copyright (c) 2011 and onwards The OpenVanilla Project (MIT License). +// All possible vChewing-specific modifications are (c) 2021 and onwards The vChewing Project (MIT-NTL License). +/* +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and +to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +2. No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, + except as required to fulfill notice requirements above. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef USERSYMBOLLM_H +#define USERSYMBOLLM_H + +#include +#include +#include +#include "LanguageModel.h" +#include "UserPhrasesLM.h" + +namespace vChewing { + +class UserSymbolLM: public UserPhrasesLM +{ +public: + virtual bool allowConsolidation() override { + return true; + } + virtual float overridedValue() override { + return -12.0; + } +}; + +} + +#endif diff --git a/Source/Modules/LangModelRelated/mgrLangModel.h b/Source/Modules/LangModelRelated/mgrLangModel.h index 34c3dc48..cfa533dd 100644 --- a/Source/Modules/LangModelRelated/mgrLangModel.h +++ b/Source/Modules/LangModelRelated/mgrLangModel.h @@ -40,6 +40,7 @@ NS_ASSUME_NONNULL_BEGIN + (NSString *)specifyBundleDataPath:(NSString *)filename; + (NSString *)userPhrasesDataPath:(InputMode)mode; ++ (NSString *)userSymbolDataPath:(InputMode)mode; + (NSString *)userAssociatedPhrasesDataPath:(InputMode)mode; + (NSString *)excludedPhrasesDataPath:(InputMode)mode; + (NSString *)phraseReplacementDataPath:(InputMode)mode; diff --git a/Source/Modules/LangModelRelated/mgrLangModel.mm b/Source/Modules/LangModelRelated/mgrLangModel.mm index 6e211979..7c29f6f9 100644 --- a/Source/Modules/LangModelRelated/mgrLangModel.mm +++ b/Source/Modules/LangModelRelated/mgrLangModel.mm @@ -34,6 +34,7 @@ static NSString *const kUserDataTemplateName = @"template-data"; static NSString *const kUserAssDataTemplateName = @"template-data"; static NSString *const kExcludedPhrasesvChewingTemplateName = @"template-exclude-phrases"; static NSString *const kPhraseReplacementTemplateName = @"template-phrases-replacement"; +static NSString *const kUserSymbolDataTemplateName = @"template-user-symbol-data"; static NSString *const kTemplateExtension = @".txt"; @implementation mgrLangModel @@ -117,6 +118,8 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing { gLangModelCHT.loadUserPhrases([[self userPhrasesDataPath:imeModeCHT] UTF8String], [[self excludedPhrasesDataPath:imeModeCHT] UTF8String]); gLangModelCHS.loadUserPhrases([[self userPhrasesDataPath:imeModeCHS] UTF8String], [[self excludedPhrasesDataPath:imeModeCHS] UTF8String]); + gLangModelCHT.loadUserSymbolData([[self userSymbolDataPath:imeModeCHT] UTF8String]); + gLangModelCHS.loadUserSymbolData([[self userSymbolDataPath:imeModeCHS] UTF8String]); } + (void)loadUserAssociatedPhrases @@ -205,33 +208,17 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing + (BOOL)checkIfUserLanguageModelFilesExist { - if (![self checkIfUserDataFolderExists]) { - return NO; - } - if (![self ensureFileExists:[self userPhrasesDataPath:imeModeCHS] populateWithTemplate:kUserDataTemplateName extension:kTemplateExtension]) { - return NO; - } - if (![self ensureFileExists:[self userPhrasesDataPath:imeModeCHT] populateWithTemplate:kUserDataTemplateName extension:kTemplateExtension]) { - return NO; - } - if (![self ensureFileExists:[self userAssociatedPhrasesDataPath:imeModeCHS] populateWithTemplate:kUserAssDataTemplateName extension:kTemplateExtension]) { - return NO; - } - if (![self ensureFileExists:[self userAssociatedPhrasesDataPath:imeModeCHT] populateWithTemplate:kUserAssDataTemplateName extension:kTemplateExtension]) { - return NO; - } - if (![self ensureFileExists:[self excludedPhrasesDataPath:imeModeCHS] populateWithTemplate:kExcludedPhrasesvChewingTemplateName extension:kTemplateExtension]) { - return NO; - } - if (![self ensureFileExists:[self excludedPhrasesDataPath:imeModeCHT] populateWithTemplate:kExcludedPhrasesvChewingTemplateName extension:kTemplateExtension]) { - return NO; - } - if (![self ensureFileExists:[self phraseReplacementDataPath:imeModeCHS] populateWithTemplate:kPhraseReplacementTemplateName extension:kTemplateExtension]) { - return NO; - } - if (![self ensureFileExists:[self phraseReplacementDataPath:imeModeCHT] populateWithTemplate:kPhraseReplacementTemplateName extension:kTemplateExtension]) { - return NO; - } + if (![self checkIfUserDataFolderExists]) return NO; + if (![self ensureFileExists:[self userPhrasesDataPath:imeModeCHS] populateWithTemplate:kUserDataTemplateName extension:kTemplateExtension]) return NO; + if (![self ensureFileExists:[self userPhrasesDataPath:imeModeCHT] populateWithTemplate:kUserDataTemplateName extension:kTemplateExtension]) return NO; + if (![self ensureFileExists:[self userAssociatedPhrasesDataPath:imeModeCHS] populateWithTemplate:kUserAssDataTemplateName extension:kTemplateExtension]) return NO; + if (![self ensureFileExists:[self userAssociatedPhrasesDataPath:imeModeCHT] populateWithTemplate:kUserAssDataTemplateName extension:kTemplateExtension]) return NO; + if (![self ensureFileExists:[self excludedPhrasesDataPath:imeModeCHS] populateWithTemplate:kExcludedPhrasesvChewingTemplateName extension:kTemplateExtension]) return NO; + if (![self ensureFileExists:[self excludedPhrasesDataPath:imeModeCHT] populateWithTemplate:kExcludedPhrasesvChewingTemplateName extension:kTemplateExtension]) return NO; + if (![self ensureFileExists:[self phraseReplacementDataPath:imeModeCHS] populateWithTemplate:kPhraseReplacementTemplateName extension:kTemplateExtension]) return NO; + if (![self ensureFileExists:[self phraseReplacementDataPath:imeModeCHT] populateWithTemplate:kPhraseReplacementTemplateName extension:kTemplateExtension]) return NO; + if (![self ensureFileExists:[self userSymbolDataPath:imeModeCHT] populateWithTemplate:kUserSymbolDataTemplateName extension:kTemplateExtension]) return NO; + if (![self ensureFileExists:[self userSymbolDataPath:imeModeCHS] populateWithTemplate:kUserSymbolDataTemplateName extension:kTemplateExtension]) return NO; return YES; } @@ -321,6 +308,12 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing return [[self dataFolderPath] stringByAppendingPathComponent:fileName]; } ++ (NSString *)userSymbolDataPath:(InputMode)mode; +{ + NSString *fileName = [mode isEqualToString:imeModeCHT] ? @"usersymbolphrases-cht.txt" : @"usersymbolphrases-chs.txt"; + return [[self dataFolderPath] stringByAppendingPathComponent:fileName]; +} + + (NSString *)userAssociatedPhrasesDataPath:(InputMode)mode; { NSString *fileName = [mode isEqualToString:imeModeCHT] ? @"associatedPhrases-cht.txt" : @"associatedPhrases-chs.txt"; diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 778638a9..71eaffe8 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -19,7 +19,7 @@ "Reload User Phrases" = "Reload User Phrases"; "Unable to create the user phrase file." = "Unable to create the user phrase file."; "Please check the permission at \"%@\"." = "Please check the permission at \"%@\"."; -"Edit Excluded Phrases" = "Edit Excluded Phrases…"; +"Edit Excluded Phrases…" = "Edit Excluded Phrases…"; "Half-Width Punctuation Mode" = "Half-Width Punctuation Mode"; "\"%@\" length must ≥ 2 for a user phrase." = "\"%@\" length must ≥ 2 for a user phrase."; "\"%@\" length should ≤ %d for a user phrase." = "\"%@\" length should ≤ %d for a user phrase."; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 778638a9..8ee2b1fd 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -19,7 +19,7 @@ "Reload User Phrases" = "Reload User Phrases"; "Unable to create the user phrase file." = "Unable to create the user phrase file."; "Please check the permission at \"%@\"." = "Please check the permission at \"%@\"."; -"Edit Excluded Phrases" = "Edit Excluded Phrases…"; +"Edit Excluded Phrases…" = "Edit Excluded Phrases…"; "Half-Width Punctuation Mode" = "Half-Width Punctuation Mode"; "\"%@\" length must ≥ 2 for a user phrase." = "\"%@\" length must ≥ 2 for a user phrase."; "\"%@\" length should ≤ %d for a user phrase." = "\"%@\" length should ≤ %d for a user phrase."; @@ -51,6 +51,7 @@ "Apple Zhuyin Bopomofo" = "Apple Zhuyin Bopomofo (Standard)"; "Apple Zhuyin Eten" = "Apple Zhuyin Eten"; "Symbol & Emoji Input" = "Symbol & Emoji Input"; +"Edit User Symbol & Emoji Data…" = "Edit User Symbol & Emoji Data…"; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "CommonSymbols"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 4dea78fb..55613cb5 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -19,7 +19,7 @@ "Reload User Phrases" = "ユーザー辞書を再び読込む"; "Unable to create the user phrase file." = "ユーザー辞書ファイルの作成は失敗しました。"; "Please check the permission at \"%@\"." = "「%@」に書き出す権限は不足らしい。"; -"Edit Excluded Phrases" = "辞書条目排除表を編集…"; +"Edit Excluded Phrases…" = "辞書条目排除表を編集…"; "Half-Width Punctuation Mode" = "半角句読モード"; "\"%@\" length must ≥ 2 for a user phrase." = "「%@」もう1つ文字のお選びを。"; "\"%@\" length should ≤ %d for a user phrase." = "「%@」文字数過剰で登録不可、%d 文字以内にして下さい。"; @@ -51,6 +51,7 @@ "Apple Zhuyin Bopomofo" = "Apple 注音ボポモフォ配列(大千標準)"; "Apple Zhuyin Eten" = "Apple 注音ボポモフォ配列(倚天伝統)"; "Symbol & Emoji Input" = "符号&絵文字入力"; +"Edit User Symbol & Emoji Data…" = "ユーザー符号&絵文字辞書を編集…"; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "常用"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 01ce1d54..fbc66ba3 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -19,7 +19,7 @@ "Reload User Phrases" = "重载自订语汇"; "Unable to create the user phrase file." = "无法创建自订语汇档案。"; "Please check the permission at \"%@\"." = "请检查此处的存取权限:\"%@\"."; -"Edit Excluded Phrases" = "编辑要滤除的语汇…"; +"Edit Excluded Phrases…" = "编辑要滤除的语汇…"; "Half-Width Punctuation Mode" = "半角标点模式"; "\"%@\" length must ≥ 2 for a user phrase." = "「%@」字数不足以自订语汇。"; "\"%@\" length should ≤ %d for a user phrase." = "「%@」字数超过 %d、无法自订。"; @@ -51,6 +51,7 @@ "Apple Zhuyin Bopomofo" = "Apple 标准注音键盘布局"; "Apple Zhuyin Eten" = "Apple 倚天注音键盘布局"; "Symbol & Emoji Input" = "符号&绘文字输入"; +"Edit User Symbol & Emoji Data…" = "编辑自订符号&绘文字资料…"; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "常用"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index dd6aec31..a45ea0ce 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -19,7 +19,7 @@ "Reload User Phrases" = "重載自訂語彙"; "Unable to create the user phrase file." = "無法創建自訂語彙檔案。"; "Please check the permission at \"%@\"." = "請檢查此處的存取權限:\"%@\"."; -"Edit Excluded Phrases" = "編輯要濾除的語彙…"; +"Edit Excluded Phrases…" = "編輯要濾除的語彙…"; "Half-Width Punctuation Mode" = "半形標點模式"; "\"%@\" length must ≥ 2 for a user phrase." = "「%@」字數不足以自訂語彙。"; "\"%@\" length should ≤ %d for a user phrase." = "「%@」字數超過 %d、無法自訂。"; @@ -51,6 +51,7 @@ "Apple Zhuyin Bopomofo" = "Apple 標準注音鍵盤佈局"; "Apple Zhuyin Eten" = "Apple 倚天注音鍵盤佈局"; "Symbol & Emoji Input" = "符號&繪文字輸入"; +"Edit User Symbol & Emoji Data…" = "編輯自訂符號&繪文字資料…"; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "常用"; diff --git a/Source/UI/NotifierUI/NotifierController.swift b/Source/UI/NotifierUI/NotifierController.swift index e8c8ff15..bc9b7087 100644 --- a/Source/UI/NotifierUI/NotifierController.swift +++ b/Source/UI/NotifierUI/NotifierController.swift @@ -100,10 +100,15 @@ public class NotifierController: NSWindowController, NotifierWindowDelegate { windowRect.origin.x = screenRect.maxX - windowRect.width - 10 windowRect.origin.y = screenRect.maxY - windowRect.height - 10 let styleMask: NSWindow.StyleMask = [.fullSizeContentView, .titled] - - - + + let transparentVisualEffect = NSVisualEffectView() + transparentVisualEffect.blendingMode = .behindWindow + transparentVisualEffect.state = .active + transparentVisualEffect.material = .dark + let panel = NotifierWindow(contentRect: windowRect, styleMask: styleMask, backing: .buffered, defer: false) + panel.contentView = transparentVisualEffect + panel.isMovableByWindowBackground = true panel.level = NSWindow.Level(Int(kCGPopUpMenuWindowLevel)) panel.hasShadow = true panel.backgroundColor = backgroundColor diff --git a/Source/WindowControllers/ctlAboutWindow.swift b/Source/WindowControllers/ctlAboutWindow.swift index 4fd33f79..c144e201 100644 --- a/Source/WindowControllers/ctlAboutWindow.swift +++ b/Source/WindowControllers/ctlAboutWindow.swift @@ -42,5 +42,10 @@ import Cocoa } appVersionLabel.stringValue = String(format: "%@ Build %@", versionString, installingVersion) } - + + @IBAction func btnWiki(_ sender: NSButton) { + if let url = URL(string: "https://gitee.com/vchewing/vChewing-macOS/wikis") { + NSWorkspace.shared.open(url) + } + } } diff --git a/Source/WindowControllers/ctlPrefWindow.swift b/Source/WindowControllers/ctlPrefWindow.swift index 9f3a1756..3954266f 100644 --- a/Source/WindowControllers/ctlPrefWindow.swift +++ b/Source/WindowControllers/ctlPrefWindow.swift @@ -41,7 +41,9 @@ extension RangeReplaceableCollection where Element: Hashable { var currentLanguageSelectItem: NSMenuItem? = nil - override func awakeFromNib() { + override func windowDidLoad() { + super.windowDidLoad() + let languages = ["auto", "en", "zh-Hans", "zh-Hant", "ja"] var autoMUISelectItem: NSMenuItem? = nil var chosenLanguageItem: NSMenuItem? = nil @@ -156,9 +158,6 @@ extension RangeReplaceableCollection where Element: Hashable { } selectionKeyComboBox.stringValue = candidateSelectionKeys - - // MARK: - 設定漢字轉換選項是否禁用 - } // 這裡有必要加上這段處理,用來確保藉由偏好設定介面動過的 CNS 開關能夠立刻生效。 @@ -214,27 +213,25 @@ extension RangeReplaceableCollection where Element: Hashable { @IBAction func changeSelectionKeyAction(_ sender: Any) { guard let keys = (sender as AnyObject).stringValue?.trimmingCharacters(in: .whitespacesAndNewlines).charDeDuplicate else { - return + return + } + do { + try Preferences.validate(candidateKeys: keys) + Preferences.candidateKeys = keys + selectionKeyComboBox.stringValue = Preferences.candidateKeys + } + catch Preferences.CandidateKeyError.empty { + selectionKeyComboBox.stringValue = Preferences.candidateKeys + } + catch { + if let window = window { + let alert = NSAlert(error: error) + alert.beginSheetModal(for: window) { response in + self.selectionKeyComboBox.stringValue = Preferences.candidateKeys } - do { - try Preferences.validate(candidateKeys: keys) - Preferences.candidateKeys = keys - } - catch Preferences.CandidateKeyError.empty { - selectionKeyComboBox.stringValue = Preferences.candidateKeys - } - catch { - if let window = window { - let alert = NSAlert(error: error) - alert.beginSheetModal(for: window) { response in - self.selectionKeyComboBox.stringValue = Preferences.candidateKeys - } - clsSFX.beep() - } - } - - selectionKeyComboBox.stringValue = keys - Preferences.candidateKeys = keys + clsSFX.beep() + } + } } } diff --git a/Source/WindowNIBs/Base.lproj/MainMenu.xib b/Source/WindowNIBs/Base.lproj/MainMenu.xib index ccea8b9c..2c5e937c 100644 --- a/Source/WindowNIBs/Base.lproj/MainMenu.xib +++ b/Source/WindowNIBs/Base.lproj/MainMenu.xib @@ -23,6 +23,17 @@ + diff --git a/Source/WindowNIBs/Base.lproj/frmAboutWindow.xib b/Source/WindowNIBs/Base.lproj/frmAboutWindow.xib index 1700100f..33c00d01 100644 --- a/Source/WindowNIBs/Base.lproj/frmAboutWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmAboutWindow.xib @@ -1,8 +1,8 @@ - + - + @@ -156,12 +156,23 @@ DQ + + @@ -182,12 +193,14 @@ DQ + + diff --git a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index e59f26c0..4fc4b409 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -1,8 +1,8 @@ - + - + @@ -20,15 +20,15 @@ - - - - - + + + + + - + @@ -328,11 +328,11 @@ - + - + @@ -575,11 +575,11 @@ - + - + @@ -635,11 +635,11 @@ - + - + @@ -662,13 +662,13 @@ - Regarding On-Screen Keyboard Viewer Support: + Regarding On-Screen Keyboard Viewer Support: Since v1.3.2, vChewing supports on-screen keyboard by supporting "Apple Zhuyin Bopomofo" and "Apple Zhuyin Eten" alphanumeric layout. Theoreotically, these two dynamic layouts work with all types of Apple physical keyboards, and you can report failure cases through macOS Feedback Assistant app if macOS built-in Zhuyin / Eten-Zhuyin Input Method fails from working with your non-US keyboard. HOWEVER, choosing such dynamic alphanumeric layouts REQUIRING THAT you have to choose the Bopomofo layout above to Standard (Microsoft / Dachen) since the Bopomofo / Eten layout support in this case is already finished by the macOS system. - Note that If you have chosen those "vChewing****" Alphanumerical layouts, then the Bopomofo layouts MUST MATCH the choices. + Note that If you have chosen those "vChewing****" Alphanumerical layouts, then the Bopomofo layouts MUST MATCH the choices. @@ -770,13 +770,13 @@ - - + + - + diff --git a/Update-Info.plist b/Update-Info.plist index b6f79ade..111d259b 100644 --- a/Update-Info.plist +++ b/Update-Info.plist @@ -7,8 +7,8 @@ UpdateInfoSite https://gitee.com/vChewing/vChewing-macOS/releases CFBundleVersion - 1929 + 1930 CFBundleShortVersionString - 1.3.8 + 1.3.9 diff --git a/UserPhraseEditor/Resources/Base.lproj/frmAboutWindow.xib b/UserPhraseEditor/Resources/Base.lproj/frmAboutWindow.xib index e5952bda..bb45461e 100644 --- a/UserPhraseEditor/Resources/Base.lproj/frmAboutWindow.xib +++ b/UserPhraseEditor/Resources/Base.lproj/frmAboutWindow.xib @@ -1,8 +1,8 @@ - + - + @@ -155,8 +155,16 @@ DQ + + @@ -181,6 +189,7 @@ DQ + @@ -191,6 +200,7 @@ DQ + diff --git a/UserPhraseEditor/ctlAboutWindow.swift b/UserPhraseEditor/ctlAboutWindow.swift index 4fd33f79..c144e201 100644 --- a/UserPhraseEditor/ctlAboutWindow.swift +++ b/UserPhraseEditor/ctlAboutWindow.swift @@ -42,5 +42,10 @@ import Cocoa } appVersionLabel.stringValue = String(format: "%@ Build %@", versionString, installingVersion) } - + + @IBAction func btnWiki(_ sender: NSButton) { + if let url = URL(string: "https://gitee.com/vchewing/vChewing-macOS/wikis") { + NSWorkspace.shared.open(url) + } + } } diff --git a/uninstall.sh b/uninstall.sh new file mode 100644 index 00000000..2c519950 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +# Here's how to uninstall this input method: + +# Suppose that this IME is properly installed, you remove the following possible assets: + +rm -rf ~/Library/Input\ Methods/vChewing.app +rm -rf ~/Library/Keyboard\ Layouts/vChewingKeyLayout.bundle +rm ~/Library/Keyboard\ Layouts/vChewing\ MiTAC.keylayout +rm ~/Library/Keyboard\ Layouts/vChewing\ IBM.keylayout +rm ~/Library/Keyboard\ Layouts/vChewing\ FakeSeigyou.keylayout +rm ~/Library/Keyboard\ Layouts/vChewing\ ETen.keylayout +rm ~/Library/Keyboard\ Layouts/vChewing\ Dachen.keylayout + +# Also user phrase folder: +rm -rf ~/Library/Application\ Support/vChewing/ + +# Also the IME configuration file: +rm -rf ~/Library/Preferences/org.atelierInmu.inputmethod.vChewing.plist + +# If you have ever tried the initial alpha builds of vChewing, you also remove: +rm -rf ~/Library/Preferences/org.openvanilla.inputmethod.vChewing.plist + +# If it is not properly installed, you also check the following possible paths to remove: +sudo rm -rf /Library/Input\ Methods/vChewing.app +sudo rm -rf /Library/Keyboard\ Layouts/vChewingKeyLayout.bundle +sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ MiTAC.keylayout +sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ IBM.keylayout +sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ FakeSeigyou.keylayout +sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ ETen.keylayout +sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ Dachen.keylayout + +# P.S.: The "vChewingKeyLayout.bundle" and keylayout files are deployed by the pkg installer. They are not hard-requirements for running vChewing, but providing extended on-screen keyboard for MiTAC, IBM, FakeSeigyou phonetic layouts. + +# EOF. + diff --git a/vChewing.pkgproj b/vChewing.pkgproj index fc37647e..5065dbca 100644 --- a/vChewing.pkgproj +++ b/vChewing.pkgproj @@ -724,7 +724,7 @@ USE_HFS+_COMPRESSION VERSION - 1.3.8 + 1.3.9 TYPE 0 @@ -944,11 +944,11 @@ LANGUAGE - Simplified Chinese + Traditional Chinese VALUE PATH - LICENSE-CHS.txt + LICENSE-CHT.txt PATH_TYPE 1 @@ -966,11 +966,11 @@ LANGUAGE - Traditional Chinese + Simplified Chinese VALUE PATH - LICENSE-CHT.txt + LICENSE-CHS.txt PATH_TYPE 1 @@ -1001,9 +1001,9 @@ LANGUAGE - Traditional Chinese + Simplified Chinese VALUE - 威注音輸入法 + 威注音输入法 LANGUAGE @@ -1013,9 +1013,9 @@ LANGUAGE - Simplified Chinese + Traditional Chinese VALUE - 威注音输入法 + 威注音輸入法 @@ -1052,11 +1052,11 @@ LANGUAGE - Traditional Chinese + Simplified Chinese SECONDARY_VALUE - 至少 macOS 10.11.5 方可滿足威注音對系統內的萬國碼版本支援的需要。 + 至少 macOS 10.11.5 方可满足威注音对系统内的万国码版本支援的需要。 VALUE - 作業系統版本太舊 + 作业系统版本太旧 LANGUAGE @@ -1068,11 +1068,11 @@ LANGUAGE - Simplified Chinese + Traditional Chinese SECONDARY_VALUE - 至少 macOS 10.11.5 方可满足威注音对系统内的万国码版本支援的需要。 + 至少 macOS 10.11.5 方可滿足威注音對系統內的萬國碼版本支援的需要。 VALUE - 作业系统版本太旧 + 作業系統版本太舊 NAME diff --git a/vChewing.xcodeproj/project.pbxproj b/vChewing.xcodeproj/project.pbxproj index 87c8fe1e..c68dc2bd 100644 --- a/vChewing.xcodeproj/project.pbxproj +++ b/vChewing.xcodeproj/project.pbxproj @@ -45,6 +45,7 @@ 5BBBB77527AED70B0023B93A /* MenuIcon-SCVIM.png in Resources */ = {isa = PBXBuildFile; fileRef = 5BBBB77127AED70B0023B93A /* MenuIcon-SCVIM.png */; }; 5BBBB77627AED70B0023B93A /* MenuIcon-TCVIM.png in Resources */ = {isa = PBXBuildFile; fileRef = 5BBBB77227AED70B0023B93A /* MenuIcon-TCVIM.png */; }; 5BBBB77A27AEDC690023B93A /* clsSFX.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBBB77927AEDC690023B93A /* clsSFX.swift */; }; + 5BC2652227E04B7E00700291 /* uninstall.sh in Resources */ = {isa = PBXBuildFile; fileRef = 5BC2652127E04B7B00700291 /* uninstall.sh */; }; 5BD05B8127B22F3C004C4F1D /* char-kanji-cns.txt in Resources */ = {isa = PBXBuildFile; fileRef = 5BD05B8027B22F3C004C4F1D /* char-kanji-cns.txt */; }; 5BD05BCA27B2A43D004C4F1D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6A2E40F5253A69DA00D1AE1D /* Images.xcassets */; }; 5BD05C5D27B2BBA9004C4F1D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5BD05C5B27B2BBA9004C4F1D /* Main.storyboard */; }; @@ -197,6 +198,7 @@ 5B62A34527AE7CD900A19448 /* NotifierController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotifierController.swift; sourceTree = ""; }; 5B707CE527D9F3A10099EF99 /* SwiftyOpenCC */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = SwiftyOpenCC; path = Packages/SwiftyOpenCC; sourceTree = ""; }; 5B707CE727D9F4590099EF99 /* OpenCCBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenCCBridge.swift; sourceTree = ""; }; + 5B7111C727DEF9FF00444310 /* UserSymbolLM.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserSymbolLM.h; sourceTree = ""; }; 5B73FB5427B2BD6900E9BF49 /* PhraseEditor-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "PhraseEditor-Info.plist"; path = "UserPhraseEditor/PhraseEditor-Info.plist"; sourceTree = SOURCE_ROOT; }; 5B73FB5F27B2BE1300E9BF49 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 5B7BC4AF27AFFBE800F66C24 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Source/WindowNIBs/Base.lproj/frmPrefWindow.xib; sourceTree = ""; }; @@ -213,6 +215,7 @@ 5BBBB77727AEDB290023B93A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MainMenu.strings; sourceTree = ""; }; 5BBBB77927AEDC690023B93A /* clsSFX.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = clsSFX.swift; sourceTree = ""; }; 5BBD627827B6C4D900271480 /* Update-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Update-Info.plist"; sourceTree = ""; }; + 5BC2652127E04B7B00700291 /* uninstall.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; lineEnding = 0; path = uninstall.sh; sourceTree = ""; }; 5BD05B8027B22F3C004C4F1D /* char-kanji-cns.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "char-kanji-cns.txt"; path = "Data/components/common/char-kanji-cns.txt"; sourceTree = ""; }; 5BD05BB827B2A429004C4F1D /* vChewingPhraseEditor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = vChewingPhraseEditor.app; sourceTree = BUILT_PRODUCTS_DIR; }; 5BD05BC627B2A42A004C4F1D /* vChewingPhraseEditor.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = vChewingPhraseEditor.entitlements; sourceTree = ""; }; @@ -336,6 +339,7 @@ 5B18BA7527C7BF6D0056EB19 /* MiscRootFiles */ = { isa = PBXGroup; children = ( + 5BC2652127E04B7B00700291 /* uninstall.sh */, 5B18BA6F27C7BD8B0056EB19 /* LICENSE-CHS.txt */, 5B18BA7427C7BD8C0056EB19 /* LICENSE-CHT.txt */, 5B18BA7327C7BD8C0056EB19 /* LICENSE-JPN.txt */, @@ -349,6 +353,7 @@ isa = PBXGroup; children = ( 5B8F43ED27C9BC220069AC27 /* SymbolLM.h */, + 5B7111C727DEF9FF00444310 /* UserSymbolLM.h */, 5B62A32B27AE78B000A19448 /* CNSLM.h */, ); path = InstantiatedModels; @@ -942,6 +947,7 @@ 5BBBB77627AED70B0023B93A /* MenuIcon-TCVIM.png in Resources */, 6A187E2616004C5900466B2E /* MainMenu.xib in Resources */, 5BBBB75F27AED54C0023B93A /* Beep.m4a in Resources */, + 5BC2652227E04B7E00700291 /* uninstall.sh in Resources */, 5BAD0CD527D701F6003D127F /* vChewingKeyLayout.bundle in Resources */, 5B2DB16F27AF6891006D874E /* data-chs.txt in Resources */, ); @@ -1235,11 +1241,11 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1929; + CURRENT_PROJECT_VERSION = 1930; DEBUG_INFORMATION_FORMAT = dwarf; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; + GCC_OPTIMIZATION_LEVEL = z; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -1258,7 +1264,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.3.8; + MARKETING_VERSION = 1.3.9; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewing.vChewingPhraseEditor; @@ -1266,7 +1272,7 @@ SDKROOT = macosx; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_OPTIMIZATION_LEVEL = "-Osize"; SWIFT_VERSION = 5.0; }; name = Debug; @@ -1291,10 +1297,11 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1929; + CURRENT_PROJECT_VERSION = 1930; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_OPTIMIZATION_LEVEL = z; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GENERATE_INFOPLIST_FILE = YES; @@ -1309,14 +1316,14 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.3.8; + MARKETING_VERSION = 1.3.9; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewing.vChewingPhraseEditor; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_OPTIMIZATION_LEVEL = "-Osize"; SWIFT_VERSION = 5.0; }; name = Release; @@ -1424,13 +1431,13 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1929; + CURRENT_PROJECT_VERSION = 1930; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; + GCC_OPTIMIZATION_LEVEL = z; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/Headers/vChewing-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -1459,14 +1466,14 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.3.8; + MARKETING_VERSION = 1.3.9; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; SWIFT_OBJC_BRIDGING_HEADER = "Source/Headers/vChewing-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_OPTIMIZATION_LEVEL = "-Osize"; SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; @@ -1492,12 +1499,13 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1929; + CURRENT_PROJECT_VERSION = 1930; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = z; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/Headers/vChewing-Prefix.pch"; GCC_TREAT_WARNINGS_AS_ERRORS = YES; @@ -1521,12 +1529,13 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.3.8; + MARKETING_VERSION = 1.3.9; PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; SWIFT_OBJC_BRIDGING_HEADER = "Source/Headers/vChewing-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Osize"; SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; @@ -1604,12 +1613,12 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1929; + CURRENT_PROJECT_VERSION = 1930; DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; + GCC_OPTIMIZATION_LEVEL = z; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Installer/Installer-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -1629,14 +1638,14 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.3.8; + MARKETING_VERSION = 1.3.9; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = "org.atelierInmu.vChewing.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; SWIFT_OBJC_BRIDGING_HEADER = "Installer/vChewingInstaller-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_OPTIMIZATION_LEVEL = "-Osize"; SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; @@ -1657,11 +1666,12 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1929; + CURRENT_PROJECT_VERSION = 1930; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = z; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Installer/Installer-Prefix.pch"; GCC_TREAT_WARNINGS_AS_ERRORS = YES; @@ -1676,12 +1686,13 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.3.8; + MARKETING_VERSION = 1.3.9; PRODUCT_BUNDLE_IDENTIFIER = "org.atelierInmu.vChewing.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; SWIFT_OBJC_BRIDGING_HEADER = "Installer/vChewingInstaller-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Osize"; SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; };