The Command Line Interface (CLI) provides functionalities for developing Tizen applications without the Tizen Studio. This topic describes the Tizen Studio CLI commands for packaging, installing, and running applications, and how they are used when working with TV applications.
If you prefer a command line interface to the graphical Tizen Studio window, you can use the Command Line Interface (CLI) tool during the entire development process.
The Tizen Studio TV Extension supports all of the Tizen Studio common CLI commands, but some commands are used differently when working with TV applications than with mobile or wearable applications.
To use the Tizen Studio CLI for developing TV applications, you need:
Tizen Studio 1.1 or higher
"Web CLI" package installed from the Tizen SDK tools in Package Manager
Valid certificate profile
If you do not have one already, create a certificate profile.
To allow installing your applications on the test emulator or device
In the Tizen Studio Device Manager, right-click the connected emulator or device and select "Permit to install applications".
Set the default certificate profile directory:
tizen cli-config -g "default.profiles.path=C:\Users\User\my_workspace\.metadata\.plugins\org.tizen.common.sign\profiles.xml"
<key>=<value>: CLI configuration key and value to set.
default.profiles.path=<profiles.xml file path>
-d, --delete <key>: CLI configuration key and value to remove
-g, --global: Sets the specified option globally (for all installed SDKs on your computer).
-l, --list: Lists all CLI configuration keys and values.
For more information, see Setting Configuration Options for the common Tizen CLI.
Before you can create an application package from a project, build the project:
tizen build-web -- D:\CLI_TEST\BasicProject
--output <directory name>
-- <project path>
For more information, see Building the Project for the common Tizen CLI.
To package the “BasicProject” project into the “BasicProject.buildResult” directory:
tizen package -t wgt -s myCert -- D:\CLI_TEST\BasicProject\.buildResult
--sign <certificate profile>
-- <output path>
To find your certificate profile name, in the Tizen Studio menu, select "Tools > Certificate Manager", and find the name of the active profile in the "Certificate Profile" panel.
Differences from Tizen Studio common CLI:
For more information, see Packaging an Application with Signing for the common Tizen CLI.
You can install the "BasicProject.wgt" application on a TV emulator in 2 ways:
tizen install -s emulator-26101 --name BasicProject.wgt -- D:\BasicProject
tizen install -t t-1031-1 --name BasicProject.wgt -- D:\BasicProject
--name <package name>
--serial <serial number>
--target <target name>
-- <file path>
You can retrieve the serial number and target name using the sdb devices command. In the following example, the serial number of the connected device is "emulator-26101" and the target name is "t-1031-1".
If the application does not install properly, check that the application ID and package ID information exists in the "config.xml" file.
For more information, see Installing the Application on a Target for the common Tizen CLI.
You can run the "0ifISz74ep.BasicProject" application on a TV emulator in 2 ways:
tizen run -s emulator-26101 -p 0ifISz74ep.BasicProject
tizen run -t t-1031-1 -p 0ifISz74ep.BasicProject
--pkgid <application id>
For more information, see Running the Application on a Target for the common Tizen CLI.
You can uninstall the "0ifISz74ep.BasicProject" application from a TV emulator in 2 ways:
tizen uninstall -s emulator-26101 -p 0ifISz74ep.BasicProject
tizen uninstall -t t-1031-1 -p 0ifISz74ep.BasicProject
For more information, see Uninstalling the Application on a Target for the common Tizen CLI.
You can repackage an existing ".wgt" file using your own certificate profile:
Extract the content of the ".wgt" file using a compressed file management application, such as 7-Zip.
In the unzipped content, delete the "author-signature.xml" and "signature1.xml" files.
Build the project.
Package the application using your certificate profile.