Difference between revisions of "Unit ShellUpdate"
From Ultibo.org
								
												
				| Line 36: | Line 36: | ||
<br />    | <br />    | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">  | ||
| − | <div style="font-size: 14px; padding-left: 12px;">'''Shell update command   | + | <div style="font-size: 14px; padding-left: 12px;">'''Shell update command''' <code> SHELL_UPDATE_COMMAND_* </code></div>  | 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
{| class="wikitable" style="font-size: 14px; background: white;"  | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| Line 50: | Line 50: | ||
<br />    | <br />    | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">  | ||
| − | <div style="font-size: 14px; padding-left: 12px;">'''Shell update action   | + | <div style="font-size: 14px; padding-left: 12px;">'''Shell update action''' <code> SHELL_UPDATE_ACTION_* </code></div>  | 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
{| class="wikitable" style="font-size: 14px; background: white;"  | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| Line 67: | Line 67: | ||
<br />    | <br />    | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">  | ||
| − | <div style="font-size: 14px; padding-left: 12px;">'''Shell update item   | + | <div style="font-size: 14px; padding-left: 12px;">'''Shell update item''' <code> SHELL_UPDATE_ITEM_* </code></div>  | 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
{| class="wikitable" style="font-size: 14px; background: white;"  | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| Line 107: | Line 107: | ||
<br />    | <br />    | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">  | ||
| − | <div style="font-size: 14px; padding-left: 12px;">'''Shell update parameter   | + | <div style="font-size: 14px; padding-left: 12px;">'''Shell update parameter''' <code> SHELL_UPDATE_PARAMETER_* </code></div>  | 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
{| class="wikitable" style="font-size: 14px; background: white;"  | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
Revision as of 06:11, 4 April 2017
Return to Unit Reference
Contents
Description
Ultibo Update Shell extension unit
To be documented
Constants
Shell update specific constants 
 SHELL_UPDATE_*  SHELL_UPDATE_HTTP_SEPARATOR = '/';
 | 
|
 SHELL_UPDATE_HTTP_PROTOCOL = 'http://';
 | 
|
 SHELL_UPDATE_EXTENSION_TMP = '.tmp';
 | 
|
 SHELL_UPDATE_EXTENSION_BAK = '.bak';
 | 
|
 
Shell update command 
 SHELL_UPDATE_COMMAND_*  SHELL_UPDATE_COMMAND_UPDATE = 'UPDATE';
 | 
|
 SHELL_UPDATE_COMMAND_WGET = 'WGET';
 | 
 
Shell update action 
 SHELL_UPDATE_ACTION_*  SHELL_UPDATE_ACTION_CHECK = 'CHECK';
 | 
|
 SHELL_UPDATE_ACTION_GET = 'GET';
 | 
|
 SHELL_UPDATE_ACTION_SET = 'SET';
 | 
 
Shell update item 
 SHELL_UPDATE_ITEM_*  SHELL_UPDATE_ITEM_ALL = 'ALL';
 | 
|
 SHELL_UPDATE_ITEM_KERNEL = 'KERNEL';
 | 
|
 SHELL_UPDATE_ITEM_CONFIG = 'CONFIG';
 | 
|
 SHELL_UPDATE_ITEM_COMMAND = 'COMMAND';
 | 
|
 SHELL_UPDATE_ITEM_HTTP_SERVER = 'SERVER';
 | 
|
 SHELL_UPDATE_ITEM_HTTP_PATH = 'REMOTE';
 | 
|
 SHELL_UPDATE_ITEM_LOCAL_PATH = 'LOCAL';
 | 
|
 SHELL_UPDATE_ITEM_KERNEL_IMAGE = 'IMAGE';
 | 
|
 SHELL_UPDATE_ITEM_KERNEL_CONFIG = 'CONFIG';
 | 
|
 SHELL_UPDATE_ITEM_KERNEL_COMMAND = 'COMMAND';
 | 
|
 
Shell update parameter 
 SHELL_UPDATE_PARAMETER_*  SHELL_UPDATE_PARAMETER_REBOOT = 'R';
 | 
|
 SHELL_UPDATE_PARAMETER_FORCE = 'F';
 | 
Type definitions
None defined
Class definitions
Shell update
TShellUpdate = class(TShellCommand)
public 
 | |
 constructor Create;
 | 
|
private 
 | |
 function GetLocal(const AName:String):String;
 | 
|
 function GetRemote(const AName:String):String;
 | 
|
protected 
 | |
 function UpdateGet(AShell:TShell; ASession:TShellSession; const ALocal,ARemote:String; AForce:Boolean; var AUpdate:Boolean):Boolean;
 | 
|
 function UpdateCheck(AShell:TShell; ASession:TShellSession; const ALocal,ARemote:String; AForce:Boolean; var AUpdate:Boolean):Boolean;
 | 
|
public 
 | |
 function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;
 | 
|
 function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;
 | 
|
 function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;
 | 
|
Public variables
Shell update specific variables
 SHELL_UPDATE_HTTP_SERVER:String;
 | 
Name or IP of http server for updates (eg 192.168.0.1) | 
 SHELL_UPDATE_HTTP_PATH:String;
 | 
URL path on http server for updates (eg /updates/) | 
 SHELL_UPDATE_LOCAL_PATH:String;
 | 
Local path for updates (eg C:\) | 
 SHELL_UPDATE_KERNEL_IMAGE:String;
 | 
Name of the kernel image file for updates (eg kernel.img) | 
 SHELL_UPDATE_KERNEL_CONFIG:String;
 | 
Name of the kernel config file for updates (eg config.txt) | 
 SHELL_UPDATE_KERNEL_COMMAND:String;
 | 
Name of the kernel command file for updates (eg cmdline.txt) | 
Function declarations
Initialization functions
procedure ShellUpdateInit;
Description: To be documented
| Note | None documented | 
|---|
Return to Unit Reference