pub struct Builder<'a> { /* private fields */ }
Expand description
A builder for creating an execution context to print a WiX Toolset source file (wxs).
Implementations§
source§impl<'a> Builder<'a>
impl<'a> Builder<'a>
Sets the path to a bitmap (BMP) file to be used as a banner image across the top of each dialog in the installer.
The banner image must be 493 x 58 pixels. See the Wix Toolset documentation for details about customization.
sourcepub fn binaries(&mut self, b: Option<Vec<&'a str>>) -> &mut Self
pub fn binaries(&mut self, b: Option<Vec<&'a str>>) -> &mut Self
Sets the path to one or more binaries to include in the installer.
The default is to first find all binaries defined in the bin
sections of the package’s manifest (Cargo.toml) and include all of them
in the installer. If there are no bin
sections, then the name
field
uder the package
section is used. This overrides either of these
cases, regardless of the existence and number of bin
sections.
A path to each binary should be used for the value. The file stem (file
name without the extension) will be used for each binary’s name, while
the path will be used for the source. The binary names will not appear
in the Add/Remove Programs control panel. Use the product_name
method
to change the name that appears in the Add/Remove Programs control
panel.
sourcepub fn copyright_holder(&mut self, h: Option<&'a str>) -> &mut Self
pub fn copyright_holder(&mut self, h: Option<&'a str>) -> &mut Self
Sets the copyright holder for the generated license file and EULA.
The default is to use the authors
field of the
package’s manifest (Cargo.toml). This method can be used to override the
default and set a different copyright holder if and when a Rich Text
Format (RTF) license and EULA are generated based on the value of the
license
field in the package’s manifest (Cargo.toml).
This value is ignored and not used if an EULA is set with the eula
method, if a custom EULA is set using the license-file
field in the
package’s manifest (Cargo.toml), or an EULA is not generated from the
license
field in the package’s manifest (Cargo.toml).
sourcepub fn copyright_year(&mut self, y: Option<&'a str>) -> &mut Self
pub fn copyright_year(&mut self, y: Option<&'a str>) -> &mut Self
Sets the copyright year for the generated license file and EULA.
The default is to use the current year. This method can be used to
override the default and set a specific year if and when a Rich Text
Format (RTF) license and EULA are generated based on the value of the
license
field in the package’s manifest (Cargo.toml).
This value is ignored and not used if an EULA is set with the eula
method, if a custom EULA is set using the license-file
field in the
package’s manifest (Cargo.toml), or an EULA is not generated from the
license
field in the package’s manifest (Cargo.toml).
sourcepub fn description(&mut self, d: Option<&'a str>) -> &mut Self
pub fn description(&mut self, d: Option<&'a str>) -> &mut Self
Sets the description.
This overrides the description determined from the description
field
in the package’
sourcepub fn dialog(&mut self, d: Option<&'a str>) -> &mut Self
pub fn dialog(&mut self, d: Option<&'a str>) -> &mut Self
Sets the path to a bitmap (.bmp
) file that will be displayed on the
first dialog to the left.
The image must be 493 x 312 pixels. See the Wix Toolset documentation for details about customization.
sourcepub fn eula(&mut self, e: Option<&'a str>) -> &mut Self
pub fn eula(&mut self, e: Option<&'a str>) -> &mut Self
Sets the path to a custom EULA.
The default is to generate an EULA from an embedded template as a RTF
file based on the name of the license specified in the license
field
of the package’s manifest (Cargo.toml). If the license
field is not
specified or a template for the license does not exist but the
license-file
field does specify a path to a file with the RTF
extension, then that RTF file is used as the EULA for the license
agreement dialog in the installer. Finally, if the license-file
does
not exist or it specifies a file that does not have the .rtf
extension, then the license agreement dialog is skipped and there is no
EULA for the installer. This would override the default behavior and
ensure the license agreement dialog is used.
sourcepub fn help_url(&mut self, h: Option<&'a str>) -> &mut Self
pub fn help_url(&mut self, h: Option<&'a str>) -> &mut Self
Sets the help URL.
The default is to obtain a URL from one of the following fields in the
package’s manifest (Cargo.toml): documentation
, homepage
, or
repository
. If none of these are specified, then the default is to
exclude a help URL from the installer. This will override the default
behavior and provide a help URL for the installer if none of the fields
exist.
sourcepub fn input(&mut self, i: Option<&'a str>) -> &mut Self
pub fn input(&mut self, i: Option<&'a str>) -> &mut Self
Sets the path to a package’s manifest (Cargo.toml) to be used to generate a WiX Source (wxs) file from the embedded template.
A wix
and wix\main.wxs
file will be created in the same directory as
the package’s manifest. The default is to use the package’s manifest in
the current working directory.
sourcepub fn license(&mut self, l: Option<&'a str>) -> &mut Self
pub fn license(&mut self, l: Option<&'a str>) -> &mut Self
Sets the path to a file to be used as the license sidecar file.
The default is to use the value specified in the license-file
field of
the package’s manifest (Cargo.toml) or generate a Rich Text Format (RTF)
license file from an embedded template based on the license ID used in
the license
field of the package’s manifest. If none of these fields
are specified or overridden, then a license sidecar file is not
included in the installation directory.
This will override the default behavior and skip using either the
license
or license-file
fields in the package’s manifest.
sourcepub fn manufacturer(&mut self, m: Option<&'a str>) -> &mut Self
pub fn manufacturer(&mut self, m: Option<&'a str>) -> &mut Self
Sets the manufacturer.
Default is to use the authors
field of the
package’s manifest (Cargo.toml). This would override the default value.
sourcepub fn output(&mut self, o: Option<&'a str>) -> &mut Self
pub fn output(&mut self, o: Option<&'a str>) -> &mut Self
Sets the destination for creating all of the output from initialization.
The default is to create all initialization output in the current working directory.
sourcepub fn package(&mut self, p: Option<&'a str>) -> &mut Self
pub fn package(&mut self, p: Option<&'a str>) -> &mut Self
Sets the package within a workspace to print a template.
Each package within a workspace has its own package manifest, i.e.
Cargo.toml
. This indicates which package manifest within a workspace
should be used to populate a template.
sourcepub fn path_guid(&mut self, p: Option<&'a str>) -> &mut Self
pub fn path_guid(&mut self, p: Option<&'a str>) -> &mut Self
Sets the GUID for the path component.
The default automatically generates the GUID needed for the path component. A GUID is needed so that the path component can be successfully removed on uninstall.
Generally, the path component GUID should be generated only once per project/product and then the same GUID used every time the installer is created. The GUID is stored in the WiX Source (WXS) file. However, this allows using an existing GUID, possibly obtained with another tool.
sourcepub fn product_icon(&mut self, p: Option<&'a str>) -> &mut Self
pub fn product_icon(&mut self, p: Option<&'a str>) -> &mut Self
Sets the path to an image file to be used for product icon.
The product icon is the icon that appears for an installed application in the Add/Remove Programs (ARP) control panel. If a product icon is not defined for an application within the installer, then the Windows OS assigns a generic one.
sourcepub fn product_name(&mut self, p: Option<&'a str>) -> &mut Self
pub fn product_name(&mut self, p: Option<&'a str>) -> &mut Self
Sets the product name.
The default is to use the name
field under the package
section of
the package’s manifest (Cargo.toml). This overrides that value. An error
occurs if the name
field is not found in the manifest.
This is different from the binary name in that it is the name that
appears in the Add/Remove Programs (ARP) control panel, not the name
of the executable. The binary_name
method can be used to change the
executable name. This value can have spaces and special characters,
where the binary name should avoid spaces and special characters.
sourcepub fn upgrade_guid(&mut self, u: Option<&'a str>) -> &mut Self
pub fn upgrade_guid(&mut self, u: Option<&'a str>) -> &mut Self
Sets the Upgrade Code GUID.
The default automatically generates the GUID needed for the UpgradeCode
attribute to the Product
tag. The Upgrade Code uniquely identifies the
installer. It is used to determine if the new installer is the same
product and the current installation should be removed and upgraded to
this version. If the GUIDs of the current product and new product do
not match, then Windows will treat the two installers as separate
products.
Generally, the upgrade code should be generated only once per project/product and then the same code used every time the installer is created. The GUID is stored in the WiX Source (WXS) file. However, this allows usage of an existing GUID for the upgrade code.