diff --git a/examples/README.md b/examples/README.md index 3f425e7..5666a63 100644 --- a/examples/README.md +++ b/examples/README.md @@ -4,6 +4,8 @@ Welcome to the examples directory! This guide will help you get started with the ## Available Examples +Note that some starter examples include the creation of a `brightsign-dumps` folder, which is used by the BrightSign OS to store crash information and is very useful to BrightSign Support when troubleshooting. The creation of this folder is an optional but recommended step to help with diagnosing application issues. + ### HTML & Web Storage Examples #### HTML Starter Example diff --git a/examples/html-starter-example/autorun.brs b/examples/html-starter-example/autorun.brs index d83dcb1..1eb7a01 100644 --- a/examples/html-starter-example/autorun.brs +++ b/examples/html-starter-example/autorun.brs @@ -1,4 +1,10 @@ function main() + ' Create directory to store crash-dumps (optional) + dir = CreateDirectory("SD:/brightsign-dumps") + if not dir then + print "Could not create directory" + end if + ' This interface is the preferred way for JavaScript content to communicate with its parent application. ' https://brightsign.atlassian.net/wiki/x/-gAeG mp = CreateObject("roMessagePort") diff --git a/examples/node-simple-server-example/src/autorun.brs b/examples/node-simple-server-example/src/autorun.brs index 9039ec2..b04c14f 100644 --- a/examples/node-simple-server-example/src/autorun.brs +++ b/examples/node-simple-server-example/src/autorun.brs @@ -1,4 +1,9 @@ function main() + ' Create directory to store crash-dumps (optional) + dir = CreateDirectory("SD:/brightsign-dumps") + if not dir then + print "Could not create directory" + end if mp = createobject("roMessagePort") diff --git a/examples/node-starter-example/autorun.brs b/examples/node-starter-example/autorun.brs index 01ad6c2..b315615 100644 --- a/examples/node-starter-example/autorun.brs +++ b/examples/node-starter-example/autorun.brs @@ -1,4 +1,9 @@ function main() + ' Create directory to store crash-dumps (optional) + dir = CreateDirectory("SD:/brightsign-dumps") + if not dir then + print "Could not create directory" + end if mp = createobject("roMessagePort") diff --git a/templates/cra-template-brightsign-app/template/src/autorun.brs b/templates/cra-template-brightsign-app/template/src/autorun.brs index 3e2a3a9..5e7afdb 100644 --- a/templates/cra-template-brightsign-app/template/src/autorun.brs +++ b/templates/cra-template-brightsign-app/template/src/autorun.brs @@ -1,5 +1,11 @@ function main() + ' Create directory to store crash-dumps (optional) + dir = CreateDirectory("SD:/brightsign-dumps") + if not dir then + print "Could not create directory" + end if + mp = CreateObject("roMessagePort") 'Enable lDWS diff --git a/templates/cra-template-brightsign-dashboard/template/src/autorun.brs b/templates/cra-template-brightsign-dashboard/template/src/autorun.brs index 679cdc0..77083d9 100644 --- a/templates/cra-template-brightsign-dashboard/template/src/autorun.brs +++ b/templates/cra-template-brightsign-dashboard/template/src/autorun.brs @@ -1,5 +1,11 @@ function main() + ' Create directory to store crash-dumps (optional) + dir = CreateDirectory("SD:/brightsign-dumps") + if not dir then + print "Could not create directory" + end if + ' Create Message Port mp = CreateObject("roMessagePort") ' Enable lDWS diff --git a/templates/html5-app-template/src/autorun.brs b/templates/html5-app-template/src/autorun.brs index 5cd1c3f..340a54f 100644 --- a/templates/html5-app-template/src/autorun.brs +++ b/templates/html5-app-template/src/autorun.brs @@ -1,5 +1,11 @@ function main() + ' Create directory to store crash-dumps (optional) + dir = CreateDirectory("SD:/brightsign-dumps") + if not dir then + print "Could not create directory" + end if + mp = CreateObject("roMessagePort") 'Enable lDWS EnableLDWS()