From abab3f9e94541017fc5678c0de2169295e0ecaa9 Mon Sep 17 00:00:00 2001 From: LEO Yoon-Tsaw Date: Wed, 29 May 2024 22:33:43 -0400 Subject: [PATCH] =?UTF-8?q?chore(release):=201.0.0=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Release on June 1, 2024 --- CHANGELOG.md | 45 +++++++++++++++++---------- INSTALL.md | 8 ++++- Makefile | 19 ++++++++--- data/squirrel.yaml | 6 ++-- sources/SquirrelInputController.swift | 2 +- 5 files changed, 55 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fe6d5820..2b8d33474 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,28 +3,41 @@ #### 主要功能更新 * 純 Swift 重寫,代碼更易維護,更易讀,貢獻代碼的門檻更低。今天就來看看源代碼,嘗試動手吧! + #### 其它更新內容 -* `style/candidate_format` 格式修改爲 `"[label]. [candidate] [comment]"`,原格式仍能使用,建議遷移至更靈活、直觀的新格式 -* `style/horizontal` 將徹底移除,雖然本版程序仍支持,但會被新控件的默認值覆蓋,請使用 `candidate_list_layout`: `stacked`/`linear` 和 `text_orientation`: `horizontal`/`vertical` -* `style/label_hilited_color` 已移除,請使用 `hilited_candidate_label_color` -* 在菜單欄新增日志檔案夾,方便快速進入 -* 序號居中顯示,更像原生輸入法 -* `native` 配色小幅修改,減小字號,更像原生輸入法 -* 增加 `--help` 命令行選項 +* UI 設置【**敬請留意**】 + * `style/candidate_format` 格式修改爲 `"[label]. [candidate] [comment]"`,原格式仍能使用,但建議遷移至更靈活、直觀的新格式 + * `style/horizontal` 將徹底移除,雖然本版程序仍支持,但會被新控件的默認值覆蓋 + 請使用 `candidate_list_layout`: `stacked`/`linear` 和 `text_orientation`: `horizontal`/`vertical` + * `style/label_hilited_color` 已移除,請使用 `style/hilited_candidate_label_color` + * `native` 配色小幅修改,減小字號,更像原生輸入法 +* UI + * 在菜單欄新增日志檔案夾,方便快速進入 + * 序號居中顯示,更像原生輸入法 +* 新增 `--help` 命令行命令,以便查詢支持的命令 * bug 修復 - * 偶發使用輸入大寫時造成中英切換 + * 減少使用輸入大寫時造成中英切換的可能性 +* librime:使用 stdbool 後綴 API,以便與 Swift 更好橋接 + #### Major Update -* Migrated code to pure Swift, which is easier to maintain, read and contribute. Build your own Squirrel today! +* Migrated code to pure Swift, which is easier to code, read and learn. Build your own Squirrel today! + #### Other Updates -* `style/candidate_format` now updated to `"[index]. [candidate] [comment]"`, while the old format still works, please migrate to this more readable and flexible format at your convenience -* `style/horizontal` will be dropped, it's still supported but will be overwrite by the default values of new options. Please adopt `candidate_list_layout`: `stacked`/`linear` and `text_orientation`: `horizontal`/`vertical` -* `style/label_hilited_color` is removed, please use `hilited_candidate_label_color` instead -* Added a menu item for logs folder for quick access -* labels will vertically center if label font is smaller than candidate font, better matches macOS builtin IME -* `native` color scheme is updated with smaller font size, better matches macOS builtin IME +* UI settings (**Breaking Changes**) + * `style/candidate_format` now updated to `"[index]. [candidate] [comment]"`, while the old format still works, please consider migrating to this more readable and flexible format at your convenience + * `style/horizontal` will be dropped, it's still supported but will be overwrite by the default values of new options. + Please adopt `candidate_list_layout`: `stacked`/`linear` and `text_orientation`: `horizontal`/`vertical` + * `style/label_hilited_color` is removed, please use `style/hilited_candidate_label_color` instead + * `native` color scheme is updated with smaller font size, to better match macOS builtin IME +* UI + * Added a menu item for logs folder with easy access + * labels will vertically center if label font is smaller than candidate font, to better match macOS builtin IME * Added `--help` command line argument * Bug fixes: - * Occasionally, press to enter Cap case may switch ascii mode + * Reduce the chance that ascii mode may unintentionally switch when pressing to enter Cap case +* librime: Use stdbool flavored API, for better Swift interoperation + +**Full Changelog**: https://github.com/rime/squirrel/compare/0.18...1.0.0 ## 0.18 (2024-05-04) diff --git a/INSTALL.md b/INSTALL.md index 556fda533..3483eb4c9 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -173,6 +173,12 @@ To clean up **dependencies**, including librime, librime plugins, plum and spark make clean-deps ``` -If you want to clean both, do both. +To clean up **packages**, run: + +``` sh +make clean-package +``` + +If you want to clean all above, do all. That's it, a verbal journal. Thanks for riming with Squirrel. diff --git a/Makefile b/Makefile index fc9b7f759..fe8a141b0 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,8 @@ OPENCC_DATA = data/opencc/TSCharacters.ocd2 \ data/opencc/TSPhrases.ocd2 \ data/opencc/t2s.json SPARKLE_FRAMEWORK = Frameworks/Sparkle.framework +SPARKLE_SIGN = package/sign_update +PACKAGE = package/Squirrel.pkg DEPS_CHECK = $(RIME_LIBRARY) $(PLUM_DATA) $(OPENCC_DATA) $(SPARKLE_FRAMEWORK) OPENCC_DATA_OUTPUT = librime/share/opencc/*.* @@ -116,13 +118,15 @@ $(SPARKLE_FRAMEWORK): sparkle: xcodebuild -project Sparkle/Sparkle.xcodeproj -configuration Release $(BUILD_SETTINGS) build - xcodebuild -project Sparkle/Sparkle.xcodeproj -scheme sign_update -configuration Release -derivedDataPath Sparkle/build $(BUILD_SETTINGS) build $(MAKE) copy-sparkle-framework +$(SPARKLE_SIGN): + xcodebuild -project Sparkle/Sparkle.xcodeproj -scheme sign_update -configuration Release -derivedDataPath Sparkle/build $(BUILD_SETTINGS) build + cp Sparkle/build/Build/Products/Release/sign_update package/ + copy-sparkle-framework: mkdir -p Frameworks cp -RP Sparkle/build/Release/Sparkle.framework Frameworks/ - cp Sparkle/build/Build/Products/Release/sign_update package/ clean-sparkle: rm -rf Frameworks/* > /dev/null 2>&1 || true @@ -130,7 +134,7 @@ clean-sparkle: .PHONY: package archive -package: release +$(PACKAGE): ifdef DEV_ID bash package/sign_app "$(DEV_ID)" "$(DERIVED_DATA_PATH)" endif @@ -143,7 +147,9 @@ ifdef DEV_ID xcrun stapler staple package/Squirrel.pkg endif -archive: package +package: release $(PACKAGE) + +archive: package $(SPARKLE_SIGN) bash package/make_archive DSTROOT = /Library/Input Methods @@ -175,6 +181,11 @@ clean: rm data/plum/* > /dev/null 2>&1 || true rm data/opencc/* > /dev/null 2>&1 || true +clean-package: + rm -rf package/*appcast.xml > /dev/null 2>&1 || true + rm -rf package/*.pkg > /dev/null 2>&1 || true + rm -rf package/sign_update > /dev/null 2>&1 || true + clean-deps: $(MAKE) -C plum clean $(MAKE) -C librime clean diff --git a/data/squirrel.yaml b/data/squirrel.yaml index bc85e9745..ba5172c1e 100644 --- a/data/squirrel.yaml +++ b/data/squirrel.yaml @@ -57,11 +57,11 @@ style: # adjust the base line of vertical text #base_offset: 0 font_face: 'Avenir' - font_point: 15 + #font_point: 15 #label_font_face: 'Avenir' - label_font_point: 12 + #label_font_point: 12 #comment_font_face: 'Avenir' - comment_font_point: 15 + #comment_font_point: 15 preset_color_schemes: native: diff --git a/sources/SquirrelInputController.swift b/sources/SquirrelInputController.swift index cfe09ed4d..05d2c63e4 100644 --- a/sources/SquirrelInputController.swift +++ b/sources/SquirrelInputController.swift @@ -10,7 +10,7 @@ import InputMethodKit final class SquirrelInputController: IMKInputController { private static let keyRollOver = 50 - private var client: IMKTextInput? + private weak var client: IMKTextInput? private let rimeAPI: RimeApi_stdbool = rime_get_api_stdbool().pointee private var preedit: String = "" private var selRange: NSRange = .empty