Your Digital Media Has Never Looked So Good

 
Subash Vallimuthu
Topic Author
Posts: 1
Joined: Mon May 29, 2017 1:10 am

Create Roku Custom Library

Mon May 29, 2017 11:09 pm

Hi, 
I am plan to create custom library on ROKU, No idea for that. 

My Doubt's
1) If any possible for custom library creation??? 
2) If it is possible please provide steps for creation
3) How to integrate custom library in our project ??

Please provide a solution.

Thank you
 
User avatar
RokuNB
Posts: 308
Joined: Fri Mar 31, 2017 2:22 pm

Re: Create Roku Custom Library

Tue May 30, 2017 9:44 am

Can you describe your use-case, i.e. why do you need to create library for Roku?
The business need for it, how is it to be used and so forth - that may help give you some ideas.
 
pmpascua
Posts: 26
Joined: Thu Nov 24, 2016 9:27 am

Re: Create Roku Custom Library

Mon Jun 19, 2017 11:08 am

Hi,

I'm also curious if its possible to make a custom library for Roku as I'm looking into possible ways to fix this particular issue.

In my case, we have an SDK, which composed of about 50 files all flattened onto 1 file on release, to give to our clients. Our clients wants us to use our SDK on a single Scene Graph Task node and this is where we're having some issues on the development stage.

Due to how the file imports work on Scene graph, either I have to explicitly import all 50 files or import 1 flattened release file for the task node to work, both are inefficient approach as I have to juggle between dev and release builds to debug my changes. The idea for the custom library was for the task node to only import 1 file that only contains the line "Library OurSDK" in it, making it so to dynamically load the SDK without explicitly stating the filepath

Thoughts?
 
User avatar
RokuNB
Posts: 308
Joined: Fri Mar 31, 2017 2:22 pm

Re: Create Roku Custom Library

Mon Jun 19, 2017 12:33 pm

pmpascua wrote:
[...] The idea for the custom library was for the task node to only import 1 file that only contains the line "Library OurSDK" in it, making it so to dynamically load the SDK without explicitly stating the filepath

Thoughts?

Sounds complicated. IMO if there were a feature like this, it would cover it:
<script type = "text/brightscript" uri = "pkg:/ourSDK/*.brs" />

Personally i am skeptical about having 50 separate files for your library, seems gratuitous - there is no benefit of fine grinding it into "one function = one file" mush
 
pmpascua
Posts: 26
Joined: Thu Nov 24, 2016 9:27 am

Re: Create Roku Custom Library

Mon Jun 19, 2017 1:03 pm

That wildcard approach doesn't work. If it does I shouldn't be posting here in the first place.
 
User avatar
RokuNB
Posts: 308
Joined: Fri Mar 31, 2017 2:22 pm

Re: Create Roku Custom Library

Mon Jun 19, 2017 1:27 pm

Correct, currently it doesn't. Hence i tried saying "if there were a feature like this". Apologies for my bad English.
Question is if there is a strong case for adding that. (me, i am ambivalent)
 
pmpascua
Posts: 26
Joined: Thu Nov 24, 2016 9:27 am

Re: Create Roku Custom Library

Mon Jun 19, 2017 1:40 pm

I for one would love to have that feature added if a custom library cannot be made. Not only does it applies on my case but to mimic the way the other platforms (iOS, Android) have done in regards to importing files. 

You could argue about our 50 files approach here but we did it this way for cleanliness and readability 
 
tim_beynart
Posts: 186
Joined: Wed Jul 15, 2015 8:30 am

Re: Create Roku Custom Library

Tue Jun 20, 2017 7:38 am

If you only care about a single flat file when you deliver the library, why not write a script to concatenate all the code?
- edit -
What I mean is, write a script to munge all your code into a release version and deliver it to the device for debugging. But re-reading this thread I see that you want to juggle between dev and prod. 
 
pmpascua
Posts: 26
Joined: Thu Nov 24, 2016 9:27 am

Re: Create Roku Custom Library

Tue Jun 20, 2017 8:16 am

I'm just exploring my options here if a custom library can be made for cleanliness sake. If it is not viable I can do the messy approach to make a script to replace all of those 50 imports inside the xml file into that one file import. I appreciate taking your time to answer my questions. 
 
User avatar
RokuNB
Posts: 308
Joined: Fri Mar 31, 2017 2:22 pm

Re: Create Roku Custom Library

Tue Jun 20, 2017 11:35 am

Opinions on which approach is "messy" may differ here. For example for me it is "unclean" to develop/debug your app in one configuration (50 source files) but in production use only 1 file. The reason being "stay as close to production as reasonably possible". Otherwise risks like having "vanishing" asserts, who may have side-effects in debug mode compilation.

I'd have done what @tim_beynart said, add a merge step to the build script (something like `cat moresels/*.brs >monolith-1-4-9.brs`)
 
pmpascua
Posts: 26
Joined: Thu Nov 24, 2016 9:27 am

Re: Create Roku Custom Library

Tue Jun 20, 2017 12:37 pm

I know fully how flattening those 50 files onto 1 file works, thats how I made our 1 file production SDK.  My issue is, as stated by @tim_beynart, is to juggle between dev and prod to work on this single task node with the hardcoded file imports. But thanks for the input anyway 
 
pmpascua
Posts: 26
Joined: Thu Nov 24, 2016 9:27 am

Re: Create Roku Custom Library

Tue Jul 04, 2017 1:31 pm

Its been decided to use a shell script as an external tool on eclipse instead of the export button to flatten the sdk, archive the sample app and upload to the targeted roku device. Its a bit more work but at least it gets the job done

Who is online

Users browsing this forum: No registered users and 3 guests