Giter Site home page Giter Site logo

roku-develop's Introduction

an ATOM editor package to deploy a Roku project to multiple devices

Automatically (or manually) discover Rokus on the local network.

Zip the current Roku project directory.

Deploy to multiple Roku devices.

Automatically increment manifest build_version.

Create a Package file for the currently-deployed application.

Switch between associated .xml and .brs files with keyboard shortcut.

Install the package in Atom

Go to Settings Ctrl+, then Install. Search for roku-develop.

For more info on Atom, read the Atom Flight Manual.

Configure settings

Go to Settings Ctrl+, then Packages. Search for roku-develop.

Enter the Roku developer settings password. See the Roku Developer Setup Guide for instructions on setting the Roku developer password. Ensure that Developer Mode is enabled for each Roku device.

Default Packaging Device - the SERIAL NUMBER of the default device to be used for packaging, used if more than one device is checked. If one and only one device is checked in the device list, then the checked device will be used for packaging instead of this default device. This option avoids having to un-check all but one device when packaging, then re-check them if deploying to multiple devices.

Increment Manifest build_version - specifies whether the manifest file build_version is incremented when the project is deployed:

  • Do not increment
  • Increment
  • Use date: yyyymmdd
  • Use date/time: yymmddhhmm

Save On Deploy - automatically save the current file before deployment.

Send Home Keypress Before Deploy - send a Home keypress to the device, followed by a short delay, before uploading the zip file. This can be used as a workaround to a Roku bug that causes the device to sometimes re-boot when deploying a Scene Graph channel. Uncheck this box for faster deployment, provided the Roku does not crash.

Automatically discover Rokus on the local network - if checked, will automatically attempt to discover all Rokus on the local network. If un-checked, will disable automatic discovery, only allowing Roku devices to be manually entered.

.rokudevignore

Ignores can optionally be placed in the file .rokudevignore. This file should reside in the same directory as the manifest file.

Rules:

  • Lines beginning with a hash (#), and blank lines, will not be processed.
  • Lines beginning with an exclamation mark (!) specify unignored paths.
  • All other lines specify ignored paths.
  • Any ignored or unignored path name may either be a path name relative to .rokudevignore's containing directory (the project root directory), or a base name of a file or directory that may match anywhere in the directory hierarchy.
  • Unignores can be used to explicitly include a file or directory, even if it is contained within a directory that is being ignored.
  • If a path is both ignored and unignored, then the ignore takes precedence.
  • Path separators in .rokudevignore are forward slashes (even on Windows).

Keyboard shortcuts

roku-develop uses 4 commands: roku-develop:toggle, roku-develop:deploy, roku-develop:package, and roku-develop:switch-files, which may be selected from the Packages > roku-develop menu, or from the context (right-click) menu.

In addition, the following keyboard shortcuts are defined by default:

Ctrl+; (Ctrl-semicolon) - Toggle device list.

Ctrl+Alt+; (Ctrl-Alt-semicolon) - Deploy to selected devices.

Alt+; (Alt-semicolon) - Package the currently-deployed application.

Ctrl+Alt+X (Ctrl-Alt-x) - Switch between the current component's brs and xml files, if applicable.

If you find that these particular key combinations don't work well with your keyboard configuration, you can change them:

  1. On the roku-develop package Settings page, un-check the 'Enable' box under Keybindings.

  2. Edit your Atom keymap.cson file (look under File > Keymap... or Edit > Keymap...), then add your own keybindings. For example, to use Ctrl+7, Ctrl+8, Ctrl+9 and Ctrl+0 instead, place the following lines at the end of your keymap.cson file:

'atom-workspace':
  'ctrl-7': 'roku-develop:package'
  'ctrl-8': 'roku-develop:toggle'
  'ctrl-9': 'roku-develop:deploy'
  'ctrl-0': 'roku-develop:switch-files'

Usage

Ctrl+; (Ctrl-semicolon) - Toggle device list. Wait for devices to be automatically discovered, then check the boxes to specify devices for deployment. The state of the device table will be persisted between editor sessions. Note that if you have multiple Atom editor instances running, changing a checkbox state in one Atom instance may or may not be reflected in the other Atom instances.

By default, all newly-discovered devices are checked. Uncheck the boxes for devices not to be deployed to.

To disable automatic discovery, un-check the Settings option for automatic discovery.


Ctrl+Alt+; (Ctrl-Alt-semicolon) - Deploy to selected devices.


Alt+; (Alt-semicolon) - Package the currently-deployed application.

  • Roku device must have been keyed using Genkey or Rekey, (see https://sdkdocs.roku.com/display/sdkdoc/Packaging+Roku+Channels).
  • Application packager password (24 chars, e.g. cmqsu1vhB6Q1VVTHI0eGLp==), must have been entered in Settings.
  • If a Default Packaging Device is specified in the Config Settings, it will be used, unless one and only one device is checked.
  • Package must first be deployed to the Roku before it can be packaged.
  • Package will be written to the same directory as the Zip File Directory specified in Settings.

Ctrl+Alt+X (Ctrl-Alt-x) - Switch between the current component's script (*.brs) and layout (*.xml) files.

  • If the corresponding file is already open in another tab and/or pane, focus will move to that tab/pane.
  • If the file is not open yet, a new tab containing it will be opened under the current active pane.
  • If no corresponding file exists (i.e. the current directory contains only a .brs or only an .xml file), no action will be taken.

Add New Device button can be used to manually add devices not automatically discovered. Note that a device will only be listed (and deployed to) if it responds to ECP requests.


Clear List button will remove all automatically-discovered and manually-added devices from the list. Automatic discovery (if enabled in Settings) will re-add devices.


Hide Unchecked/Show Unchecked button toggles the device list display to either show only checked devices (Hide Unchecked), or show all devices (Show Unchecked).

When deploying a project, one of the project's files needs to be open in the active editor pane on display when the deploy command is issued. An upward search of the directory tree is performed to locate the Roku project's directory (the one containing a source directory and manifest file). The Atom editor may have multiple Roku project directories open, but only the project containing the file currently being edited will be deployed. Note that the manifest file must be UTF-8 encoded.

screenshot

Firewall configuration

All Roku devices on the local network should automatically be discovered using SSDP M-SEARCH and NOTIFY responses. If not, then ensure your firewall is configured for automatic device discovery. This is more likely to be an issue for certain Linux users.

The M-SEARCH responses are UDP unicast packets sent to the ephemeral port from which the M-SEARCH request originated; the ephemeral port range may be found by:

cat /proc/sys/net/ipv4/ip_local_port_range

The NOTIFY responses are UDP multicast packets sent to port 1900.

So in Fedora or CentOS, for example, the following commands would open these ports:

sudo firewall-cmd --permanent --add-port=1900/udp
sudo firewall-cmd --permanent --add-port=32768-61000/udp
sudo firewall-cmd --reload

On Ubuntu, the firewall is typically disabled by default. If not, a rule like this should work:

sudo ufw allow proto udp from 192.168.0.0/24 port 1900,32768:60999
sudo ufw reload

Contribute

Some concepts used in this package were taken from the roku-deploy Atom package by Mike McAulay/mmratio. Thanks for your efforts, Mike.

Thanks to AhmedGamal-Inmobly, Rolando Islas, and Michael Meyer for their contributions to this package.

Another useful package for Roku development is language-brightscript, which provides BrightScript syntax highlighting and snippets. language-vb also works well with BrightScript.

Feel free to use Github Issues or Pull Requests for bug reports and enhancement requests, etc.

You may also contact the roku-develop author, belltown, through the Roku Forums.

roku-develop's People

Contributors

ahmedgamal-inmobly avatar belltown avatar entrez avatar rolandoislas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

roku-develop's Issues

Uncaught Error: EPERM: operation not permitted, scandir '~/AppData\Local\Application Data'

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.44.0 x64
Electron: 4.2.7
OS: Microsoft Windows 10 Pro
Thrown From: roku-develop package 0.1.12

Stack Trace

Uncaught Error: EPERM: operation not permitted, scandir 'C:\Users\38097\AppData\Local\Application Data'

At fs.js:115

Error: EPERM: operation not permitted, scandir 'C:\Users\38097\AppData\Local\Application Data'
    at Object.readdirSync (fs.js:764:3)
    at Object.fs.readdirSync (ELECTRON_ASAR.js:641:39)
    at Proxy.listSync (~/AppData/Local/atom/app-1.44.0/resources/app/static/<embedded>:11:267975)
    at Directory.getEntriesSync (~/AppData/Local/atom/app-1.44.0/resources/app/static/<embedded>:14:1145884)
    at Object.addFilesToArchive (/packages/roku-develop/lib/roku-develop.coffee:706:5)
    at Object.addFilesToArchive (/packages/roku-develop/lib/roku-develop.coffee:749:12)
    at Object.addFilesToArchive (/packages/roku-develop/lib/roku-develop.coffee:749:12)
    at Object.addFilesToArchive (/packages/roku-develop/lib/roku-develop.coffee:749:12)
    at /packages/roku-develop/lib/roku-develop.coffee:695:8
    at ReadFileContext.callback (/packages/roku-develop/lib/roku-develop.coffee:763:9)
    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:235:13)

Commands

     -9:19.3.0 core:confirm (div.package-detail)
     -7:00.0 roku-develop:deploy (input.hidden-input)
     -6:53.6.0 bracket-matcher:select-inside-brackets (input.hidden-input)
  2x -6:49.7.0 settings-view:open (input.hidden-input)
     -5:46.7.0 application:open-file (div.package-detail)
  2x -1:33.8.0 roku-develop:deploy (input.hidden-input)

Non-Core Packages

roku-develop 0.1.12 

Symlinks is not working

I've symlink inside the project and it's not added to the out zip archive.

I've made a workaround to make it work, check this pull request #3

Where is the add device button?

Auto discovery may not work in the face of multiple NICs. I've turned off auto discovery and want to add a device IP. There is no place I can see to put in an IP and there is no Add New Device button.

Home launch should check for 200 and 202 response

The Roku will return a 202 if you try to launch an app that is already launched.

This may be a change in the later version of the firmware (7.5).

roku-develop.coffee line 472:

      else if response.statusCode isnt 200
        atom.notifications.addWarning 'Bad response code ' +
                                      response.statusCode +
                                      ' from ' + ip, {dismissable: true}

Should include 202. Something like this:

      else if [200,202].include(response.statusCode) == false 
        atom.notifications.addWarning 'Bad response code ' +
                                      response.statusCode +
                                      ' from ' + ip, {dismissable: true}

Let me know if you would like me to do a PR.

Upload error with ESOCKETTIMEDOUT

Hi,

I'm working on a Roku project that is rather large (the bundle.zip is currently 2 MB) and when I deploy to a Roku Premiere I get an error: "Upload error for 172.18.2.173: ESOCKETTIMEDOUT".

The file does upload to the Roku, but I was wondering if there is a way to change the timeout value or suppress the timeout message since it's a bit of a pain to have to clear the message all of the time.

I use your Atom plug-in everyday and really appreciate the time you took to write it and and make it available.

Thanks,

Paul

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.