|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.Task | +--org.apache.tools.ant.taskdefs.MatchingTask | +--org.apache.tools.ant.taskdefs.optional.dotnet.Ilasm
Task to assemble .net 'Intermediate Language' files. The task will only work on win2K until other platforms support csc.exe or an equivalent. ilasm.exe must be on the execute path too.
All parameters are optional: <il/> should suffice to produce a debug build of all *.il files. The option set is roughly compatible with the CSharp class; even though the command line options are only vaguely equivalent. [The low level commands take things like /OUT=file, csc wants /out:file ... /verbose is used some places; /quiet here in ildasm... etc.] It would be nice if someone made all the command line tools consistent (and not as brittle as the java cmdline tools)
The task is a directory based task, so attributes like includes="*.il" and excludes="broken.il" can be used to control the files pulled in. Each file is built on its own, producing an appropriately named output file unless manually specified with outfile
Field Summary | |
protected boolean |
_debug
debug flag. |
protected java.lang.String |
_extraOptions
any extra command options? |
protected boolean |
_failOnError
flag to control action on execution trouble |
protected boolean |
_listing
listing flag |
protected java.lang.String |
_outputFile
output file. |
protected java.lang.String |
_owner
owner string is a slightly trivial barrier to disassembly |
protected java.io.File |
_resourceFile
resource file (.res format) to include in the app. |
protected java.lang.String |
_targetType
type of target. |
protected boolean |
_verbose
verbose flag |
protected static java.lang.String |
exe_name
name of the executable. |
protected static java.lang.String |
exe_title
title of task for external presentation |
protected static java.lang.String |
file_ext
what is the file extension we search on? |
protected static java.lang.String |
file_pattern
and now derive the search pattern from the extension |
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
fileset, useDefaultExcludes |
Fields inherited from class org.apache.tools.ant.Task |
description, location, project, target, taskName, taskType, wrapper |
Constructor Summary | |
Ilasm()
constructor inits everything and set up the search pattern |
Method Summary | |
void |
Clear()
reset all contents. |
void |
execute()
This is the execution entry point. |
void |
executeOneFile(java.lang.String targetFile)
do the work for one file by building the command line then calling it |
boolean |
getDebug()
query the debug flag |
protected java.lang.String |
getDebugParameter()
get the argument or null for no argument needed |
java.lang.String |
getExtraOptions()
Gets the ExtraOptions attribute |
protected java.lang.String |
getExtraOptionsParameter()
get any extra options or null for no argument needed |
boolean |
getFailFailOnError()
query fail on error flag |
protected java.lang.String |
getListingParameter()
turn the listing flag into a parameter for ILASM |
protected java.lang.String |
getOutputFileParameter()
get the output file |
protected java.lang.String |
getOwnerParameter()
Gets the Owner switch for ilasm |
protected java.lang.String |
getResourceFileParameter()
|
java.lang.String |
getTargetType()
accessor method for target type |
protected java.lang.String |
getTargetTypeParameter()
g get the target type or null for no argument needed |
protected java.lang.String |
getVerboseParameter()
turn the verbose flag into a parameter for ILASM |
protected boolean |
notEmpty(java.lang.String s)
test for a string containing something useful |
void |
setDebug(boolean f)
set the debug flag on or off |
void |
setExtraOptions(java.lang.String extraOptions)
Sets the ExtraOptions attribute |
void |
setFailOnError(boolean b)
set fail on error flag |
void |
setListing(boolean b)
enable/disable listing |
void |
setOutputFile(java.lang.String params)
Set the definitions |
void |
setOwner(java.lang.String s)
Sets the Owner attribute |
void |
setResourceFile(java.lang.String fileName)
Set the resource file |
void |
setSrcDir(java.lang.String srcDirName)
Set the source dir to find the files to be compiled |
void |
setTargetType(java.lang.String targetType)
define the target |
void |
setVerbose(boolean b)
enable/disable verbose ILASM output |
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
createExclude, createInclude, createPatternSet, getDirectoryScanner, setDefaultexcludes, setExcludes, setExcludesfile, setIncludes, setIncludesfile, XsetIgnore, XsetItems |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String exe_name
protected static final java.lang.String file_ext
protected static final java.lang.String file_pattern
protected static final java.lang.String exe_title
protected java.lang.String _targetType
protected java.lang.String _owner
protected boolean _verbose
protected boolean _listing
protected java.lang.String _outputFile
protected java.io.File _resourceFile
protected boolean _failOnError
protected boolean _debug
protected java.lang.String _extraOptions
Constructor Detail |
public Ilasm()
Method Detail |
public void Clear()
public void setSrcDir(java.lang.String srcDirName)
srcDirName
- The new SrcDir valuepublic void setTargetType(java.lang.String targetType) throws BuildException
targetType
- one of exe|library|BuildException
- if target is not one of exe|library|module|winexepublic java.lang.String getTargetType()
protected java.lang.String getTargetTypeParameter()
public void setOwner(java.lang.String s)
s
- The new Owner valueprotected java.lang.String getOwnerParameter()
protected boolean notEmpty(java.lang.String s)
string
- to testpublic void setVerbose(boolean b)
b
- flag set to true for verbose onprotected java.lang.String getVerboseParameter()
public void setListing(boolean b)
b
- flag set to true for listing onprotected java.lang.String getListingParameter()
public void setOutputFile(java.lang.String params)
list
- of definitions split by ; or , or even :protected java.lang.String getOutputFileParameter()
public void setResourceFile(java.lang.String fileName)
fileName
- path to the file. Can be relative, absolute, whatever.protected java.lang.String getResourceFileParameter()
public void setFailOnError(boolean b)
public boolean getFailFailOnError()
public void setDebug(boolean f)
f
- on/off flagpublic boolean getDebug()
protected java.lang.String getDebugParameter()
public void setExtraOptions(java.lang.String extraOptions)
extraOptions
- The new ExtraOptions valuepublic java.lang.String getExtraOptions()
protected java.lang.String getExtraOptionsParameter()
public void execute() throws BuildException
execute
in class Task
BuildException
- if the assembly failed and FailOnError is truepublic void executeOneFile(java.lang.String targetFile) throws BuildException
targetFile
- name of the the file to assembleBuildException
- if the assembly failed and FailOnError is true
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |