windows-chewing-tsf
Implement chewing in Windows via Text Services Framework:
- LibIME contains a library which aims to be a simple wrapper for Windows Text Service Framework (TSF).
- ChewingTextService contains an implementation of Windows text service for libchewing using libIME.
- chewingwrapper contains a C++ wrapper for libchewing.
All parts are licensed under GNU LGPL v2.1 license.
Development
Tool Requirements
- CMake >= 2.8.11
- Visual Studio Express 2012 with Update 1
- git
- Editor with EditorConfig supported
How to Build
- Get source from github
git clone --recursive https://github.com/chewing/windows-chewing-tsf.git
cd windows-chewing-tsf
- Use one of the following CMake commands to generate Visual Studio project
cmake -G "Visual Studio 11" -T "v110_xp" <path to windows-chewing-tsf>
cmake -G "Visual Studio 11 Win64" -T "v110_xp" <path to windows-chewing-tsf>
-
NOTICE: In order to support Windows xp, it is required to add the argument "v110_xp" (MSDN)
-
Open generated project with Visual Studio and build it
TSF References
- Text Services Framework
- Guidelines and checklist for IME development (Windows Store apps)
- Input Method Editors (Windows Store apps)
- Third-party input method editors
- Strategies for App Communication between Windows 8 UI and Windows 8 Desktop
- TSF Aware, Dictation, Windows Speech Recognition, and Text Services Framework. (blog)
- Win32 and COM for Windows Store apps
- Input Method Editor (IME) sample supporting Windows 8
Windows ACL (Access Control List) references
- The Windows Access Control Model Part 1
- The Windows Access Control Model: Part 2
- Windows 8 App Container Security Notes - Part 1
- How AccessCheck Works
- GetAppContainerNamedObjectPath function (enable accessing object outside app containers using ACL)
- Creating a DACL
Install
-
Copy
ChewingTextService.dll
to C:\Program Files (X86)\ChewingTextService. -
Copy
libchewing/data/*.dat
andpinyin.tab
toC:\Program Files (X86)\ChewingTextService\Dictionary
-
Use
regsvr32
to registerChewingService.dll
. 64-bit system need to register both 32-bit and 64-bitChewingService.dll
regsvr32 "C:\Program Files (X86)\ChewingTextService\ChewingTextService.dll" (run as administrator)
-
NOTICE: the
regsvr32
command needs to be run as Administrator. Otherwise you'll get access denied error. -
In Windows 8, if you put the dlls in places other than C:\Windows or C:\Program Files, they will not be accessible in metro apps.
For Windows 8, you also need to do this:
-
Create C:\Users<user_name>\ChewingTextService directory manually before using the input method.
-
Set ACLs for the created directory so it can be accessible from Windows store apps
cacls C:\Users\<user_name>\ChewingTextService /e /t /g "ALL APPLICATION PACKAGES:c"
-
Warning: this will give full access of this folder to all metro apps. This may not be the optimized permission settings. Further study on ACL is required here.
-
Open regedit and enable read access to HKCU\Software\ChewingTextService for "ALL APPLICATION PACKAGES".
-
The NSIS installer automatically does the preceding changes for you
Uninstall
-
Remove
%WINDIR%/chewing
-
Use
regsvr32
to unregisterChewingTextService.dll
. 64-bit system need to register both 32-bit and 64-bitChewingTextService.dll
regsvr32 /u "C:\Program Files (X86)\ChewingTextService\ChewingTextService.dll" (run as administrator)
-
NOTICE: the
regsvr32
command needs to be run as Administrator. Otherwise you'll get access denied error.
Bug Report
Please report any issue to here.