Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.4.14编辑器需要添加支持Ark与v8的切换功能 #16895

Closed
qiuguohua opened this issue Apr 12, 2024 · 3 comments
Closed

2.4.14编辑器需要添加支持Ark与v8的切换功能 #16895

qiuguohua opened this issue Apr 12, 2024 · 3 comments
Assignees
Labels
Feature Request Needs Triage Needs to be assigned by the team

Comments

@qiuguohua
Copy link
Contributor

qiuguohua commented Apr 12, 2024

Use Case

使用户可以切换使用V8或者ARK

Problem Description

需要添加支持V8和ARk切换

Proposed Solution

条件:
Ark与V8必须选择其中一个;
不能不选,
不能同时选
默认选择V8

Ark平台中英文需要做下切换,
英文显示是: ark
中文显示是: 方舟
企业微信截图_b368a274-b9ca-4db6-8465-af2e72c823b5

How it works

No response

Alternatives Considered

none

Additional Information

No response

@qiuguohua qiuguohua added Feature Request Needs Triage Needs to be assigned by the team labels Apr 12, 2024
@WisteriaCyan
Copy link

WisteriaCyan commented Apr 12, 2024

建议方案:

  1. 设置位置与3.x尽量保持同一,放在APP ABI上方(如图所示)
  2. 使用下拉选择器(ui-select)实现,默认选择V8(由于目前UI Kit中没有单选框Radio,且2.x应该不会开发新的组件,且复选框通常用于可多选的情况,虽然较直观,但需要限制单选需要一定的开发工作量,所以不建议使用)
image

*备注:后续3.x的UI kit 会增加单选框Radio,优化3.x上的该选项

@qiuguohua
Copy link
Contributor Author

qiuguohua commented Apr 15, 2024

修改模板CMakeLists.txt的。例如:templates/js-template-default/frameworks/runtime-src/proj.openharmonyv8/CMakeLists.txt。增加
开启Ark引擎
set(CC_USE_SE_NAPI ON)
set(CC_USE_SE_V8 OFF)
开启V8引擎
set(CC_USE_SE_NAPI OFF)
set(CC_USE_SE_V8 ON)

@qiuguohua
Copy link
Contributor Author

cocos/engine-native#4346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

3 participants