no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | cybiko:cylo [2009/11/27 17:54] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Bootstrapper====== | ||
+ | {{cylo.gif }} When you replace the **desktop.app** with your own application, | ||
+ | |||
+ | The bootstrapper would be a program that would replace the **desktop.app** and be configurable as to how long it should wait before launching an auto startup application. | ||
+ | |||
+ | =====Code===== | ||
+ | {{cylo.zip}} | ||
+ | |||
+ | |||
+ | =====Installation===== | ||
+ | - Copy the cylo.app onto the cybiko using the Console. | ||
+ | - cp desktop.app olddesk.app | ||
+ | - cp cylo.app desktop.app | ||
+ | - rm cylo.app | ||
+ | I also like to remove the // | ||
+ | Now reboot the cybiko and begin setting up your bootable programs. | ||
+ | |||
+ | If it all turns to custard or you just want to put the cybiko back to its original state, then you rename the olddesk.app to desktop.app. | ||
+ | |||
+ | |||
+ | ====Options==== | ||
+ | The first time the program is started no programs would have been setup so you will be presented with the menu screen immediately. | ||
+ | |||
+ | * //< | ||
+ | * //< | ||
+ | * //< | ||
+ | * //< | ||
+ | * //< | ||
+ | * // | ||
+ | * //Timeout// How many seconds to wait before autobooting | ||
+ | * //< | ||
+ | |||
+ | The options are saved in a file named // | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | =====Design===== | ||
+ | Configuration file // | ||
+ | |||
+ | The title of the application contains the name of the default application. ie //CYLO - serialrelay.app// | ||
+ | |||
+ | It must be noted that once an application has been launched the cylo.app program will continue to persist in memory, it does not terminate after launching its boot application. | ||
+ | |||
+ | |||
+ | |||
+ | ====Psuedo code==== | ||
+ | < | ||
+ | function start(application) | ||
+ | if not start_module(application) then | ||
+ | display " | ||
+ | else | ||
+ | wait for CYLO focus event | ||
+ | fi | ||
+ | |||
+ | autoboot mode = false | ||
+ | If configuration file exists then | ||
+ | Read configuration file. | ||
+ | if there is a default program then | ||
+ | | ||
+ | fi | ||
+ | |||
+ | timeout = (read as setting default:5) | ||
+ | display "Any key to enter the menu" | ||
+ | while autoboot mode and timeout > 0 | ||
+ | display " | ||
+ | Wait 1 second looking for message | ||
+ | if any keyboard event then | ||
+ | autoboot mode = false | ||
+ | fi | ||
+ | timeout = timeout - 1 | ||
+ | end while | ||
+ | |||
+ | if timeout == 0 then | ||
+ | start(default application) | ||
+ | fi | ||
+ | |||
+ | Display populated list of all available programs | ||
+ | |||
+ | while message | ||
+ | scan for keyboard event | ||
+ | case key | ||
+ | INS: display insert dialog, get new program name and save config file | ||
+ | DEL: delete currently selected program and save config file | ||
+ | | ||
+ | SELECT: mark current selection as default and save config file | ||
+ | TAB: display setting page | ||
+ | | ||
+ | ?: Display help text | ||
+ | ESC: Exit application (not useful when cylo has replaced the desktop.app)! | ||
+ | esca | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | {{tag> |