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 Web applications.
Tizen Studio CLI Commands
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 or display device applications than with mobile or wearable applications.
To use the Tizen Studio CLI for developing applications, you need:
Tizen Studio 1.1 or higher
"Web CLI" package installed from the Tizen SDK tools in Package Manager
Figure 1. Web CLI package 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".
Figure 2. Allow installing applications
Example: 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"
Options:
<key>=<value>
default.profiles.path=<profiles.xml file path>
default.sdb.timeout=<timeout value>
-d
--delete <key>
-g
--global
-l
--list
For more information, see Setting Configuration Options for the common Tizen CLI.
Example: Before you can create an application package from a project, build the project:
tizen build-web -- D:\CLI_TEST\BasicProject
-out
--output <directory name>
-- <project path>
For more information, see Building the Project for the common Tizen CLI.
Example: To package the “BasicProject” project into the “BasicProject.buildResult” directory:
tizen package -t wgt -s myCert -- D:\CLI_TEST\BasicProject\.buildResult
-t
--type wgt
-s
--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.
Figure 3. Certificate profile name
Differences from Tizen Studio common CLI:
For more information, see Packaging an Application with Signing for the common Tizen CLI.
Example: 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
-n
--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".
sdb devices
Figure 4. "sdb devices" command example
Note If the application does not install properly, check that the application ID and package ID information exists in the "config.xml" file. Figure 5. Application and package ID in "config.xml" file
If the application does not install properly, check that the application ID and package ID information exists in the "config.xml" file.
Figure 5. Application and package ID in "config.xml" file
For more information, see Installing the Application on a Target for the common Tizen CLI.
Example: 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
-p
--pkgid <application id>
Figure 6. Application ID in "config.xml" file
For more information, see Running the Application on a Target for the common Tizen CLI.
Example: 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:
Figure 7. Delete signature files