Skip to content

Configuration

Charles Greene edited this page Jun 9, 2017 · 4 revisions

Configuration

The gem must have a configuration file. To generate this file you can run the following command:

$ roku --configure

This will create the file '~/.roku_config.json' with a default configuration. Edit this file to add appropriate values. A configuration example with the minimum require fields can be found in this project called 'config.json.min'. The following are default configuration options:

Top Level Configuration

  • devices: information for accessing devices
  • projects: this is a hash of project objects
  • keys: contains keys that will be used for signing packages
  • input_mappings: allows you to change key mappings for the intractive navigator

Device Configuration

  • devices.default: id of the default device
  • devices.<device_id>.ip: ip address of the device
  • devices.<device_id>.user: dev username for the roku device
  • devices.<device_id>.password: dev password for the roku device

Project Configuration

  • projects.default: the key for the default project
  • projects.parent_dir: optional directory path that all projects are relative to
  • projects.<project_id>.parent: optional id of parent project to copy configs from
  • projects.<project_id>.directory: full path of the git repository the houses the roku app
  • projects.<project_id>.app_name: Name used when packaging the app
  • projects.<project_id>.stage_method: Which method to use for switching app stages (git or script)
  • projects.<project_id>.stages: a hash of stage objects
  • projects.<project_id>.stages.<stage_id>.branch: name of the branch for the given stage (if stage_method = git). If using stage_method = stage then this can be removed.
  • projects.<project_id>.stages.<stage_id>.script: scripts to use to stage the app (if stage_method = script). If using stage_method = git this can be removed.
  • projects.<project_id>.stages.<stage_id>.script.stage: script run form the app root directory to stage app
  • projects.<project_id>.stages.<stage_id>.script -> unstage: script run form the app root directory to unstage app
  • projects.<project_id>.stages.<stage_id>.key: this can be a string referencing a key in the keys section or a hash of options
  • projects.<project_id>.stages.<stage_id>.key.keyed_pkg: path to a pkg file that has been signed
  • projects.<project_id>.stages.<stage_id>.key.password: password for the signed pkg

Key Configuration

  • keys.key_dir: optional directory that all keys are relative to
  • keys.<key_id>.keyed_pkg: path to a pkg file that has been signed
  • keys.<key_id>.password: password for the signed pkg

The "input_mappings" section is optional but will allow you to override the default input mappings. In the section each key is a key press code. The value is a array with the desired command to run and a human readable key name. To see the key press code for a specific key the --navigate command can be run with the --debug option on to see a print out of all the keys pressed.

Clone this wiki locally