Struct wix::print::wxs::Builder

source ·
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>

source

pub fn new() -> Self

Creates a new Builder instance.

source

pub fn banner(&mut self, b: Option<&'a str>) -> &mut Self

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.

source

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.

source

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).

source

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).

source

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’

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

pub fn build(&self) -> Execution

Builds an execution context for printing a template.

Trait Implementations§

source§

impl<'a> Clone for Builder<'a>

source§

fn clone(&self) -> Builder<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for Builder<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Default for Builder<'a>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for Builder<'a>

§

impl<'a> Send for Builder<'a>

§

impl<'a> Sync for Builder<'a>

§

impl<'a> Unpin for Builder<'a>

§

impl<'a> UnwindSafe for Builder<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.