All Projects → zlgopen → awtk-jerryscript

zlgopen / awtk-jerryscript

Licence: LGPL-2.1 license
awtk javascript bindings.

Programming Languages

javascript
184084 projects - #8 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to awtk-jerryscript

zlgopen-awtk
No description or website provided.
Stars: ✭ 42 (+100%)
Mutual labels:  awtk
awtk-web
在浏览器中运行AWTK应用程序
Stars: ✭ 21 (+0%)
Mutual labels:  awtk
awtk-mvvm
Model-View-ViewModel for AWTK
Stars: ✭ 55 (+161.9%)
Mutual labels:  awtk

awtk-jerryscript

ZLG 开源 GUI 引擎 awtk 针对三星开源 JS 引擎 jerryscript 的绑定。

准备

  1. 获取 awtk 并编译
git clone https://github.com/zlgopen/awtk.git
cd awtk; scons; cd -

AWTK 的编译环境请参考 AWTK 的文档。

  1. 获取 awtk-jerryscript 并编译
git clone https://github.com/zlgopen/awtk-jerryscript.git
cd awtk-jerryscript
git clone https://github.com/jerryscript-project/jerryscript.git 3rd/jerryscript/jerryscript
  • 生成资源
python ./scripts/update_res.py all

或者通过 designer 生成资源

  • 编译PC版本
scons
  • 编译LINUX FB版本
scons LINUX_FB=true

完整编译选项请参考编译选项

运行

./bin/awtkRun xxxx

请把 xxxx 换成具体的 js 文件, xxxx对应的js文件需要放在assets/default/raw/scripts目录下。

如:

./bin/awtkRun basic

更新绑定(由本项目的维护人员完成)

./sync.sh

在非 bash 终端(如 Windows 平台的 cmd.exe),需要根据 sync.sh 的内容手工执行相应的命令。

文档

本文以 Linux/MacOS 为例,Windows 可能会微妙差异,请酌情处理。

注意事项

如果希望自己的应用程序,同时支持 AWTK-JS 和 AWTK-WEB,还需要注意下列事项:

  • 避免直接调用 gc() 函数。

  • 避免使用模态对话框。

  • 避免使用动态 GIF 图片。

  • 避免直接使用 value_t/color_t/bitmap_t/object_t 等类。

编译 awtk-iotjs 版本

iotjs 用的 jerryscript 2.4, 而 awtk-jerryscript 用的jerryscrip 3.0。 编译 awtk-iotjs 版本需要 checkout jerryscript 2.4,再编译:

cd 3rd/jerryscript/jerryscript && git checkout 8ba0d1b6ee5a065a42f3b306771ad8e3c0d819bc && cd -
scons IOTJS=true
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].