Skip to content

Development and Debugging

Archie Liu edited this page Jul 13, 2023 · 1 revision

Prior to initiating the development process, adhere to the guidelines detailed in the "Project Build Procedure" documentation to finalize the Librime engine's build. Subsequently, transfer the resultant build into this project's designated directory as specified in the second phase of the "Extension Build Process".

In order to construct the plugin within the build/chrome-mv3-dev directory, execute the pnpm dev command. For a comprehensive step-by-step guide, refer to the "Plasmo - Launching the Development Server" documentation.

Furthermore, if you aim to develop a virtual keyboard, it is imperative to manually align the inputview directory with the build/chrome-mv3-dev directory. It is advisable to employ Plasmo's asset feature to situate the inputview within the assets. However, it appears that Plasmo does not provide automatic updates to the assets upon modifications. Hence, manual synchronization is currently utilized.

Within FydeOS, while debugging the virtual keyboard functionality, it is crucial to validate that the extension ID corresponds with the official Zhenwenyun Input Method ID. This is accomplished by having access privileges to virtualKeyboardPrivate and inputMethodPrivate. The specific procedure involves installing the official Zhenwenyun CRX file, identifying the directory associated with the application ID in ~chronos/Extensions/, and locating the "key" field within the manifest.json file. Replicate this field to the "manifest" section of package.json. This will initiate the loading of the identical application ID. Below is an example for your reference:

{
"name": "fyde-rhythm",
// ...
"manifest": {
"key": "MIIBI.....",
"name": "MSG_extension_name",
// ...
}
}
Clone this wiki locally