Struct cargo_packager::config::WixConfig

source ·
#[non_exhaustive]
pub struct WixConfig {
Show 14 fields pub languages: Option<Vec<WixLanguage>>, pub template: Option<PathBuf>, pub merge_modules: Option<Vec<PathBuf>>, pub fragment_paths: Option<Vec<PathBuf>>, pub fragments: Option<Vec<String>>, pub component_group_refs: Option<Vec<String>>, pub component_refs: Option<Vec<String>>, pub custom_action_refs: Option<Vec<String>>, pub feature_group_refs: Option<Vec<String>>, pub feature_refs: Option<Vec<String>>, pub merge_refs: Option<Vec<String>>, pub banner_path: Option<PathBuf>, pub dialog_image_path: Option<PathBuf>, pub fips_compliant: bool,
}
Expand description

The wix format configuration

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§languages: Option<Vec<WixLanguage>>§template: Option<PathBuf>

By default, the packager uses an internal template. This option allows you to define your own wix file.

§merge_modules: Option<Vec<PathBuf>>

List of merge modules to include in your installer. For example, if you want to include C++ Redis merge modules

§fragment_paths: Option<Vec<PathBuf>>

A list of paths to .wxs files with WiX fragments to use.

§fragments: Option<Vec<String>>

List of WiX fragments as strings. This is similar to config.wix.fragments_paths but is a string so you can define it inline in your config.

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
    <CustomAction Id="OpenNotepad" Directory="INSTALLDIR" Execute="immediate" ExeCommand="cmd.exe /c notepad.exe" Return="check" />
    <InstallExecuteSequence>
        <Custom Action="OpenNotepad" After="InstallInitialize" />
    </InstallExecuteSequence>
</Fragment>
</Wix>
§component_group_refs: Option<Vec<String>>

The ComponentGroup element ids you want to reference from the fragments.

§component_refs: Option<Vec<String>>

The Component element ids you want to reference from the fragments.

§custom_action_refs: Option<Vec<String>>

The CustomAction element ids you want to reference from the fragments.

§feature_group_refs: Option<Vec<String>>

The FeatureGroup element ids you want to reference from the fragments.

§feature_refs: Option<Vec<String>>

The Feature element ids you want to reference from the fragments.

§merge_refs: Option<Vec<String>>

The Merge element ids you want to reference from the fragments.

§banner_path: Option<PathBuf>

Path to a bitmap file to use as the installation user interface banner. This bitmap will appear at the top of all but the first page of the installer.

The required dimensions are 493px × 58px.

§dialog_image_path: Option<PathBuf>

Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.

§fips_compliant: bool

Enables FIPS compliant algorithms.

Implementations§

source§

impl WixConfig

source

pub fn new() -> Self

Creates a new WixConfig.

source

pub fn languages<I: IntoIterator<Item = WixLanguage>>( self, languages: I ) -> Self

source

pub fn template<P: Into<PathBuf>>(self, template: P) -> Self

By default, the packager uses an internal template. This option allows you to define your own wix file.

source

pub fn merge_modules<I, P>(self, merge_modules: I) -> Self
where I: IntoIterator<Item = P>, P: Into<PathBuf>,

Set a list of merge modules to include in your installer. For example, if you want to include C++ Redis merge modules

source

pub fn fragment_paths<I, S>(self, fragment_paths: I) -> Self
where I: IntoIterator<Item = S>, S: Into<PathBuf>,

Set a list of paths to .wxs files with WiX fragments to use.

source

pub fn fragments<I, S>(self, fragments: I) -> Self
where I: IntoIterator<Item = S>, S: Into<String>,

Set a list of WiX fragments as strings. This is similar to WixConfig::fragment_paths but is a string so you can define it inline in your config.

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
    <CustomAction Id="OpenNotepad" Directory="INSTALLDIR" Execute="immediate" ExeCommand="cmd.exe /c notepad.exe" Return="check" />
    <InstallExecuteSequence>
        <Custom Action="OpenNotepad" After="InstallInitialize" />
    </InstallExecuteSequence>
</Fragment>
</Wix>
source

pub fn component_group_refs<I, S>(self, component_group_refs: I) -> Self
where I: IntoIterator<Item = S>, S: Into<String>,

Set the ComponentGroup element ids you want to reference from the fragments.

source

pub fn component_refs<I, S>(self, component_refs: I) -> Self
where I: IntoIterator<Item = S>, S: Into<String>,

Set the Component element ids you want to reference from the fragments.

source

pub fn custom_action_refs<I, S>(self, custom_action_refs: I) -> Self
where I: IntoIterator<Item = S>, S: Into<String>,

Set the CustomAction element ids you want to reference from the fragments.

source

pub fn feature_group_refs<I, S>(self, feature_group_refs: I) -> Self
where I: IntoIterator<Item = S>, S: Into<String>,

Set he FeatureGroup element ids you want to reference from the fragments.

source

pub fn feature_refs<I, S>(self, feature_refs: I) -> Self
where I: IntoIterator<Item = S>, S: Into<String>,

Set the Feature element ids you want to reference from the fragments.

source

pub fn merge_refs<I, S>(self, merge_refs: I) -> Self
where I: IntoIterator<Item = S>, S: Into<String>,

Set he Merge element ids you want to reference from the fragments.

source

pub fn banner_path<P: Into<PathBuf>>(self, path: P) -> Self

Set the path to a bitmap file to use as the installation user interface banner. This bitmap will appear at the top of all but the first page of the installer.

The required dimensions are 493px × 58px.

source

pub fn dialog_image_path<P: Into<PathBuf>>(self, path: P) -> Self

Set the path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.

source

pub fn fips_compliant(self, fips_compliant: bool) -> Self

Set whether to enable or disable FIPS compliant algorithms.

Trait Implementations§

source§

impl Clone for WixConfig

source§

fn clone(&self) -> WixConfig

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 Debug for WixConfig

source§

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

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

impl Default for WixConfig

source§

fn default() -> WixConfig

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

impl<'de> Deserialize<'de> for WixConfig

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for WixConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

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

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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where 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 T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,