Skip to content

Commit 768c89c

Browse files
committed
Harmony port: doc v0
1 parent ed283ad commit 768c89c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/README-ohos.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
OpenHarmony / HarmonyOS
2+
================================================================================
3+
4+
Requirements
5+
================================================================================
6+
7+
DevEco Studio 5.0.0 or later
8+
https://developer.huawei.com/consumer/en/download
9+
10+
Harmony OS Development Toolchain 5.0.0 (API 12) or later (Bundled in the DevEco Studio)
11+
12+
13+
How the port works
14+
================================================================================
15+
16+
- OpenHarmony / Harmony OS apps are based on ArkTS/JS running on the Ark JS runtime, optionally with parts written in C
17+
- We can use the napi and ndk provided by the Harmony SDK to fetch the app window, context and so on. We wrote a simple Harmony shell for SDL, simpily initialize the basic application and the context for SDL library, then runs your app in another thread. (Harmony JS apps only contains one thread, if we runs your app main loop directly in JS, the whole app just freezes)
18+
- This produces a .hap or .app package which can be installed in OpenHarmony and HarmonyOS Emulators (you will need to apply for a certificate to sign the app before testing it on a real HarmonyOS machine)
19+
20+
21+
Building the example app and test it (HarmonyOS Emulator)
22+
================================================================================
23+
24+
Download the DevEco Studio, and open the ohos-project folder in this repo
25+
26+
Then, download a emulator in the Device Manager tab, and runs it.
27+
28+
Click the run button, the IDE will automatically build the app and run it for you, you can act with your app in the emulator window.

0 commit comments

Comments
 (0)