Your Digital Media Has Never Looked So Good

 
mpwhitt
Topic Author
Posts: 3
Joined: Wed Mar 26, 2014 7:04 am

Automated Build Process

Thu Jan 22, 2015 6:20 am

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.
 
EnTerr
** Valued Community Member **
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: Automated Build Process

Thu Jan 22, 2015 11:47 am

<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
 
User avatar
NewManLiving
Posts: 452
Joined: Fri Aug 02, 2013 6:14 pm

Re: Automated Build Process

Wed Jan 28, 2015 4:32 am

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 )
 
User avatar
Komag
Posts: 651
Joined: Fri Aug 22, 2014 3:42 am

Re: Automated Build Process

Wed Jan 28, 2015 4:44 am

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
 
User avatar
NewManLiving
Posts: 452
Joined: Fri Aug 02, 2013 6:14 pm

Re: Automated Build Process

Wed Jan 28, 2015 8:07 am

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 )
 
greeneca
Posts: 14
Joined: Tue Dec 16, 2014 12:18 pm

Re: Automated Build Process

Wed Jan 28, 2015 8:52 am

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.
 
mhardwick-vertigo
Posts: 5
Joined: Fri Dec 12, 2014 11:47 am

Re: Automated Build Process

Mon Mar 09, 2015 5:24 pm

You can also use the makefile included in the SDK samples. I have a pretty heavily modified version that I use.
 
Rek
Posts: 97
Joined: Mon Jul 08, 2013 9:22 am

Re: Automated Build Process

Tue Mar 10, 2015 2:15 pm

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
 
greeneca
Posts: 14
Joined: Tue Dec 16, 2014 12:18 pm

Re: Automated Build Process

Thu Mar 17, 2016 7:32 am

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
 
User avatar
Komag
Posts: 651
Joined: Fri Aug 22, 2014 3:42 am

Re: Automated Build Process

Fri Mar 18, 2016 12:36 am

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.
 
MatroxRT
Posts: 27
Joined: Thu Mar 12, 2015 2:03 pm

Re: Automated Build Process

Tue Mar 22, 2016 7:10 pm

You should check out Gulpjs

http://gulpjs.com/

Honestly, Gulp is pretty amazing, create a watch task on your brs files, and you can use it to auto-zip and deploy to a Roku device. A total time saver. You can also just have it run the makefile to get up and running -- I did this for months and it worked great, but now I have a variation that is pure javascript without the make dependency. You can have it do a bunch to automate that build process for the types of tasks you listed as well.
 
greeneca
Posts: 14
Joined: Tue Dec 16, 2014 12:18 pm

Re: Automated Build Process

Thu Jun 30, 2016 12:09 pm

Yes it is the same process that the device uses you can just do it using the tool instead of using their web UI.
 
EnTerr
** Valued Community Member **
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: Automated Build Process

Fri Jul 01, 2016 12:56 pm

MatroxRT wrote:
You should check out Gulpjs
http://gulpjs.com/
Honestly, Gulp is pretty amazing, create a watch task on your brs files, and you can use it to auto-zip and deploy to a Roku device. A total time saver. You can also just have it run the makefile to get up and running -- I did this for months and it worked great, but now I have a variation that is pure javascript without the make dependency. You can have it do a bunch to automate that build process for the types of tasks you listed as well.

Coincidently, recently re something else i was wondering "gulp or grunt?" - did some reading and ran into this making the great point of "neither":
http://blog.keithcirkel.co.uk/why-we-sh ... ing-grunt/
also https://medium.freecodecamp.com/why-i-l ... .iljgyxfwe
(Spoiler alert: npm comes with Node.js and can do what you need sans plugin adapters/wrappers)

DIsclaimer: using npm, gulp, grunt makes sense only if one is a JavaScript developer and already uses Node.js for something else. No point whatsoever otherwise.

Who is online

Users browsing this forum: mikelerela and 3 guests