NDEVR
API Documentation
WixInstallerManager

Manages the creation of WiX-based Windows installer projects from NDEVR module definitions. More...

Collaboration diagram for WixInstallerManager:
[legend]

Public Member Functions

void createInstallerProject ()
 Creates the complete installer project from the module list.

Public Attributes

File in_dir
 The input directory containing module resources.
bool is_64_bit = true
 Whether to build a 64-bit installer.
LogPtr log
 Log pipe for progress and error reporting.
File module_list
 The file listing modules to include in the installer.
File msi_folder
 The folder for MSI output files.
File out_dir
 The output directory for the installer project.

Protected Member Functions

void addDirectory (const WixDirectory &directory, WixInstallerFile &wix) const
 Writes directory structure entries to the WiX file.
void addDirectoryFiles (const String &directory, const Buffer< File > &files, WixInstallerFile &wix) const
 Adds directory file entries to the WiX file.
void addFile (const File &file, WixInstallerFile &wix) const
 Adds a file entry to the WiX file.
void addFragment (WixFragment &fragment, WixInstallerFile &wix)
 Writes a complete fragment to the WiX file.
void buildBatchFiles ()
 Builds the batch files for compiling the installer.
void calculateFeature (WixInstallerFeature &feature, WixFragment &fragment, Set< String > &global_features) const
 Calculates the full set of files and components for a feature.
void createLanguage (const String &language, WixInstallerFile &wix)
 Creates the language-specific WiX source files.
void createModuleWXS ()
 Creates the main module WXS source files.
String fileID (const File &file) const
 Generates a unique WiX file ID from a file path.
String fileIDName (const File &file) const
 Generates a WiX-safe file ID name from a file path.
Buffer< StringfileIDs (const Buffer< File > &files) const
 Generates file IDs for a buffer of files.
WixInstallerFeature prepareModule (const Module &module, WixDirectory &directory)
 Prepares a module's files and features for the installer.
void writeHeaderFile ()
 Writes the WiX header include file.
void writePlatformSetup ()
 Writes platform-specific setup configuration.
void writeProjectFile (const String &language, WixInstallerFile &file)
 Writes the WiX project file for a specific language.

Static Protected Member Functions

static void AddFeature (const WixInstallerFeature &feature, WixInstallerFile &wix)
 Writes a complete feature element including all its components.
static void AddFeatureHeading (const WixInstallerFeature &feature, WixInstallerFile &wix)
 Writes the opening XML for a feature in the WiX file.
static void AddFirewallException (const FireWallException &exception, WixInstallerFile &file)
 Adds a firewall exception entry to the WiX file.
static void AddRegistryAction (const RegistryKeyAction &exception, WixInstallerFile &file)
 Adds a registry action entry to the WiX file.
static void AddString (const TranslatedString &string, WixInstallerFile &wix, const String &language)
 Adds a translated string entry to the WiX file.
static uint04 CodePage (String translation_id)
 Gets the code page number for a given translation ID.
static String CreateWixGUID (const String &input)
 Creates a deterministic GUID from a string input.
static void EndFeature (WixInstallerFile &wix)
 Closes a feature element in the WiX file.
static String FolderID (const StringView &resource)
 Generates a WiX folder ID from a resource path.
static String OutputName (const String &language)
 Gets the output MSI file name for a language.
static String WixTranslationID (String translation_id)
 Converts a translation ID to a WiX-compatible translation identifier.
static void WriteImage (const StringView &image, File folder_location)
 Writes an image resource to a folder.

Protected Attributes

Set< TranslatedStringstrings
 Collected translatable strings for the installer.

Detailed Description

Manages the creation of WiX-based Windows installer projects from NDEVR module definitions.


Definition at line 104 of file InstallerManager.h.

Member Function Documentation

◆ addDirectory()

void WixInstallerManager::addDirectory ( const WixDirectory & directory,
WixInstallerFile & wix ) const
protected

Writes directory structure entries to the WiX file.

Parameters
[in]directoryThe directory tree to write.
[in]wixThe WiX file being written.

◆ addDirectoryFiles()

void WixInstallerManager::addDirectoryFiles ( const String & directory,
const Buffer< File > & files,
WixInstallerFile & wix ) const
protected

Adds directory file entries to the WiX file.

Parameters
[in]directoryThe directory identifier.
[in]filesThe files in the directory.
[in]wixThe WiX file being written.

◆ AddFeature()

void WixInstallerManager::AddFeature ( const WixInstallerFeature & feature,
WixInstallerFile & wix )
staticprotected

Writes a complete feature element including all its components.

Parameters
[in]featureThe feature to write.
[in]wixThe WiX file being written.

◆ AddFeatureHeading()

void WixInstallerManager::AddFeatureHeading ( const WixInstallerFeature & feature,
WixInstallerFile & wix )
staticprotected

Writes the opening XML for a feature in the WiX file.

Parameters
[in]featureThe feature to write.
[in]wixThe WiX file being written.

◆ addFile()

void WixInstallerManager::addFile ( const File & file,
WixInstallerFile & wix ) const
protected

Adds a file entry to the WiX file.

Parameters
[in]fileThe file to add.
[in]wixThe WiX file being written.

◆ AddFirewallException()

void WixInstallerManager::AddFirewallException ( const FireWallException & exception,
WixInstallerFile & file )
staticprotected

Adds a firewall exception entry to the WiX file.

Parameters
[in]exceptionThe firewall exception to add.
[in]fileThe WiX file being written.

◆ addFragment()

void WixInstallerManager::addFragment ( WixFragment & fragment,
WixInstallerFile & wix )
protected

Writes a complete fragment to the WiX file.

Parameters
[in]fragmentThe fragment to write.
[in]wixThe WiX file being written.

◆ AddRegistryAction()

void WixInstallerManager::AddRegistryAction ( const RegistryKeyAction & exception,
WixInstallerFile & file )
staticprotected

Adds a registry action entry to the WiX file.

Parameters
[in]exceptionThe registry action to add.
[in]fileThe WiX file being written.

◆ AddString()

void WixInstallerManager::AddString ( const TranslatedString & string,
WixInstallerFile & wix,
const String & language )
staticprotected

Adds a translated string entry to the WiX file.

Parameters
[in]stringThe translated string to add.
[in]wixThe WiX file being written.
[in]languageThe target language identifier.

◆ calculateFeature()

void WixInstallerManager::calculateFeature ( WixInstallerFeature & feature,
WixFragment & fragment,
Set< String > & global_features ) const
protected

Calculates the full set of files and components for a feature.

Parameters
[in]featureThe feature to calculate.
[in]fragmentThe fragment containing all file data.
[in]global_featuresSet of globally shared feature IDs.

◆ CodePage()

uint04 WixInstallerManager::CodePage ( String translation_id)
staticprotected

Gets the code page number for a given translation ID.

Parameters
[in]translation_idThe translation identifier.
Returns
The code page number.

◆ createLanguage()

void WixInstallerManager::createLanguage ( const String & language,
WixInstallerFile & wix )
protected

Creates the language-specific WiX source files.

Parameters
[in]languageThe language identifier.
[in]wixThe WiX file being written.

◆ CreateWixGUID()

String WixInstallerManager::CreateWixGUID ( const String & input)
staticprotected

Creates a deterministic GUID from a string input.

Parameters
[in]inputThe input string to generate the GUID from.
Returns
The generated GUID string.

◆ EndFeature()

void WixInstallerManager::EndFeature ( WixInstallerFile & wix)
staticprotected

Closes a feature element in the WiX file.

Parameters
[in]wixThe WiX file being written.

◆ fileID()

String WixInstallerManager::fileID ( const File & file) const
protected

Generates a unique WiX file ID from a file path.

Parameters
[in]fileThe file to generate an ID for.
Returns
The generated file ID string.

◆ fileIDName()

String WixInstallerManager::fileIDName ( const File & file) const
protected

Generates a WiX-safe file ID name from a file path.

Parameters
[in]fileThe file to generate an ID name for.
Returns
The generated ID name string.

◆ fileIDs()

Buffer< String > WixInstallerManager::fileIDs ( const Buffer< File > & files) const
protected

Generates file IDs for a buffer of files.

Parameters
[in]filesThe files to generate IDs for.
Returns
A buffer of file ID strings.

◆ FolderID()

String WixInstallerManager::FolderID ( const StringView & resource)
staticprotected

Generates a WiX folder ID from a resource path.

Parameters
[in]resourceThe resource path.
Returns
The folder ID string.

◆ OutputName()

String WixInstallerManager::OutputName ( const String & language)
staticprotected

Gets the output MSI file name for a language.

Parameters
[in]languageThe language identifier.
Returns
The output file name string.

◆ prepareModule()

WixInstallerFeature WixInstallerManager::prepareModule ( const Module & module,
WixDirectory & directory )
protected

Prepares a module's files and features for the installer.

Parameters
[in]moduleThe module to prepare.
[in]directoryThe directory tree to populate.
Returns
The installer feature for the module.

◆ WixTranslationID()

String WixInstallerManager::WixTranslationID ( String translation_id)
staticprotected

Converts a translation ID to a WiX-compatible translation identifier.

Parameters
[in]translation_idThe translation identifier to convert.
Returns
The WiX translation ID string.

◆ WriteImage()

void WixInstallerManager::WriteImage ( const StringView & image,
File folder_location )
staticprotected

Writes an image resource to a folder.

Parameters
[in]imageThe image resource identifier.
[in]folder_locationThe destination folder.

◆ writeProjectFile()

void WixInstallerManager::writeProjectFile ( const String & language,
WixInstallerFile & file )
protected

Writes the WiX project file for a specific language.

Parameters
[in]languageThe language identifier.
[in]fileThe WiX file being written.

The documentation for this class was generated from the following file: