Warning
This miniapp is still under development, and may have breaking changes without any notice.
Users using this miniapp should have a supported YouDao Dictionary Pen.
- Make sure you have a YouDao Dictionary Pen with
adb
enabled. You can use the paper tool to edit adb password easily or refer to these discussions. - Connect your YouDao Dictionary Pen to your computer and login to it using
adb shell auth
. - Make sure you have
cmake
,make
,nodejs
,pnpm
,iconv
installed on a Ubuntu computer. - Clone this repository:
git clone https://github.com/langningchen/miniapp.git cd miniapp
On Android:
- Open the shell using
adb shell
and run the following command to check the version of system:curl -k -s https://raw.githubusercontent.com/langningchen/miniapp/refs/heads/main/tools/getVersionInfo.sh | bash
- Pull the artifacts from the YouDao Dictionary Pen:
adb pull /userdisk/Favorite/versionInfo.tar.gz ./versionInfo.tar.gz
On Ubuntu:
- Extract the
versionInfo.tar.gz
file:tar -xzf versionInfo.tar.gz -C ./jsapi
- Download and extract the correct toolchain in the
jsapi/toolchains
directory, your directory structure should look like this:miniapp/ ├── jsapi/ | |-- include/ | | |-- curl/ | | |-- sqlite3/ | |-- lib/ | | ├── libcurl.so | | ├── libsqlite3.so │ ├── src/ │ ├── toolchains/ │ │ ├── <toolchain_name>/ │ │ │ ├── bin/ │ │ │ ├── include/ │ │ │ └── lib/
- Install NodeJS dependencies using
pnpm
:pnpm -C ui install
- Modify the NodeJS library:
cd ./ui sed -i "s/commonjs(),/commonjs(),require('@rollup\/plugin-typescript')(),/g" ./node_modules/aiot-vue-cli/src/libs/rollup.config.js sed -i "s/compiler.parseComponent(content, { pad: 'line' })/compiler.parse(content, { pad: 'line' }).descriptor/g" ./node_modules/aiot-vue-cli/web-loaders/falcon-vue-loader/lib/parser.js sed -i "s/path.resolve(__dirname, '.\/vue\/packages\/vue-template-compiler\/index.js')/'@vue\/compiler-sfc'/g" ./node_modules/aiot-vue-cli/cli-libs/index.js sed -i "s/compiler.parseComponent(content, { pad: true })/compiler.parse(content, { pad: true }).descriptor/g" ./node_modules/aiot-vue-cli/src/libs/parser.js sed -i "s/compiler.compile/compiler.compileTemplate/g" ./node_modules/aiot-vue-cli/web-loaders/falcon-vue-loader/lib/template-compiler/index.js sed -i "s/const replaceValues = {}/const replaceValues = { 'defineComponent': '' }/g" ./node_modules/aiot-vue-cli/src/libs/rollup.config.js
- Run the build script:
./tools/build.sh
- After the build is complete, you will find the
miniapp.amr
file in thedist
directory.
- Upload the
miniapp.amr
file to your YouDao Dictionary Pen usingadb push
:adb push miniapp.amr /userdisk/Favorite/miniapp.amr
- Open the shell using
adb shell
and run the following command to install the miniapp:miniapp_cli install /userdisk/Favorite/miniapp.amr
- After installation, you can find the miniapp in the app list of your YouDao Dictionary Pen.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
See GitHub Issues.