diff --git a/en/application-dev/quick-start/Readme-EN.md b/en/application-dev/quick-start/Readme-EN.md index 72c8f73f67e21dfd81b7a542a4e4e60292e8bdb6..4a20e307cd19ab1abadd85e85b4000ed598a3d2e 100644 --- a/en/application-dev/quick-start/Readme-EN.md +++ b/en/application-dev/quick-start/Readme-EN.md @@ -3,7 +3,7 @@ - [DevEco Studio \(OpenHarmony\) User Guide](deveco-studio-(openharmony)-user-guide.md) - [Overview](overview.md) - [Configuring the OpenHarmony SDK](configuring-the-openharmony-sdk.md) - - [Importing an OpenHarmony Project](importing-an-openharmony-project.md) + - [Creating an OpenHarmony Project](creating-an-openharmony-project.md) - [Configuring the OpenHarmony App Signature](configuring-the-openharmony-app-signature.md) - [Installing and Running Your OpenHarmony App](installing-and-running-your-openharmony-app.md) diff --git a/en/application-dev/quick-start/configuring-the-openharmony-app-signature.md b/en/application-dev/quick-start/configuring-the-openharmony-app-signature.md index 9f83655c116701963ae726c99fa734da1e9e0004..1be080cceda7a5f1f030530827dadb303d55502c 100644 --- a/en/application-dev/quick-start/configuring-the-openharmony-app-signature.md +++ b/en/application-dev/quick-start/configuring-the-openharmony-app-signature.md @@ -11,21 +11,18 @@ Before running and debugging the OpenHarmony app on a real device, you need to s ## Generating a Key Store and CSR -OpenHarmony uses digital certificates \(.cer\) and **Profile** files \(.p7b\) to ensure app integrity. Before applying for these files, you need to generate a key store \(.p12\) and a certificate signing request \(.csr\). You can do so in DevEco Studio or a command-line tool. For details, see [Generating a Key Store and CSR](https://developer.harmonyos.com/en/docs/documentation/doc-guides/ide_debug_device-0000001053822404#EN-US_TOPIC_0000001154985555__section837891802519). +OpenHarmony uses digital certificates \(.cer\) and **Profile** files \(.p7b\) to ensure app integrity. Before applying for these files, you need to generate a key store \(.p12\) and a certificate signing request \(.csr\). You can do so in DevEco Studio or a command-line tool. For details, see [Generating a Key Store and CSR](https://developer.harmonyos.com/en/docs/documentation/doc-guides/publish_app-0000001053223745#section9752152162813). ## Generating an App Certificate Use the CSR generated in [Generating a Key Store and CSR](#section153146467405) to generate the digital certificate required for app signing. The method is as follows: -Go to the **Sdk\\toolchains\\lib** directory in the DevEco Studio installation directory, and run the following command in the CLI \(if the **keytool** command cannot be executed, add the JDK environment variables to the system environment variables\). You only need to modify the input and output to quickly generate a certificate. That is, modify **-infile** to specify the path of the CSR and **-outfile** to specify the name and path of the output certificate. +Go to the **Sdk\\toolchains\\lib** directory where the OpenHarmony SDK is saved \(see [Configuring the OpenHarmony SDK](configuring-the-openharmony-sdk.md) for details\) in the DevEco Studio installation directory, and run the following command in the CLI. If the **keytool** command cannot be executed, add the JDK environment variables to the system environment variables. You only need to modify the input and output to quickly generate a certificate. That is, modify **-infile** to specify the path of the CSR and **-outfile** to specify the name and path of the output certificate. ``` -keytool -gencert -alias "OpenHarmony Application CA" -infile app.csr -outfile IDE.cer -keystore OpenHarmony.p12 -sigalg SHA384withECDSA -storepass 123456 -ext KeyUsage:"critical=digitalSignature" -validity 3650 -rfc +keytool -gencert -alias "OpenHarmony Application CA" -infile myApplication_debug.csr -outfile myApplication_debug.cer -keystore OpenHarmony.p12 -sigalg SHA384withECDSA -storepass 123456 -ext KeyUsage:"critical=digitalSignature" -validity 3650 -rfc ``` ->![](public_sys-resources/icon-note.gif) **NOTE:** ->In the preceding command, the fields in blue cannot be modified. Otherwise, the certificate cannot be generated. - Refer to the following descriptions about the parameters in the command: - **alias**: alias of the CA private key used for issuing certificates. The CA private key of the OpenHarmony community is stored in the **OpenHarmony.p12** key store file. This parameter cannot be modified. @@ -45,12 +42,9 @@ The profile contains the package name of the OpenHarmony app, digital certificat Go to the **Sdk\\toolchains\\lib** directory, open the command-line tool, and run the following command. ``` -java -jar provisionsigtool.jar sign --in UnsgnedReleasedProfileTemplate.json --out SgnedReleasedProfileTemplate.p7b --keystore OpenHarmony.p12 --storepass 123456 --alias "OpenHarmony Application Profile Release" --sigAlg SHA256withECDSA --cert OpenHarmonyProfileRelease.pem --validity 365 --developer-id ohosdeveloper --java -jar provisionsigtool.jar sign --in UnsgnedReleasedProfileTemplate.json --out SgnedReleasedProfileTemplate.p7b --keystore OpenHarmony.p12 --storepass 123456 --alias "OpenHarmony Application Profile Release" --sigAlg SHA256withECDSA --cert OpenHarmonyProfileRelease.pem --validity 365 --developer-id ohosdeveloper --bundle-name package name --permission restricted permission name (optional) --permission restricted permission name (optional) --distribution-certificate IDE.cer +java -jar provisionsigtool.jar sign --in UnsgnedReleasedProfileTemplate.json --out myApplication_debug_Provision.p7b --keystore OpenHarmony.p12 --storepass 123456 --alias "OpenHarmony Application Profile Release" --sigAlg SHA256withECDSA --cert OpenHarmonyProfileRelease.pem --validity 365 --developer-id ohosdeveloper --bundle-name package name --permission restricted permission name (optional) --permission restricted permission name (optional) --distribution-certificate myApplication_debug.cer ``` ->![](public_sys-resources/icon-note.gif) **NOTE:** ->In the preceding command, the fields in blue cannot be modified. Otherwise, the profile cannot be generated. - Refer to the following descriptions about the parameters in the command: - **provisionsigtool**: tool for generating the profile which is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK. @@ -59,7 +53,7 @@ Refer to the following descriptions about the parameters in the command: - **keystore**: path of the key store for issuing certificates. The name of the OpenHarmony key store file is **OpenHarmony.p12**. The file is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK. This parameter cannot be modified. - **storepass**: key store password. The password is **123456** and cannot be changed. - **alias**: alias of the private key used for app signing. The CA private key of the OpenHarmony community is stored in the **OpenHarmony.p12** key store file. This parameter cannot be modified. -- **sigalg**: certificate signing algorithm. This parameter cannot be modified. +- **sigalg**: certificate signature algorithm. This parameter cannot be modified. - **cert**: path of the certificate of the signature profile. The file is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK. This parameter cannot be modified. - **validity**: certificate validity period, which is user-defined. - **developer-id**: developer ID, which is a user-defined character string. @@ -78,14 +72,14 @@ Go to **File** \> **Project Structure** \> **Project** \> **Signing Confi - **Key Alias**: Enter the alias of the key, which is the same as the alias entered in [Generating a Key Store and CSR](#section153146467405). - **Key Password**: Enter the key password, which is the same as the value of **Store Password**. - **Sign Alg**: Specify the signature algorithm, which has a fixed value of **SHA256withECDSA**. -- **Profile File**: Select the obtained debug profile in .p7b format. -- **Certpath File**: Select the obtained debug certificate in .cer format. +- **Profile File**: Select the .p7b profile file generated in [Generating the App Profile](#section2048641015325). +- **Certpath File**: Select the .cer debug certificate generated in [Generating an App Certificate](#section136609429562). -![](figures/en-us_image_0000001117638220.png) +![](figures/en-us_image_0000001144765960.png) Click **OK** to save your configurations. Then you can view the signature configuration information in **build.gradle** of the project. -![](figures/en-us_image_0000001117638526.png) +![](figures/en-us_image_0000001144606358.png) By default, the type of a HAP package compiled using DevEco Studio is set to **debug**. For a release type, click the **OhosBuild Variants** tab in the lower left corner of the project and set the type to **release**. For details about how to compile and build the HAP, see [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/build_hap-0000001053342418). diff --git a/en/application-dev/quick-start/configuring-the-openharmony-sdk.md b/en/application-dev/quick-start/configuring-the-openharmony-sdk.md index ae32e56ba6fec38d508d8db67dd0ae06286a26a7..d4fcb7eafc2294508afdc14551eb5d62278e8beb 100644 --- a/en/application-dev/quick-start/configuring-the-openharmony-sdk.md +++ b/en/application-dev/quick-start/configuring-the-openharmony-sdk.md @@ -10,8 +10,8 @@ To set up the OpenHarmony app development environment, configure the correspondi ## Prerequisites -- DevEco Studio 2.1 Release version has been downloaded and installed. You can click [here](https://developer.harmonyos.com/en/develop/deveco-studio#download) to download it. -- The OpenHarmony SDK package has been obtained and decompressed. You can click [here](https://mirror.iscas.ac.cn/OpenHarmony/sdk/OpenHarmony-SDK-2.0-Canary.7z) to download it. +- [DevEco Studio 2.1 Release](https://developer.harmonyos.com/en/develop/deveco-studio#download) or later has been downloaded and installed. +- The [OpenHarmony SDK](https://mirror.iscas.ac.cn/OpenHarmony/sdk/) package has been obtained and decompressed. ## Configuring the SDK Information @@ -65,7 +65,7 @@ DevEco Studio manages SDKs and toolchains using SDK Manager. OpenHarmony contain ![](figures/en-us_image_0000001162781359.png) -4. Go to the **Sdk\\js\\2.2.0.0\\build-tools\\ace-loader** directory, run the following commands in CLI, and wait until the installation is complete. +4. Go to the **Sdk\\js\\_version number_\\build-tools\\ace-loader** directory, run the following commands in CLI, and wait until the installation is complete. ``` npm cache clean -f diff --git a/en/application-dev/quick-start/creating-an-openharmony-project.md b/en/application-dev/quick-start/creating-an-openharmony-project.md new file mode 100644 index 0000000000000000000000000000000000000000..723daa9571ce788a66b80eb5e4d47ecb6e1ebbf6 --- /dev/null +++ b/en/application-dev/quick-start/creating-an-openharmony-project.md @@ -0,0 +1,7 @@ +# Creating an OpenHarmony Project + +- **[Using the Project Wizard to Create a Project](using-the-project-wizard-to-create-a-project.md)** + +- **[Importing a Sample to Create a Project](importing-a-sample-to-create-a-project.md)** + + diff --git a/en/application-dev/quick-start/deveco-studio-(openharmony)-user-guide.md b/en/application-dev/quick-start/deveco-studio-(openharmony)-user-guide.md index 89f638058e0ce2ebfc083afddc2eae351a94a9d9..fa3d93e55b60e400f847b02650eb6007621b6b99 100644 --- a/en/application-dev/quick-start/deveco-studio-(openharmony)-user-guide.md +++ b/en/application-dev/quick-start/deveco-studio-(openharmony)-user-guide.md @@ -4,7 +4,7 @@ - **[Configuring the OpenHarmony SDK](configuring-the-openharmony-sdk.md)** -- **[Importing an OpenHarmony Project](importing-an-openharmony-project.md)** +- **[Creating an OpenHarmony Project](creating-an-openharmony-project.md)** - **[Configuring the OpenHarmony App Signature](configuring-the-openharmony-app-signature.md)** diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001130932554.png b/en/application-dev/quick-start/figures/en-us_image_0000001130932554.png new file mode 100644 index 0000000000000000000000000000000000000000..0628bd691b40a53e0e5ac919381b13131587a10a Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001130932554.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001144606358.png b/en/application-dev/quick-start/figures/en-us_image_0000001144606358.png new file mode 100644 index 0000000000000000000000000000000000000000..96e764bfce13d3720f180060b40403fbc69f2357 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001144606358.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001144765960.png b/en/application-dev/quick-start/figures/en-us_image_0000001144765960.png new file mode 100644 index 0000000000000000000000000000000000000000..8aac40ccf2d2dc3d22ee6e652ad4ba8ba45e71a2 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001144765960.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001152459178.png b/en/application-dev/quick-start/figures/en-us_image_0000001152459178.png new file mode 100644 index 0000000000000000000000000000000000000000..5ee6a55e53e57843300bd5ec0cce4a175e97a29e Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001152459178.png differ diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001177051523.png b/en/application-dev/quick-start/figures/en-us_image_0000001177051523.png new file mode 100644 index 0000000000000000000000000000000000000000..1b4cbd9b48873812575675d3029208ebdb3d0161 Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001177051523.png differ diff --git a/en/application-dev/quick-start/importing-an-openharmony-project.md b/en/application-dev/quick-start/importing-a-sample-to-create-a-project.md similarity index 38% rename from en/application-dev/quick-start/importing-an-openharmony-project.md rename to en/application-dev/quick-start/importing-a-sample-to-create-a-project.md index 3c2cdce5759e105f4b905083aba133191af7dd7a..2649cdb504a47d0244110a5805c4943985d3c51f 100644 --- a/en/application-dev/quick-start/importing-an-openharmony-project.md +++ b/en/application-dev/quick-start/importing-a-sample-to-create-a-project.md @@ -1,12 +1,11 @@ -# Importing an OpenHarmony Project +# Importing a Sample to Create a Project -After the OpenHarmony SDK is configured, you can start developing your app only by **importing a sample project** to begin with. +>![](public_sys-resources/icon-note.gif) **NOTE:** +>This feature applies to OpenHarmony projects created using DevEco Studio 2.1 Release or later. -Sample projects for OpenHarmony app development are supported. Import a sample project with the following description: **This sample is intended for novices at developing OpenHarmony applications.**. For example, the **JsHelloWorld** sample in the **common** category. +After the OpenHarmony SDK is configured, you can get started to develop your app by **importing a sample project**. -![](figures/en-us_image_0000001165463605.png) - -1. On the DevEco Studio welcome page, go to **Configure** \(or ![](figures/en-us_image_0000001118018452.png) icon\) \> **Settings** \> **Version Control** \> **Git** and click **Test** to check whether the Git tool is installed. +1. On the DevEco Studio welcome page, select **Configure** or click the ![](figures/en-us_image_0000001118018452.png) icon, and choose **Settings** \> **Version Control** \> **Git**. Then click **Test** to check whether the Git tool has been installed. - If the tool has been installed, import a sample by referring to [2](#li5947194711181). ![](figures/en-us_image_0000001118018088.png) @@ -15,28 +14,19 @@ Sample projects for OpenHarmony app development are supported. Import a sample p ![](figures/en-us_image_0000001164498191.png) - 2. On the DevEco Studio welcome page, click **Import HarmonyOS Sample** to import a sample project. ![](figures/en-us_image_0000001163835551.png) -3. Go to **common** \> **JsHelloWorld** \> **Next**. +3. Choose **OpenHarmony Samples** \> **common** \> **JsHelloWorld** \> **Next**. - ![](figures/en-us_image_0000001118201202.png) + ![](figures/en-us_image_0000001152459178.png) 4. Configure **App Name** and **Project Location** and click **Finish**. Wait until the sample project is imported. ![](figures/en-us_image_0000001163915521.png) -5. Open the **build.gradle** file in the project and change the version number of the HAP plugin to **2.4.4.3-RC**. - - ![](figures/en-us_image_0000001117475776.png) - -6. Click ![](figures/en-us_image_0000001163835553.png) under **Gradle** in the upper right corner to sync the project again. - - ![](figures/en-us_image_0000001117635680.png) - -7. When the project is successfully synced, you can develop your OpenHarmony app. +5. When the project is successfully synced, start developing your OpenHarmony app. ![](figures/en-us_image_0000001163915523.png) diff --git a/en/application-dev/quick-start/installing-and-running-your-openharmony-app.md b/en/application-dev/quick-start/installing-and-running-your-openharmony-app.md index 63329422b2bc4e1942211647f4027a3fc4ebf0f2..8fe627f9560280d6b544cd49f8678d0fa74ba94f 100644 --- a/en/application-dev/quick-start/installing-and-running-your-openharmony-app.md +++ b/en/application-dev/quick-start/installing-and-running-your-openharmony-app.md @@ -37,5 +37,5 @@ The hdc commands are as follows: ``` -For details about how to use the hdc tool and the command format, see [hdc_std Usage Guidelines](../../device-dev/subsystems/oem_subsys_toolchain_hdc_guide.md). +For details about how to use the hdc tool and the command format, see the open-source repository **docs/en/device-dev/subsystems/hdc-usage-guidelines.md**. diff --git a/en/application-dev/quick-start/overview.md b/en/application-dev/quick-start/overview.md index 068ada1861f36437a9240ab1924f1afe1a1afad5..e9ba84986abe6e4ca4070567b7d90416690bd7fb 100644 --- a/en/application-dev/quick-start/overview.md +++ b/en/application-dev/quick-start/overview.md @@ -11,7 +11,7 @@ DevEco Studio is an integrated development environment \(IDE\) of HarmonyOS apps The process of developing an OpenHarmony app using DevEco Studio is the same as that of developing a HarmonyOS app. This document describes the differences between OpenHarmony and HarmonyOS app development. - **Environment setup**: You need to manually configure the SDK for the OpenHarmony app development. For details, see [Configuring the OpenHarmony SDK](configuring-the-openharmony-sdk.md). -- **OpenHarmony project import**: To develop an OpenHarmony app, you can only import a sample project to start with. For details, see [Importing an OpenHarmony Project](importing-an-openharmony-project.md). +- **OpenHarmony project import**: To develop an OpenHarmony app, you can only import a sample project to start with. For details, see [Importing a Sample to Create a Project](importing-a-sample-to-create-a-project.md). - **Signature configuration for debugging**: To run an OpenHarmony app on a real device, you need to sign the app first. For instructions, see [Configuring the OpenHarmony App Signature](configuring-the-openharmony-app-signature.md). - **App running on a real device**: To run your app on a real device, you need to use the hdc tool to push the HAP package of the OpenHarmony to the real device for installation. For details, see [Installing and Running Your OpenHarmony App](installing-and-running-your-openharmony-app.md). diff --git a/en/application-dev/quick-start/using-the-project-wizard-to-create-a-project.md b/en/application-dev/quick-start/using-the-project-wizard-to-create-a-project.md new file mode 100644 index 0000000000000000000000000000000000000000..1d6e036f62e16477bb62db8b533c3ba5e125be8a --- /dev/null +++ b/en/application-dev/quick-start/using-the-project-wizard-to-create-a-project.md @@ -0,0 +1,41 @@ +# Using the Project Wizard to Create a Project + +- [Prerequisites](#section13642104391619) +- [Procedure](#section132671712101714) + +If you are using DevEco Studio 2.2 Beta1 or later, you can use the project wizard to create a project. If you are using DevEco Studio 2.1 Release, create a project by following instructions in [Importing a Sample to Create a Project](importing-a-sample-to-create-a-project.md). + +## Prerequisites + +The OpenHarmony SDK has been installed. For details, see [Configuring the OpenHarmony SDK](configuring-the-openharmony-sdk.md). + +## Procedure + +1. Open the project wizard using either of the following methods: + - If no project is open, select **Create HarmonyOS Project** on the welcome page. + - If a project is already open, choose **File** \> **New** \> **New Project** on the menu bar. + +2. Select the **\[Standard\]Empty Ability\(JS\)** template and click **Next**. + + ![](figures/en-us_image_0000001177051523.png) + +3. Click **Next** and configure the project. + - **Project Name**: customized project name. + - **Project Type**: project type , which can be an [atomic service](https://developer.harmonyos.com/en/docs/documentation/doc-guides/atomic-service-definition-0000001090840664) or an ordinary app that requires download before use. + + >![](public_sys-resources/icon-note.gif) **NOTE:** + >If you're creating an atomic service: + >- There is no app icon on the home screen while running or debugging an atomic service. Use the debugging and running functions of DevEco Studio as an alternative. + >- Atomic services are installation free. This is done by automatically adding the **installationFree** field to the **config.json** file, with its value set to **true**. + >- If the value of the **installationFree** field of the entry module is set to **true**, the value of the **installationFree** field of all the related HAP modules is **true** by default. If the** installationFree field** of the entry module is set to **false**, the **installationFree** field of all the related HAP modules can be set to **true** or **false**. + >- When compiling and building an app, make sure that the size of each HAP package does not exceed 10 MB. + + - **Package Name**: software package name. By default, this name will also be used as your app ID. Assign a unique package name because your app must have a unique ID to be released. + - **Save Location**: local path for storing the project file. + - **Compatible API Version**: earliest SDK version compatible with your app. + - **Device Type**: device type supported by the project template. + + ![](figures/en-us_image_0000001130932554.png) + +4. Click **Finish**. DevEco Studio will automatically generate the sample code and resources that match your project type. Wait until the project is created. + diff --git a/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001144606358.png b/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001144606358.png new file mode 100644 index 0000000000000000000000000000000000000000..96e764bfce13d3720f180060b40403fbc69f2357 Binary files /dev/null and b/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001144606358.png differ diff --git a/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001144765960.png b/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001144765960.png new file mode 100644 index 0000000000000000000000000000000000000000..8aac40ccf2d2dc3d22ee6e652ad4ba8ba45e71a2 Binary files /dev/null and b/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001144765960.png differ