Template app.

This commit is contained in:
2023-08-24 23:41:18 +01:00
parent 9fa8fba957
commit e9cc8deff8
7 changed files with 814 additions and 0 deletions

25
src/Makefile Normal file
View File

@@ -0,0 +1,25 @@
#########################################################################
# Simple makefile for packaging VideoCanvas test channel
#
# Makefile Usage:
# > make
# > make install
# > make remove
#
# Important Notes:
# To use the "install" and "remove" targets to install your
# application directly from the shell, you must do the following:
#
# 1) Make sure that you have the curl command line executable in your path
# 2) Set the variable ROKU_DEV_TARGET in your environment to the IP
# address of your Roku box. (e.g. export ROKU_DEV_TARGET=192.168.1.1.
# Set in your this variable in your shell startup (e.g. .bashrc)
##########################################################################
APPNAME = BanvorFlower
VERSION = 1.0
ZIP_EXCLUDE= -x \*.pkg -x storeassets\* -x keys\* -x \*/.\* -x */*.xcf
APPS_ROOT_DIR := $(shell git rev-parse --show-toplevel)
include $(APPS_ROOT_DIR)/scripts/app.mk

View File

@@ -0,0 +1,20 @@
'**
'** Example: Edit a Label size and color with BrightScript
'**
function init()
m.top.setFocus(true)
m.myLabel = m.top.findNode("myLabel")
'Set the font size
m.myLabel.font.size=92
'Set the color to light blue
m.myLabel.color="0x72D7EEFF"
m.top.backgroundUri="pkg:/gfx/banvor_bg_hd.jpg"
'**
'** The full list of editable attributes can be located at:
'** http://sdkdocs.roku.com/display/sdkdoc/Label#Label-Fields
'**
end function

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<component name="MainScene" extends="Scene">
<children>
<Label id="myLabel"
text="I am fine, thank you!"
width="1280"
height="720"
horizAlign="center"
vertAlign="center"
/>
</children>
<script type="text/brightscript" uri="mainscene.brs" />
</component>

34
src/manifest Normal file
View File

@@ -0,0 +1,34 @@
title=Banvor
major_version=1
minor_version=0
build_version=0
mm_icon_focus_fhd=pkg:/gfx/mm_icon_focus_fhd.png
mm_icon_focus_hd=pkg:/gfx/mm_icon_focus_hd.png
splash_screen_fhd=pkg:/gfx/banvor_ss_fhd.png
splash_screen_hd=pkg:/gfx/banvor_ss_hd.png
splash_color=#111111
splash_min_time=2000
now_playing_logo_hd=pkg:/gfx/now_playing_logo.png
now_playing_logo_fhd=pkg:/gfx/now_playing_logo.png
rmppro=0
requires_audiometadata=1
playonly_aware=1
usbonly=0
allow_legacy_option=0
enable_button_bar=1
network_not_required=1
usb_media_handler=1
#autoExitTimeoutMinutes=12000
no_qt_deprecation_warnings=1
confirm_partner_button=1
supports_input_launch=1
has_voice_adapter=1
supports_etc_seek=1
rsg_version=1.2
run_as_process=1
sdk_instant_resume=1
ui_resolutions=hd

37
src/source/main.brs Normal file
View File

@@ -0,0 +1,37 @@
sub Main(aa as Object)
print "in Main()"
'Indicate this is a Roku SceneGraph application'
screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
screen.setMessagePort(m.port)
di = CreateObject("roDeviceInfo")
di.setMessagePort(m.port)
hs= CreateObject("roHdmiStatus")
hs.setMessagePort(m.port)
'Create a scene and load /components/mainscene.xml'
scene = screen.CreateScene("MainScene")
screen.show()
while(true)
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roSGScreenEvent"
if msg.isScreenClosed()
print "Screen is closed. End of Main()"
return
end if
end if
if msgType = "roHdmiStatusEvent"
?"--------------------------"
?"hdmi status event received"
end if
if msgType = "roDeviceInfoEvent"
?"--------------------------"
?"device info event received"
end if
end while
end sub