Skip to content

fix(ohos): Failed to play on a HarmonyOS device.#347

Merged
wang-bin merged 3 commits into
wang-bin:masterfrom
qinshah:master
Apr 29, 2026
Merged

fix(ohos): Failed to play on a HarmonyOS device.#347
wang-bin merged 3 commits into
wang-bin:masterfrom
qinshah:master

Conversation

@qinshah

@qinshah qinshah commented Apr 29, 2026

Copy link
Copy Markdown
Contributor
  • fix fvp_plugin inconsistency between the output name and the libfvp_plugin.so library name

- fix fvp_plugin inconsistency between the output name and the libfvp_plugin.so library name

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the OUTPUT_NAME property in the CMakeLists.txt file for the OpenHarmony platform, changing it from 'fvp' to 'fvp_plugin'. A review comment suggests using the ${PLUGIN_NAME} variable instead of a hardcoded string to improve maintainability and ensure consistency.

Comment thread ohos/src/main/cpp/CMakeLists.txt Outdated
Update CMakeLists.txt to set the output name of the shared library to the value of ${PLUGIN_NAME} instead of a hardcoded "fvp_plugin".
@wang-bin

Copy link
Copy Markdown
Owner

我最近把生成的文件名_plugin后缀都去掉了, ohos的可能没改全没测试,估计应该修改 这行而不是cmake,你试试改成NAPI_MODULE(fvp, Init)

@qinshah

qinshah commented Apr 29, 2026

Copy link
Copy Markdown
Contributor Author

我最近把生成的文件名_plugin后缀都去掉了, ohos的可能没改全没测试,估计应该修改 这行而不是cmake,你试试改成NAPI_MODULE(fvp, Init)

好的,但也得把FvpPlugin.ets里的 import fvpNative from 'libfvp_plugin.so'; 改成 import fvpNative from 'libfvp.so'; 不然还会报错

Update CMakeLists.txt, NAPI_MODULE macro, and the TypeScript import
to use 'fvp' instead of the plugin name for the shared library
output.
@wang-bin wang-bin merged commit 94364d6 into wang-bin:master Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants