|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.izforge.izpack.compiler.Compiler
The IzPack compiler class.
Nested Class Summary | |
(package private) static class |
Compiler.CmdlinePackagerListener
Used to handle the packager messages in the command-line mode. |
(package private) class |
Compiler.NativeLibrary
Represents a native library. |
(package private) class |
Compiler.Pack
Represents a pack. |
(package private) class |
Compiler.PackSource
Represents a pack data source. |
(package private) class |
Compiler.Resource
Represents a resource. |
Field Summary | |
protected java.lang.String |
basedir
The base directory. |
private boolean |
compileFailed
Error code, set to true if compilation succeeded. |
protected java.lang.String |
filename
The XML filename. |
static java.lang.String |
IZPACK_HOME
The IzPack home directory. |
static java.lang.String |
IZPACK_VERSION
The IzPack version. |
protected java.io.File |
keepDirFile
The directory-keeping special file. |
protected java.lang.String |
kind
The installer kind. |
protected java.lang.String |
output
The output jar filename. |
protected PackagerListener |
packagerListener
The packager listener. |
static java.lang.String |
STANDARD
Standard installer. |
static java.lang.String |
STANDARD_KUNSTSTOFF
Standard-Kunststoff installer. |
protected VariableValueMapImpl |
varMap
The variables map. |
static java.lang.String |
VERSION
The compiler version. |
static java.lang.String |
WEB
Web installer. |
static java.lang.String |
WEB_KUNSTSTOFF
Web-Kunsstoff installer. |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
Compiler(java.lang.String filename,
java.lang.String basedir,
java.lang.String kind,
java.lang.String output)
The constructor. |
Method Summary | |
protected void |
addFile(java.io.File file,
java.lang.String relPath,
java.util.List osList,
int override,
java.util.ArrayList list)
Recursive method to add files in a pack. |
protected void |
addFileSet(java.lang.String path,
java.lang.String[] includes,
java.lang.String[] excludes,
java.lang.String relPath,
java.util.List osList,
java.util.ArrayList list,
java.lang.String casesensitive,
int override)
Adds a Ant fileset. |
protected void |
addSingleFile(java.io.File file,
java.lang.String targetFile,
java.util.List osList,
int override,
java.util.ArrayList list)
Method to add a single file in a pack. |
void |
compile()
Compiles. |
void |
executeCompiler()
Compiles the installation. |
protected GUIPrefs |
getGUIPrefs(XMLElement data)
Returns the GUIPrefs. |
protected Info |
getInfo(XMLElement data)
Builds the Info class from the XML tree. |
protected java.util.ArrayList |
getJars(XMLElement data)
Returns a list of the jar files to add. |
protected java.util.ArrayList |
getLangpacksCodes(XMLElement data)
Returns a list of the ISO3 codes of the langpacks to include. |
protected java.util.ArrayList |
getNativeLibraries(XMLElement data)
Returns a list of the native libraries to add. |
protected int |
getOverrideValue(XMLElement f)
|
protected Packager |
getPackager()
Returns the suitable Packager, depending of the kind variable. |
protected java.util.ArrayList |
getPacks(XMLElement data)
Returns a list of the packs to add. |
protected java.util.ArrayList |
getPanels(XMLElement data)
Returns a list of the panels names to add. |
protected java.util.ArrayList |
getResources(XMLElement data)
Returns a list of the resources to include. |
protected java.util.Properties |
getVariables(XMLElement data)
Variable declaration is a fragmention in install.xml like : |
protected XMLElement |
getXMLTree()
Returns the XMLElement representing the installation XML file. |
static void |
main(java.lang.String[] args)
The main method if the compiler is invoked by a command-line call. |
void |
run()
The run() method. |
void |
setPackagerListener(PackagerListener listener)
Sets the packager listener. |
boolean |
wasSuccessful()
|
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String VERSION
public static final java.lang.String IZPACK_VERSION
public static final java.lang.String STANDARD
public static final java.lang.String STANDARD_KUNSTSTOFF
public static final java.lang.String WEB
public static final java.lang.String WEB_KUNSTSTOFF
public static java.lang.String IZPACK_HOME
protected java.lang.String filename
protected java.lang.String basedir
protected java.lang.String kind
protected java.lang.String output
protected PackagerListener packagerListener
protected VariableValueMapImpl varMap
protected java.io.File keepDirFile
private boolean compileFailed
Constructor Detail |
public Compiler(java.lang.String filename, java.lang.String basedir, java.lang.String kind, java.lang.String output)
filename
- The XML filename.basedir
- The base directory.kind
- The installer kind.output
- The installer filename.Method Detail |
public void setPackagerListener(PackagerListener listener)
listener
- The listener.public void compile()
public void run()
public void executeCompiler() throws java.lang.Exception
java.lang.Exception
- Description of the Exceptionpublic boolean wasSuccessful()
protected GUIPrefs getGUIPrefs(XMLElement data) throws java.lang.Exception
data
- The XML data.
java.lang.Exception
- Description of the Exceptionprotected java.util.ArrayList getJars(XMLElement data) throws java.lang.Exception
data
- The XML data.
java.lang.Exception
- Description of the Exceptionprotected java.util.ArrayList getNativeLibraries(XMLElement data) throws java.lang.Exception
data
- The XML data.
java.lang.Exception
- Description of the Exceptionprotected java.util.ArrayList getPacks(XMLElement data) throws java.lang.Exception
data
- The XML data.
java.lang.Exception
- Description of the Exceptionprotected void addFileSet(java.lang.String path, java.lang.String[] includes, java.lang.String[] excludes, java.lang.String relPath, java.util.List osList, java.util.ArrayList list, java.lang.String casesensitive, int override) throws java.lang.Exception
path
- The path.includes
- The includes rules.excludes
- The excludes rules.relPath
- The relative path.list
- The files list.casesensitive
- Case-sensitive stuff.override
- Behaviour if a file already exists during install
java.lang.Exception
- Description of the Exceptionprotected void addFile(java.io.File file, java.lang.String relPath, java.util.List osList, int override, java.util.ArrayList list) throws java.lang.Exception
file
- The file to add.relPath
- The relative path.osList
- The target OS constraints.override
- Overriding behaviour.list
- The files list.
java.lang.Exception
- Description of the Exceptionprotected void addSingleFile(java.io.File file, java.lang.String targetFile, java.util.List osList, int override, java.util.ArrayList list) throws java.lang.Exception
file
- The file to add.targetFile
- The target to add the file as.osList
- The target OS constraints.override
- Overriding behaviour.list
- The files list.
java.lang.Exception
- Description of the Exceptionprotected java.util.ArrayList getPanels(XMLElement data) throws java.lang.Exception
data
- The XML data.
java.lang.Exception
- Description of the Exceptionprotected java.util.ArrayList getResources(XMLElement data) throws java.lang.Exception
data
- The XML data.
java.lang.Exception
- Description of the Exceptionprotected java.util.ArrayList getLangpacksCodes(XMLElement data) throws java.lang.Exception
data
- The XML data.
java.lang.Exception
- Description of the Exceptionprotected Info getInfo(XMLElement data) throws java.lang.Exception
data
- The XML data.
java.lang.Exception
- Description of the Exceptionprotected Packager getPackager() throws java.lang.Exception
java.lang.Exception
- Description of the Exceptionprotected java.util.Properties getVariables(XMLElement data) throws java.lang.Exception
data
- The XML data.
java.lang.Exception
- Description of the Exceptionprotected XMLElement getXMLTree() throws java.lang.Exception
java.lang.Exception
- Description of the Exceptionprotected int getOverrideValue(XMLElement f)
public static void main(java.lang.String[] args)
args
- The arguments passed on the command-line.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |