Skip to content

C6H5-NO2/mdict-ocr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdict-ocr

mdict-ocr provides an optical character recognition (OCR) wrapper for the MDict app.

Prerequisites

  • Windows 10 with corresponding language packs installed
  • MDict for PC 2.0.12

Usage

  1. Install language packs through the Settings app. (See Windows support)
    The target language is not necessarily the display language but the OCR feature should be installed.

  2. Start the MDict app. Make sure that it is the only window named mdict (case-insensitive).

  3. Hover the cursor on the word to be recognized and hit left control.
    This will bring the MDict window to top and perform a query automatically.

Developing

  1. The project uses WinUI 2 and XAML Islands, requiring the following NuGet packages to be installed.

  2. Add a reference to the Windows Runtime metadata, which is under C:/Program Files (x86)/Windows Kits/10/UnionMetadata/[Windows 10 SDK version]/Windows.winmd. (See step 6 here)

  3. Some relevant property settings for the compiler.

/D "_UNICODE" /D "UNICODE" /MD /std:c++17
  1. And those for the linker.
/DYNAMICBASE "C:/Program Files (x86)/Windows Kits/10/Lib/[Windows 10 SDK version]/um/x64/WindowsApp.lib" /SUBSYSTEM:WINDOWS

Known Issues

Cannot move MDict to front when a system app (e.g. Task Manager) gains the foreground focus.

License

Distributed under the MIT License.