chore: Tối ưu script build DMG giúp mount nhanh hơn và không bị treo#9
Closed
meichengg wants to merge 11 commits intottdatt:mainfrom
Closed
chore: Tối ưu script build DMG giúp mount nhanh hơn và không bị treo#9meichengg wants to merge 11 commits intottdatt:mainfrom
meichengg wants to merge 11 commits intottdatt:mainfrom
Conversation
Owner
|
Cảm ơn bạn, mình dùng AI review, thì có 1 vài nhận xét sau. Bạn xem thử nha • The change introduces a silent-failure path for DMG signing under --sign, which can cause the script to report success while producing an Findings
|
- Add vitype_engine_get_buffer_len() FFI to query current composed word length - Intercept Ctrl+W/Ctrl+Backspace: send correct backspace count instead of relying on terminal's native word-delete (which sees raw bytes, not composed text) - Remove hardcoded TUI app list (claude, aider, codex) — replaced with universal detection: any non-shell leaf process in terminal tree is treated as TUI - Reduce injection delays ~20% across all methods for smoother typing - Add dev CI workflow for unsigned test builds Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Xcode project has its own copy of vitype_core.h under ViType-macos/ViType/ which takes precedence over the canonical ViType-core/include/ header. The new function declaration was only added to the canonical copy, causing the build to fail with "cannot find 'vitype_engine_get_buffer_len' in scope". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the backspace+retype architecture with Apple's official Input Method Kit for flicker-free inline composition (marked text). Key changes: - New InputController.swift: IMKInputController subclass handling key events via client.setMarkedText() / client.insertText() - New main.swift: IMKServer entry point replacing @main SwiftUI - New Info.plist: IMK configuration (connection name, controller class, input mode for Vietnamese/Telex) - Rust core: added get_composed_text() FFI to return full buffer for marked text display - Removed: CGEvent tap, CharacterInjector, backspace+retype logic, process tree TUI detection, injection delays - Stubbed: MenuBarManager, WindowManager, Settings UI (IMK provides its own menu bar icon and right-click menu) - Updated CI workflow: DMG now links to ~/Library/Input Methods/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Root causes: 1. tsInputModeListKey was nested inside ComponentInputModeDict — macOS requires it at the top level of Info.plist 2. Missing tsInputModeIsVisibleKey — macOS hides input sources without this key set to true 3. Missing TISRegisterInputSource() call on first launch — required for macOS to discover and register the input method Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
macOS silently rejects TISRegisterInputSource() when the bundle identifier doesn't contain 'inputmethod' in the path. Changed from com.dat.ViType to com.dat.inputmethod.ViType. Also simplified Info.plist: removed tsInputModeListKey (not needed for simple single-mode input methods), added TISIntendedLanguage at top level, added LSUIElement alongside LSBackgroundOnly — all matching the pattern used by working IMK apps (XKey, XKeyIM) on this machine. Verified locally: TISRegisterInputSource now finds 1 source and TISEnableInputSource succeeds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chào bạn 👋
Mình nhận thấy file DMG được build ra mỗi khi mở và kéo thả app vào thư mục Applications hay bị delay/treo nhẹ một lúc. Nguyên nhân là do:
hdiutil create -srcfoldermặc định tạo ra DMG format APFS (ở macOS bản mới), format này mount disk image khá chậm so với HFS+.Mình xin phép gửi PR tối ưu lại script
build_dmg.sh:HFS+cho nhẹ và nhanh.--signcho file.dmgđể macOS Gatekeeper vượt rào xác thực siêu tốc khi người dùng mở DMG lên.Cảm ơn bạn nhiều! 🚀