Robrightpackage (hd2000 only) – BrightSign HD2000 Object Reference Manual User Manual

Page 56

Advertising
background image

roBrightPackage (HD2000 only)

An roBrightPackage represents a zip file. The zip file can include arbitrary content or can be installed on a
storage device to provide content and script updates (for example, to distribute updates via USB thumb
drives).

Object creation:
 CreateObject("roBrightPackage", rotSTRING filename)

o

filename = The filename for the zip file


The interface provides:
o

rotVOID Unpack(rotSTRING path)

o

path = The destination path for the extracted files, e.g. “ATA:/”.

o

rotVOID SetPassword(rotSTRING password)

o

password = The password specified when the zip file was created

o

roBrightPackage supports AES 128 and 256 bit encryption as generated by WinZip.


Example:

package = CreateObject("roBrightPackage", "newfiles.zip")
package.SetPassword("test")
package.Unpack("ATA:/")


Using roBrightPackage to distribute new content:

The HD2000 checks storages for autorun scripts in the following order:
 External USB devices 1 through 9

 CF

 SD

In addition to looking for autorun.bas scripts, the HD2000 looks for autorun.zip files that contain a script
name autozip.bas. If autozip.bas is encrypted, then the HD2000 uses the password stored in the registry in
the section ‘security’ under the name ‘autozipkey’ to decrypt the file. If an autorun.zip file with an
autozip.bas file is found and autozip.bas is decrypted, the HD2000 will execute the autozip.bas file. The
autozip.bas file cannot reference any external files as it is the only file to be automatically uncompressed by
the HD2000 prior to execution. The autozip.bas script unpacks the contents of the autorun.zip file to an
installed storage device and reboots to complete the update.

Example:

' Content update application

r=CreateObject("roRectangle", 20, 668, 1240, 80)
t=CreateObject("roTextWidget",r,1,2,1)
r=CreateObject("roRectangle", 20, 20, 1200, 40)
t.SetSafeTextRegion(r)
t.SetForegroundColor(&hff303030)
t.SetBackgroundColor(&hffffffff)
t.PushString("Updating content from USB drive, please wait...")

package = CreateObject("roBrightPackage", "autorun.zip")
package.SetPassword("test")
package.Unpack("ATA:/")
package = 0

t.Clear()

56

Advertising
This manual is related to the following products: