Note:
Information about application signing will be available at a later date.
The Palm® webOS™ SDK includes the following command-line development tools:
Figure: Application Development Workflow
Information about application signing will be available at a later date.
These tools run on any supported development platforms. To view a list of the tools installed on a Mac or Linux system (or Windows, with cygwin installed):
You can use the application generator palm-generate to create applications and scenes.
The syntax is: palm-generate options
These are the options for this tool.
| Option | Effect |
|---|---|
| -f --overwrite | Overwrites existing files. |
| -l --list | Lists the available templates. |
| -p {property} --property= {property} | Defines properties to be used during generation. The {property} parameter contains a JSON object or key-value pairs in the format "key=value". In both cases, surrounding double quotation marks are required. In addition, single quotation marks are required around any value that contains a space character. |
| -t {template} --template= {template} | Uses the template {template}. If not specified, the default template new{{_app}} is used. |
| --help | Displays help information. |
The following are examples of the palm-generate command-line tool:
Create a new application in ~/projects/Ticker and set the application title to "Stock Ticker":
palm-generate -p "title=Stock Ticker" ~/projects/Ticker
Create a new application in ~/projects/Hello and set the title, id, and version:
palm-generate -p "{title:'Hello There', id:com.mystuff.hello, version:'2.1'}" ~/projects/Hello Add a new scene named "First" to the application in ~/projects/Ticker :
palm-generate -t new_scene -p "name=First" ~/projects/Ticker
The application packager palm-package prepares an application for installation by converting the files in the application directory to an .ipkg file that can be consumed by the emulator.
The syntax is: palm-package [ options ] application-directory
Where:
These are the options for this tool. The package filename is automatically generated from the id and version properties in the application's appinfo.json file.
| Option | Effect |
|---|---|
| -o {directory} --outdir= {directory} | Specifies the output directory where the package will be created. If not specified, the current directory is used. |
| --exclude= {pattern} | Excludes files with names matching {pattern}. The {pattern} is a name-matching string, and may contain the wildcards * and ?. Matching is case-sensitive unless the --ignore-case option is used. |
| -X {pattern_file} --exclude-from= {pattern_file} | Excludes patterns listed in {pattern_file}. The {pattern_file} contains one name-matching string per line. Each string may contain the wildcards * and ?. Matching is case-sensitive unless the --ignore-case option is used. |
| --ignore-case | Ignore case when matching names against patterns. |
| --no-exclude-eclipse | By default, palm-package will exclude meta-data files used by Eclipse plug-ins. Use the --no-exclude-eclipse option to include these files. |
| --no-exclude-hidden | By default, palm-package will exclude hidden files. Use the --no-exclude-hidden option to include these files. |
| --no-exclude-vcs | By default, palm-package will exclude meta-data files used by following version control systems: CVS, RCS, SCCS, SVN, Arch, Bazaar, Mercurial, and Darcs. Use the --no-exclude-vcs option to include these files. |
| --help | Displays help information. |
The following are examples of the palm-package command-line tool:
Create a package for the application in ~/projects/Ticker :
palm-package ~/projects/Ticker
Create a package for the application in ~/projects/Ticker and set the output directory to ~/packages :
palm-package -o ~/packages ~/projects/Ticker
Create a package for the application in ~/projects/Ticker, and exclude all text files and the tests directory:
palm-package --exclude="*.txt" --exclude="tests" ~/projects/Ticker
The palm-install tool installs a packaged application on the device or emulator.
You cannot install an application when the device is in USB mode or Media Sync mode. The device must be in Developer mode; see Enabling Developer Mode.
The syntax is: palm-install [options] [package]
Where:
These are the options for this tool.
| Option | Effect |
|---|---|
| -d {device} --device= {device} | Specifies the device:
|
| -l --list | Lists the application IDs of the installed applications on the specified device. |
| -r {application} --remove {application} | Removes the application with the application ID {application}, which corresponds to the id property in the application's appinfo.json file. |
| --help | Displays help information. |
The following are examples of the palm-install command-line tool:
Install the package (on the default device):
palm-install ~/projects/packages/com.example.app_1.0_all.ipk
Remove the application (from the default device):
palm-install -r com.example.app
List the applications (on the default device):
palm-install -l
List the applications on the usb-connected device:
palm-install -d usb -l
List the applications on the emulator:
palm-install -d tcp -l
The palm-launch tool launches (or closes) an application on the emulator or device.
The syntax is: palm-launch [options] {application}
Where:
These are the options for this tool.
| Option | Effect |
|---|---|
| -c --close | Closes the application instead of launching it. |
| -d {device} --device= {device} | Specifies the device:
|
| -f --relaunch | Closes and relaunches the application. |
| -i | Runs the application with the Inspector. |
| -l --list | Lists the application IDs of the installed applications on the specified device. |
| -p {parameters} --params= {parameters} | Specifies launch parameters. The {parameters} parameter contains a JSON object or key-value pairs in the format key:value. In both cases, quotation marks are required. |
| --help | Displays help text. |
The following are examples of the palm-launch command-line tool:
Launch the application (on the default device):
palm-launch com.example.app
Launch the application with debugging options:
palm-launch -p "{mojoConfig:true, debuggingEnabled:true}" com.example.app Close the application (on the default device):
palm-launch -c com.example.app
List the applications (on the default device):
palm-launch -l
List the applications on the usb-connected device:
palm-launch -d usb -l
List the applications on the emulator:
palm-launch -d tcp -l
To install and test applications on a webOS device, you need to enable Developer mode on the device.
Locking the phone with a PIN does not protect data on the device in Developer mode. When Developer mode is enabled, it is possible to use tools such as novaterm to access the device through the USB even if the phone is locked.
Enable Developer mode