Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColor#3D3D3D
bgColor#F4F4F4
titleColor#3D3D3D
borderWidth0
titleBGColor#3D3D3D
borderStylesolid

ON THIS PAGE

Table of Contents
indent20px

...

The autozip.brs script should unpack the contents of the autorun.zip file to an installed storage device and reboot to complete the update:

text
Code Block
language
titleExample
package = CreateObject("roBrightPackage", "SD:/autorun.zip")
package.Unpack("SD:/")
MoveFile("SD:/autorun.zip", "SD:/autorun.zip_invalid")
RebootSystem()

Unpacking Encrypted Archives

If the autorun.zip file is encrypted, then the player uses the password stored in the registry, in the section "security" under the name "autozipkey," to decrypt the file.

 

...

 

text
Code Block
language
titleExtended 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("SD:/")
package = 0


t.Clear()
t.PushString("Update complete - remove USB drive to restart.")


while true
       sleep(1000)


       usb_key = CreateObject("roReadFile", "USB1:/autorun.zip")
       if type(usb_key) <> "roReadFile" then
             a=RebootSystem()
       endif
       usb_key = 0
end while

...