de.berg.systeme.jenkins.wix
Class Toolset

java.lang.Object
  extended by de.berg.systeme.jenkins.wix.Toolset

public final class Toolset
extends Object

Toolset checks the existence for the WIX Toolset on the buildsystem. If not available an exception is thrown.

It is used to compile and link wsx-files in a batch mannor triggered by the WixToolsetBuilder.

Version:
1.1
Author:
Björn Berg, bjoern.berg@gmx.de

Constructor Summary
Toolset()
          Deprecated. use Toolset(ToolsetSettings, BuildListener)
Toolset(Properties props, hudson.model.BuildListener listener)
          Deprecated. use Toolset(ToolsetSettings, BuildListener)
Toolset(ToolsetSettings properties, hudson.model.BuildListener listener)
           
 
Method Summary
 void compile(hudson.FilePath file)
          Compiles the given source file.
protected  void debug(String message)
          Writes debugging messages to logging instance of BuildListener.
protected  void debug(String format, Object... args)
          Writes debugging messages to logging instance of BuildListener.
protected  void doCheck()
          Checks if the runtime environment fulfills the needed requirements.
 boolean hasFailed()
          Returns if the execution of compiler or linker has lead to a failure.
protected  void initialize(Properties props, hudson.model.BuildListener listener)
          Deprecated. use initialize(ToolsetSettings, BuildListener) Initializes the toolset with needed properties.
protected  void initialize(ToolsetSettings props, hudson.model.BuildListener listener)
          Initializes the toolset with needed properties.
 void link()
          Links the compiled object files together into an MSI file.
protected  void log(String message)
          Logs a simple message to logging instance of BuildListener.
protected  void log(String format, Object... args)
          Logs a formatted message to logging instance of BuildListener.
protected static String setDefaultParameters(String outfile, String infile)
           
protected static String toMsiFilename(String sourceFile)
           
protected static String toObjectFilename(String sourceFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Toolset

public Toolset()
        throws ToolsetException
Deprecated. use Toolset(ToolsetSettings, BuildListener)

Throws:
ToolsetException

Toolset

public Toolset(Properties props,
               hudson.model.BuildListener listener)
        throws ToolsetException
Deprecated. use Toolset(ToolsetSettings, BuildListener)

Parameters:
props -
listener -
Throws:
ToolsetException

Toolset

public Toolset(ToolsetSettings properties,
               hudson.model.BuildListener listener)
        throws ToolsetException
Throws:
ToolsetException
Method Detail

initialize

protected void initialize(Properties props,
                          hudson.model.BuildListener listener)
                   throws ToolsetException
Deprecated. use initialize(ToolsetSettings, BuildListener) Initializes the toolset with needed properties.

Parameters:
props - Properties for toolsets configuration.
listener - reference to BuildListener for logging.
Throws:
ToolsetException - is thrown if configuration of the toolset fails.

initialize

protected void initialize(ToolsetSettings props,
                          hudson.model.BuildListener listener)
                   throws ToolsetException
Initializes the toolset with needed properties.

Parameters:
props - Properties for toolsets configuration.
listener - reference to BuildListener for logging.
Throws:
ToolsetException - is thrown if configuration of the toolset fails.

doCheck

protected void doCheck()
                throws ToolsetException
Checks if the runtime environment fulfills the needed requirements.

Throws:
ToolsetException - is thrown if compiler and linker are not available or accessible.

log

protected void log(String message)
Logs a simple message to logging instance of BuildListener.

Parameters:
message - message to print.

log

protected void log(String format,
                   Object... args)
Logs a formatted message to logging instance of BuildListener.

Parameters:
format - the message containing formatting symbols.
args - arguments to replace formatting symbols.

debug

protected void debug(String message)
Writes debugging messages to logging instance of BuildListener. This is only done if debugging is globally enabled for the WIX toolset in the settings of Jenkins.

Parameters:
message - debug message.

debug

protected void debug(String format,
                     Object... args)
Writes debugging messages to logging instance of BuildListener. This is only done if debugging is globally enabled for the WIX toolset in the settings of Jenkins.

Parameters:
message - debug message with formatting symbols.
args - arguments to replace formatting symbols.

hasFailed

public boolean hasFailed()
Returns if the execution of compiler or linker has lead to a failure.

Returns:
true if an error has occured.

compile

public void compile(hudson.FilePath file)
             throws ToolsetException
Compiles the given source file.

Parameters:
file - source file to compile.
Throws:
ToolsetException - throws an exception if process fails.

toObjectFilename

protected static String toObjectFilename(String sourceFile)

toMsiFilename

protected static String toMsiFilename(String sourceFile)

setDefaultParameters

protected static String setDefaultParameters(String outfile,
                                             String infile)

link

public void link()
          throws ToolsetException
Links the compiled object files together into an MSI file.

Throws:
ToolsetException - throws an exception if process fails.


Copyright © 2004-2013 Berg Systeme. All Rights Reserved.