WiXBundleBuilder¶
- class starlark_tugger.WiXBundleBuilder¶
The
WiXBundleBuildertype allows building simple bundle installers with the WiX Toolset.WiXBundleBuilderinstances allow you to create.exeinstallers that are composed of a chain of actions. At execution time, each action in the chain is evaluated. See the WiX Toolset documentation for more.- __init__(id_prefix: str, name: str, version: str, manufacturer: str, arch: str = 'x64') WiXBundleBuilder¶
WiXBundleBuilder()is called to construct new instances. It accepts the following arguments:id_prefixThe string prefix to add to auto-generated IDs in the
.wxsXML.The value must be alphanumeric and
-cannot be used.The value should reflect the application whose installer is being defined.
nameThe name of the application being installed.
versionThe version of the application being installed.
This is a string like
X.Y.Z, where each component is an integer.manufacturerThe author of the application.
archThe WiX architecture of the installer being built.
- add_condition(condition: str, message: str)¶
Defines a
<bal:Condition>that must be satisfied to run this installer.See the WiX Toolkit documentation for more.
This method accepts the following arguments:
conditionThe condition expression that must be satisfied.
messageThe message that will be displayed if the condition is not met.
- add_vc_redistributable(platform: str)¶
This method registers the Visual C++ Redistributable to be installed.
This method accepts the following arguments:
platformThe architecture to install for. Valid values are
x86,x64, andarm64.
The bundle can contain Visual C++ Redistributables for multiple runtime architectures. The bundle installer will only install the Redistributable when running on a machine of that architecture. This allows a single bundle installer to target multiple architectures.
- add_wix_msi_builder(builder: WiXMSIBuilder, display_internal_ui: Optional[bool] = False, install_condition: Optional[str] = None)¶
This method adds a
WiXMSIBuilderto be installed by the produced installer.This method accepts the following arguments:
builderThe
WiXMSIBuilderrepresenting an MSI to install.display_internal_uiWhether to display the UI of the MSI.
install_conditionAn expression that must be true for this MSI to be installed.
This method effectively coerces the
WiXMSIBuilderinstance to an<MsiPackage>element and adds it to the<Chain>in the bundle XML. See the WiX Toolset documentation for more.
- build(target: str) ResolvedTarget¶
This method will build an exe using the WiX Toolset.
This method accepts the following arguments:
targetThe name of the target being built.
Upon successful generation of an installer, the produced installer will be assessed for code signing with the
windows-installer-creationaction.
- to_file_content() FileContent¶
Build an exe installer using the WiX Toolset and return a
FileContentrepresenting the built installer.Upon successful generation of an installer, the produced installer will be assessed for code signing with the
windows-installer-creationaction.
- write_to_directory(path: str) str¶
Build an exe installer using the WiX Toolset and write the built installer to the directory specified, returning the absolute path of the written file.
Absolute paths are treated as-is. Relative paths are relative to the current build path.
Upon successful generation of an installer, the produced installer will be assessed for code signing with the
windows-installer-creationaction.