net.yagga.miniinstaller
Class ScriptReader

java.lang.Object
  |
  +--net.yagga.miniinstaller.ScriptReader

public class ScriptReader
extends java.lang.Object

Reads a script file and give commands in sequence. A script file is an ordered list of actions:
each action is:
COMMAND,CMD_NAME,PARAM1,PARAM2,.. PARAMN
commands and params (cmd_name is omittede here for simplicity) available are:

SET varname value
START Title MsgString
START_IMG Title ImgName
INPUT_DIR Title MsgString  RetVariable [Default]
INPUT Title MsgString RetVariable [Default]
INPUT_FILE Title MsgString RetVariable  [Default]
CONSOLE_INPUT Title MsgString RetVariable
UNZIP Descr zipfile destdir
COPY src_dir filename_filter(s) dest_dir
EXEC_JAR_METHOD jarfile classname methodname param(s)
EXEC_JAVA classname methodname params
EXEC_JAR jarfile params
WRITE msg
WRITE_CONSOLE msg
DISPLAY filename
DISPLAY_CONSOLE filename
SHOW imgName
COPY srcDir fileNames/fileMask destDir
FINAL title,msg [,shell command,shell  command caption]
values can be strings (with spaces, but without commas, and quted strings.. with the usual value "...."
in param values there is variable expansion in the form $VAR_NAME$ where $VARNAME is one set in:
- INPUT/CONSOLE INPUT
- SET

There are some Predefined variables:
$USER_NAME$   name of uswer logged on to system
$USER_HOME$   user's home directory
$JAVA_HOME$   java home directory, be it jre home or jdk home
$JAVA_VERSION$   java version
$OS_NAME$  operating system name
$OS_ARCH$   operating system hardware architecture
$OS_VERSION$   operating system version
$_$ result of last command execution (Java execution..)

Author:
Walter Gamba

Field Summary
private static java.lang.String changeSep
           
private  java.util.Vector cmds
           
static java.lang.String DEBUG
           
(package private)  int lineNum
           
 ScriptCommand[] scriptCommands
           
private static java.lang.String sepString
           
 
Constructor Summary
ScriptReader(java.lang.String scriptFile)
           
 
Method Summary
private  void addCommand(java.lang.String str)
           
 void debug()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

cmds

private java.util.Vector cmds

scriptCommands

public ScriptCommand[] scriptCommands

changeSep

private static final java.lang.String changeSep

DEBUG

public static final java.lang.String DEBUG

sepString

private static java.lang.String sepString

lineNum

int lineNum
Constructor Detail

ScriptReader

public ScriptReader(java.lang.String scriptFile)
Method Detail

addCommand

private void addCommand(java.lang.String str)

debug

public void debug()