本页详细介绍了Tuanjie Editor在OpenHarmony平台从安装到项目构建运行的全流程,帮助新手快速入门。
在正式开发OpenHarmony项目前,请确保已经安装了 Tuanjie Hub ,Tuanjie将平台能力封装各个独立的模块中,使用功能前需要添加对应平台构建支持模块。模块可以与Tuanjie Editor一并安装,也可以在安装Tuanjie Editor后,在Tuanjie Hub的Installs目录下的设置选项中进行添加。
Before you get started, check Tuanjie’s Requirements and compatibility documentation for OpenHarmony to make sure you’re aware of any limitations for developing a Tuanjie application for OpenHarmony.
The four modules to install are: - The OpenHarmony Build Support module. - The OpenHarmony Software Development Kit (SDK). - A Java Development Kit. By default, Tuanjie uses OpenJDK. - Node.js SDK Tools
Tuanjie installs OpenHarmony SDK & Node.js SDK and OpenJDK respectively in the SDK, nodejs, and OpenJDK folders under /Tuanjie/Hub/Editor/[EditorVersion]/Editor/Data/PlaybackEngines/OpenHarmonyPlayer/.
顺利安装Tuanjie Editor和Platform Build Support Module后,在Tuanjie Hub的Projects页面点击New project按钮进入项目创建界面,选取需要的工程模板,填写工程名称和路径后创建工程。Tuanjie Editor在OpenHarmopny平台支持Build-in Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary和Universal Render Pipeline两种渲染管线,相关支持可见Requirements and compatibility documentation 。请注意,OpenHarmony项目路径只能包含字母、数字、句点、下划线和连字符(-),不能包含空格且不能以句点结尾,否则会导致项目打包失败!
在Tuanjie Editor可以找到Player Settings (Edit > Project Settings > Player) 和Build Settings (File > BuildSettings) 界面,包含了项目主要的构建配置参数,详情可见对应文档。 在项目开发前需要在Build Settings 界面将项目切换到OpenHarmony平台。
项目开发完毕后,通过设置Export Project选项,可以选取两种构建项目的方式。
You should use the Tuanjie Hub to install OpenHarmony SDK & Node.js tools and OpenJDK to ensure that you receive the correct versions and configurations. However, there are situations where it’s useful to change the SDK, Node.js, or JDK that Tuanjie uses to build applications for OpenHarmony. For example, if you have multiple versions of Tuanjie with the same dependencies and you don’t want to duplicate the installation of the SDK, Node.js, and JDK, you can specify a shared location.
To make Tuanjie use a custom version of a dependency: