Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
mpwhitt
Level 7

Automated Build Process

Is there a way to automate the entire "build" process of a Roku channel? We have one code base that will result in multiple channels and would like to automate changes to the images, manifest, and makefile.

We can build an external program in c# (or equivalent) that would make the changes to the files, but would still need a way to automate the packaging.

Thanks.
0 Kudos
12 Replies
EnTerr
Level 8

Re: Automated Build Process

<shrug> All a build consists of is stuffing the files into a ZIP, what's there to "automate"?

There might be more steps if your directory structure is unfortunate but that's for you to handle. For many months I have been using a mere 6-line shell script to build&deploy - and it goes pretty much like this:
  • set deployment IP

  • wake up Roku player (from sleep or kick out of channel)

  • bundle files

  • upload the bundle
0 Kudos
NewManLiving
Level 7

Re: Automated Build Process

Eclipse with the Brightscript plugin will do this for you
It really is a very good IDE especially if you have many resources
And a large code base. Project manager/outliner,object outliner, debugger
Exporting to the ROKU box, ..... I'm glad I picked up on it right off the bat
Some developers do not seem to appreciate it. I don't know how I would
Manage my framework without it.
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
Komag
Level 9

Re: Automated Build Process

What version of Eclipse are you using, and which plugin? I tried two different versions without much luck

Eclipse IDE for Java Developers
Version: Helios Service Release 2
Build id: 20110218-0911

BrightScript Core Version 1.0.0.201408081014

I can't remember now everything I tried, but for the past couple months I only use it for console with a large History Size
0 Kudos
NewManLiving
Level 7

Re: Automated Build Process

I'm running windows 8 and also use the ADT. So I currently have Indigo 3.7.2 with the current BS plugin. Used other versions in the past without a problem that could not be resolved. I have amazon Fire TV which is Android based so I installed the ADT. With the release of Android Studio, my current ADT setup is no longer supported. But I still use it for Brightscript. There are installation threads and documentation. I Initially followed the document instructions without any problem. This was even before I wrote my first Hello World channel. So I have been with it a little over a year now. I instantly liked the 2d api more than the built-in components and imagecanvas. So the IDE has proven invaluable in the development of a large framework of grids, menus, video/audio, graphic components etc..., over the past year. I could never manage without it. I have too much code now.
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
greeneca
Level 7

Re: Automated Build Process

I have written a ruby gem that automates some of the process (manifest updating, sideloading, rekeying, signing, downlaoding) as well as helps with other tasks (testing, deeplinking, restarting). It is not on ruby gems yet but I hope it will be there soon. I just need clearance from my boss. When it goes up I will post back here.
Charles Greene
SENIOR SOFTWARE DEVELOPER, REDSPACE
902 444.3490 x 8947
redspace.com
0 Kudos

Re: Automated Build Process

You can also use the makefile included in the SDK samples. I have a pretty heavily modified version that I use.
0 Kudos
Rek
Level 7

Re: Automated Build Process

"mpwhitt" wrote:
Is there a way to automate the entire "build" process of a Roku channel? We have one code base that will result in multiple channels and would like to automate changes to the images, manifest, and makefile.

We can build an external program in c# (or equivalent) that would make the changes to the files, but would still need a way to automate the packaging.

Thanks.


Packaging can be automated with http the same way the Makefile does it.

For Reference:

pkg: install
@echo "*** Creating Package ***"

@echo " >> creating destination directory $(PKGREL)"
@if [ ! -d $(PKGREL) ]; \
then \
mkdir -p $(PKGREL); \
fi

@echo " >> setting directory permissions for $(PKGREL)"
@if [ ! -w $(PKGREL) ]; \
then \
chmod 755 $(PKGREL); \
fi

@echo "Packaging $(APPSRC)/$(APPNAME) on host $(ROKU_DEV_TARGET)"
@if [ "$(HTTPSTATUS)" == " 401" ]; \
then \
read -p "Password: " REPLY ; echo $$REPLY | xargs -i curl --user $(USERPASS) --digest -s -S -Fmysubmit=Package -Fapp_name=$(APPNAME)/$(VERSION) -Fpasswd={} -Fpkg_time=`expr \`date +%s\` \* 1000` "http://$(ROKU_DEV_TARGET)/plugin_package" | grep '^<tr><td><font face="Courier"><a' | sed 's/.*href=\"\([^\"]*\)\".*/\1/' | sed 's#pkgs//##' | xargs -i curl --user $(USERPASS) --digest -s -S -o $(PKGREL)/$(APPNAME)_`date +%F-%T`.pkg http://$(ROKU_DEV_TARGET)/pkgs/{} ; \
else \
read -p "Password: " REPLY ; echo $$REPLY | xargs -i curl -s -S -Fmysubmit=Package -Fapp_name=$(APPNAME)/$(VERSION) -Fpasswd={} -Fpkg_time=`expr \`date +%s\` \* 1000` "http://$(ROKU_DEV_TARGET)/plugin_package" | grep '^<tr><td><font face="Courier"><a' | sed 's/.*href=\"\([^\"]*\)\".*/\1/' | sed 's#pkgs//##' | xargs -i curl -s -S -o $(PKGREL)/$(APPNAME)_`date +%F-%T`.pkg http://$(ROKU_DEV_TARGET)/pkgs/{} ; \
fi

@echo "*** Package $(APPNAME) complete ***"


Edit: Just in case you've never seen or heard of "the Makefile": http://forums.roku.com/viewtopic.php?p=421303
0 Kudos
greeneca
Level 7

Re: Automated Build Process

This thread is a few years old not but I have just open sourced a ruby gem that will help with this process and other development tasks.

https://github.com/ViacomInc/roku_builder
Charles Greene
SENIOR SOFTWARE DEVELOPER, REDSPACE
902 444.3490 x 8947
redspace.com
0 Kudos
Komag
Level 9

Re: Automated Build Process

You list "screen captures" - I didn't see an explanation of that below, what is it? Same as what we already can do, or does it work some other way? Currently I don't like the heavy compression we get in the jpg.
0 Kudos