Public Types | |
enum | RequestedActions |
Public Member Functions | |
virtual void | AdditionalInfoToXML (System.Xml.XmlWriter destination) |
override BuildParameters | Clone () |
CommandLineOptions (System.Reflection.Assembly projectSrc, string[] args) | |
CommandLineOptions (CommandLineOptions src) | |
ICollection < BuildProject > | GetRequestedProjects (ICollection< ErrorObject > errors) |
bool | IsDisabled (string projectOrAction) |
| |
bool | IsPreferred (string projectOrAction) |
void | ShowHelp (ErrorHandler messages) |
Properties | |
bool | CleanUp [get] |
bool | ClearAll [get] |
ICollection< string > | Disabled [get] |
string | Filename [get] |
bool | FoundErrors [get] |
IList< string > | OptionsOnVars [get] |
ICollection< string > | Preferred [get] |
RequestedActions | RequestedAction [get] |
The CTor of this class receives command line options that usually have been passes to BuildProject.Build
. The CTor will interpret these options. Options may be the name of tools/build actions or projects or features (represented by their symbol, cf. FeatureEntry), or you may use one or more of the options "/help", "/projects", "/targets", "/actions", "/configs", "/features", "/vars", "/cleanup", "/clearall", "/disable:ACTION", "/disable:PROJECT", "/disable:FEATURE", "/set:VARNAME=VALUE", "/append:VARNAME=VALUE" or "/config:CONFIGNAME".
The options "/help", "/projects", "/targets", "/actions", "/configs", "/features", and "/vars" provide info on the contained projects and actions.
Option | Description |
---|---|
/help | displays some text on the available options, |
/projects | lists the defined projects, |
/targets | lists the targets that may be produced, |
/actions | lists the available action providers, |
/configs | lists the available configurations, |
/clearall | clears all results of previous builds before starting the new build, |
/features | lists for each project the available feature and their default value before honouring the options referring to explicit enabling or disabling of features, |
/vars | lists the used environment variables. |
/set:VARNAME=VALUE | This will assign VALUE to environment variable VARNAME. |
/append:VARNAME=VALUE | This will append VALUE to the current value of environment variable VARNAME using a separator applicable to directory lists. Thsi is quite useful for filling lists of directories or paths with values. |
/log=logfilename | will create a log file logfile.xml . |
/processStart=VALUE | Configures class wx.ProcessUtils.ProcessStarter. Accepted values are PlatformID, StaticStart, and InstanceMethodStart. Refer to wx.ProcessUtils.ProcessStarter.Mode for a documentation of the modes. |
/disable:actionOrProject | will disable any tool or project similar to actionOrProject . |
/prefer:action | will prefer similarly named tools or tools of the family of the provided name. |
/prefer:project | will prefer the spefied project. If at least one project is preferred, the build product will only conduct preferred projects or their prerequisites. |
-actionOrProject | like /disable:actionOrProject . |
+actionOrProject | like /prefer:actionOrProject |
actionOrProject | like /prefer:actionOrProject or +actionOrProject |
Example: An application to build the wx.NET project (main function wx.Build.BuildProgram.Main
) called with options wx.NET /disable:wx-c gmcs /disable:csc.exe /append:PATH=C: /config:Release
.
The first option will enable project wx.NET
and disable all other projects that have not explicitely been enabled. So, the next option only demonstrates syntax but does not have additional effects. The options specifies that project wc-c
shall be disabled. However, this project already is diabled since in contrast to wx.NET
it is not explicitely enabled. Please note, that wx-c
will nevertheless be achieved, since wx-c
is a prerequisite of wx.NET
. So, the build process assumes that this project has to be conducted in order to build wx.NET
.
The next option enables action gmcs
, the Mono compiler. This action will be preferred according to user input. The next option disables action csc.exe
, the Microsoft C# compiler. The compilation will fail csc.exe
is the only applicable action to build an assembly. The last option will append "C:\MyExeDir" to the environment variable PATH
. Some tools may use environment variables to provide information on paths or modes. You can ask the build system for information on used environment variables specifying option "/vars"
. Option "/help"
will print out a short description of the options. "/cleanup"
will clean up the project removing all temporary or intermediate files that are NOT targets of enabled projects or prerequisites of enabled projects. Option "/cleanall"
will also remove all targets from the file system except installations.
Finally, "/config:Release" will switch the default configuration to configuration named "Release" (refer to BuildConfig.DefaultConfig).
The following command line will build wx.NET. Release projects will be compiled for version 0.9.0.1:
C:\sf\wx.NET\Bin>wx.Net.Build.exe /log=wxbuild.xml /config:Release "wxNetBase=." BUILD_VERSION=0.9.0.1
Represents the requested build action.
Build | Build the project. |
CreatBooCode | Create BOO code to build the project. |
wx.Build.CommandLineOptions.CommandLineOptions | ( | CommandLineOptions | src | ) |
Copy-CTor
src | The source that will be copied. |
wx.Build.CommandLineOptions.CommandLineOptions | ( | System.Reflection.Assembly | projectSrc, | |
string[] | args | |||
) |
This will interpret the arguments, set Enabled
and Disabled
and the environment variables.
args | is the string list of arguments / program options. | |
projectSrc | is the assembly that defines the projects. Projects defined in this assembly will be listed. This may be null . In that case, this will refer to dynamically loaded assembles (by XML serialization). |
virtual void wx.Build.BuildParameters.AdditionalInfoToXML | ( | System.Xml.XmlWriter | destination | ) | [virtual, inherited] |
This prints all public properties and fields on the provided destination. This may be overloaded by subclasses.
override BuildParameters wx.Build.CommandLineOptions.Clone | ( | ) | [virtual] |
This creates a clone of the argument.
Implements wx.Build.BuildParameters.
ICollection<BuildProject> wx.Build.CommandLineOptions.GetRequestedProjects | ( | ICollection< ErrorObject > | errors | ) |
Use this to return the list of the projects that shall be built according to user requests. This implements the semantic of preference and disabling of projects. If we have preferred projects, only these projects and their prerequisites (that may be missing in the result) shall be built. Otherwise, all non-disabled projects shall be made.
errors | This method will add encountered errors to this argument if it is not null . |
bool wx.Build.CommandLineOptions.IsDisabled | ( | string | projectOrAction | ) |
bool wx.Build.CommandLineOptions.IsPreferred | ( | string | projectOrAction | ) |
Use this to find out whether a tool or project is preferred or not.
projectOrAction | Name of a tool family, a tool, or a project. |
void wx.Build.CommandLineOptions.ShowHelp | ( | ErrorHandler | messages | ) |
Displays information on the available options on the provided destination.
messages | Thsi is where the info shall be displayed. |
bool wx.Build.CommandLineOptions.CleanUp [get] |
True iff the /cleanup
or the /clearall
option have been evaluated. If these options have been specified, they have been conducted on running the CTor of this instance.
bool wx.Build.CommandLineOptions.ClearAll [get] |
True iff the /clearall option have been evaluated. If these options have been specified, they have been conducted on running the CTor of this instance.
ICollection<string> wx.Build.CommandLineOptions.Disabled [get] |
Lists those projects and actions that have been disabled by user input.
string wx.Build.CommandLineOptions.Filename [get] |
This is the filename if the requested action produces a file.
bool wx.Build.CommandLineOptions.FoundErrors [get] |
True if this found errors on construction. Use this if you want to abort on errors in command arguments. Note, that CTor will add errors to messages
iff this is true.
IList<string> wx.Build.CommandLineOptions.OptionsOnVars [get] |
This is a list of those options affecting environment variables. This is only an information since all listed options have already been evaluated running the CTor.
ICollection<string> wx.Build.CommandLineOptions.Preferred [get] |
Lists those projects and actions that are preferred by user input. This is empty if all defined projects shall be built. If this is non-empty, the user requested some projects explicitely. Only these and their prerequisites shall be made.
RequestedActions wx.Build.CommandLineOptions.RequestedAction [get] |
The action that has been requested by the command lines. Teh default action is of course to build the project. However, users might also request a build program in BOO.