Struct tugger_wix::WiXInstallerBuilder
source · [−]pub struct WiXInstallerBuilder { /* private fields */ }
Expand description
Entity used to build installers using the WiX Toolkit.
Implementations
sourceimpl WiXInstallerBuilder
impl WiXInstallerBuilder
sourcepub fn new<P: AsRef<Path>>(
id_prefix: String,
arch: String,
build_path: P
) -> Self
pub fn new<P: AsRef<Path>>(
id_prefix: String,
arch: String,
build_path: P
) -> Self
Create a new instance.
sourcepub fn set_arch(&mut self, value: impl ToString)
pub fn set_arch(&mut self, value: impl ToString)
Set the WiX architecture of the installer we’re building.
sourcepub fn variables(&self) -> Iter<'_, String, Option<String>>
pub fn variables(&self) -> Iter<'_, String, Option<String>>
Obtain variables that will be used for light
invocations.
sourcepub fn set_variable<S: ToString>(&mut self, key: S, value: Option<S>)
pub fn set_variable<S: ToString>(&mut self, key: S, value: Option<S>)
Set a WiX variable with an optional value.
These are passed to light.exe
.
sourcepub fn set_build_path(&mut self, path: impl AsRef<Path>)
pub fn set_build_path(&mut self, path: impl AsRef<Path>)
Set the directory to use to build the installer in.
sourcepub fn build_path(&self) -> &Path
pub fn build_path(&self) -> &Path
Obtain the directory to use for building the installer.
pub fn wxs_files(&self) -> &BTreeMap<PathBuf, WxsBuilder>
sourcepub fn add_wxs(&mut self, wxs: WxsBuilder)
pub fn add_wxs(&mut self, wxs: WxsBuilder)
Add a wxs file to build.
sourcepub fn add_extra_build_file<P: AsRef<Path>>(
&mut self,
path: P,
content: impl Into<FileEntry>
) -> Result<()>
pub fn add_extra_build_file<P: AsRef<Path>>(
&mut self,
path: P,
content: impl Into<FileEntry>
) -> Result<()>
Add an extra file to the build environment.
These files will be materialized next to .wxs files.
sourcepub fn add_extra_build_files(&mut self, manifest: &FileManifest) -> Result<()>
pub fn add_extra_build_files(&mut self, manifest: &FileManifest) -> Result<()>
Add additional files to be materialized in the build environment.
Files are specified via a FileManifest
and will be materialized next
to .wxs
files.
pub fn install_files(&self) -> &FileManifest
pub fn install_files_mut(&mut self) -> &mut FileManifest
sourcepub fn install_files_wxs_path(&self) -> &Path
pub fn install_files_wxs_path(&self) -> &Path
The path that the auto-generated wxs file for Self::install_files will be materialized in.
Default is install-files.wxs
.
sourcepub fn set_install_files_wxs_path(&mut self, path: impl AsRef<Path>)
pub fn set_install_files_wxs_path(&mut self, path: impl AsRef<Path>)
Set the path that the auto-generated wxs file for Self::install_files will be materialized in.
sourcepub fn install_files_root_directory_id(&self) -> &str
pub fn install_files_root_directory_id(&self) -> &str
The <Directory Id=
value that the autogenerated <DirectoryRef>
for Self::install_files
will refer to.
This essentially defines how to map our autogenerated wxs file containing fragments for Self::install_files to an install location.
The default value is APPLICATIONFOLDER
. You may need to change this value
if your <Directory>
corresponding to the root installation directory has
a different Id
value.
sourcepub fn set_install_files_root_directory_id(&mut self, value: impl ToString)
pub fn set_install_files_root_directory_id(&mut self, value: impl ToString)
Set the <Directory Id=
that the root of Self::install_files will point to.
See Self::install_files_root_directory_id for more on this functionality.
sourcepub fn auto_sign_signtool(&mut self, settings: SigntoolSign)
pub fn auto_sign_signtool(&mut self, settings: SigntoolSign)
Register signtool signing settings to be used to automatically sign binaries.
This will automatically sign all installed binaries as well as the generated installer.
sourcepub fn add_files_manifest_wxs(&mut self) -> Result<()>
pub fn add_files_manifest_wxs(&mut self) -> Result<()>
Generate a wxs file containing fragments for all files registered for install.
This will take the current Self::install_files manifest and produce a WiX XML
file containing <Fragment>
and <DirectoryRef>
for the contents of that manifest.
The WXS file will be registered for building.
Auto Trait Implementations
impl RefUnwindSafe for WiXInstallerBuilder
impl Send for WiXInstallerBuilder
impl Sync for WiXInstallerBuilder
impl Unpin for WiXInstallerBuilder
impl UnwindSafe for WiXInstallerBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more