Class CSdvPackagerEnvironment#

Nested Relationships#

Nested Types#

Class Documentation#

class CSdvPackagerEnvironment#

Public Types

enum class EOperatingMode#

Operation mode the packager utility is running in.

Values:

enumerator none#

No mode selected.

enumerator pack#

Packing operation (default)

enumerator direct_install#

Direct installation.

enumerator install#

Installation.

enumerator uninstall#

Remove an installed package.

enumerator verify#

Verify integrity.

enumerator show#

Show content.

enum class EShowMask#

Show information mask (multiple can be combined).

Values:

enumerator all#

Show all information.

enumerator info#

Show package information.

enumerator modules#

Show modules.

enumerator components#

Show components.

enumerator console#

Show as console output (extended form)

enumerator console_simple#

Show as console output (simple form)

enumerator xml#

Provide as XML.

enumerator json#

Provide as JSON.

Public Functions

CSdvPackagerEnvironment()#

Default constructor.

CSdvPackagerEnvironment(const std::vector<std::string> &rvecArgs)#

Constructor with program arguments.

Parameters:

rvecArgs[in] Reference to the vector with program arguments

template<typename TCharType>
CSdvPackagerEnvironment(size_t nArgs, const TCharType **rgszArgs)#

Constructor with program arguments.

Template Parameters:

TCharType – Character type.

Parameters:
  • nArgs[in] The amount of arguments.

  • rgszArgs[in] Array of arguments.

bool Help() const#

Help was requested on the command line.

Returns:

Returns ‘true’ when help was requested. Otherwise returns ‘false’.

void ShowHelp() const#

Show command line help.

void ReportInfo() const#

Report information about the command and the settings dependable on the reporting flag.

bool Silent() const#

Return whether silent mode was requested for the console output.

Returns:

Returns whether the silent mode is switched on.

bool Verbose() const#

Return whether verbose mode was requested for the console output.

Returns:

Returns whether the verbose mode is switched on.

bool Version() const#

Version information was requested on the command line.

Returns:

Returns ‘true’ when version info was requested. Otherwise returns ‘false’.

bool CreateManifestOnly() const#

Create a manifest during the creation phase.

Returns:

Returns whether a manifest should be the only output of the creation.

EOperatingMode OperatingMode() const#

The operating mode the packager is running in.

Returns:

Returns the current operating mode based on the command line settings.

bool KeepStructure() const#

Keep the current structure during the installation. This requires a source input directory to be set.

Returns:

Returns whether a structure should be kept relative to the source directory.

const std::vector<SModule> &ModuleList() const#

List of modules or packages to create or install respectively.

Returns:

Returns a reference to the variable containing the list of modules or packages. Could contain wildcards and regular expression strings.

const std::filesystem::path &PackagePath() const#

Get the package path. Available for installation, uninstallation, verification and content showing commands.

Returns:

Returns a reference to the variable containing the package path.

const std::filesystem::path &SourceLocation() const#

During package creation, the source location of the modules and files to create the package for (or directly install). During package installation, source location of the package.

Returns:

Returns a reference to the variable containing the source location.

const std::filesystem::path &OutputLocation() const#

During package creation, the output location of the package file.

Returns:

Returns a reference to the variable containing the output location.

const std::filesystem::path &TargetLocation() const#

During package installation, base path to the package target location.

Returns:

Returns a reference to the variable containing the target location.

const std::filesystem::path &RootLocation() const#

During package installation, base path to the package root location (including instance).

Returns:

Returns a reference to the variable containing the root location.

const std::filesystem::path &InstallLocation() const#

During package installation, base path to the package installation location (including package name).

Returns:

Returns a reference to the variable containing the installation location.

bool Local() const#

Set when the local flag has been supplied on the command line.

Returns:

Returns whether local system operation is enabled.

uint32_t InstanceID() const#

The instance to use to install the package to.

Returns:

The instance ID.

bool Update() const#

Update if an older version has been found.

Returns:

Returns whether the update flag was specified.

bool Overwrite() const#

Overwrite any version that might be installed before.

Returns:

Returns whether the overwrite flags was specified.

const std::filesystem::path &LocalConfigFile(std::vector<std::string> &rvecComponents) const#

Return the configuration file to create or update during the installation.

Parameters:

rvecComponents[out] Reference to a list of component names to add to the configuration. If no components are listed, all components are to be added (if a configuration file was supplied).

Returns:

Returns a reference to the variable containing the path to the configuration file or empty when no file was supplied.

const std::vector<std::filesystem::path> &LocalConfigLocations() const#

During package installation, the configuration file locations during local operation.

Returns:

Returns a reference to the variable containing the vector with configuration locations.

bool ActivateLocalConfig() const#

Activate the local configuration in the settings file of the system.

Returns:

Returns whether a configuration is requested.

bool InsertIntoUserConfig(std::vector<std::string> &rvecComponents) const#

Add the components to the user configuration.

Remark

Only complex services will be inserted.

Parameters:

rvecComponents[out] Reference to a list of component names to add to the configuration. If no components are listed, all components are to be added (if a the function returns true).

Returns:

Returns true if a configuration update is requested; false otherwise.

bool InsertIntoPlatformConfig(std::vector<std::string> &rvecComponents) const#

Add the components to the platform configuration.

Parameters:

rvecComponents[out] Reference to a list of component names to add to the configuration. If no components are listed, all components are to be added (if a the function returns true).

Returns:

Returns true if a configuration update is requested; false otherwise.

bool InsertIntoVehicleInterfaceConfig(std::vector<std::string> &rvecComponents) const#

Add the components to the vehicle interface configuration.

Parameters:

rvecComponents[out] Reference to a list of component names to add to the configuration. If no components are listed, all components are to be added (if a the function returns true).

Returns:

Returns true if a configuration update is requested; false otherwise.

bool InsertIntoVehicleAbstractionConfig(std::vector<std::string> &rvecComponents) const#

Add the components to the vehicle abstraction configuration.

Parameters:

rvecComponents[out] Reference to a list of component names to add to the configuration. If no components are listed, all components are to be added (if a the function returns true).

Returns:

Returns true if a configuration update is requested; false otherwise.

const std::string &InstallName() const#

The installation name for the package creation.

Returns:

Returns a reference to the variable containing the installation name.

const std::string &ProductName() const#

Get the product name. If not explicitly provided, this will be the installation name.

Returns:

Returns a reference to the variable containing the product name.

const std::string &Description() const#

Get the product description.

Returns:

Returns a reference to the variable containing the product description or empty if no description was provided.

const std::string &Author() const#

Get the product author.

Returns:

Returns a reference to the variable containing the product author or empty if no author was provided.

const std::string &Address() const#

Get the product author’s address.

Returns:

Returns a reference to the variable containing the product author’s address or empty if no address was provided.

const std::string &Copyrights() const#

Get the product copyrights.

Returns:

Returns a reference to the variable containing the product copyrights or empty if no copyrights were provided.

const std::string &PackageVersion() const#

Get the package version string (format: major.minor.patch).

Returns:

Returns a reference to the variable containing the package version string or empty if no version string was provided.

uint32_t ShowFlags() const#

Get the show flags.

Returns:

The shhow flags.

bool CheckShowFlag(EShowMask eMask) const#

Check whether the show flags contain certain flags.

Parameters:

eMask[in] Show flag mask to check for.

Returns:

Returns true when the flags contaion exactly the provided mask.

int Error() const#

Was a commandline parse error or a logical error with command line arguments detected?

Returns:

Returns the result of the command line parsing. If no error occurs, NO_ERROR is returned.

const std::string &ArgError() const#

Parse error that might have occurred.

Returns:

Returns a reference to the variable containing the error text.

struct SEnvironmentException : public std::exception#

Environment exception triggered on error during command line processing.

Public Functions

inline SEnvironmentException(int nCodeParam, const std::string &rssDescriptionParam)#

Constructor.

Parameters:
  • nCodeParam[in] Exception code

  • rssDescriptionParam[in] Reference to the exception description text.

inline virtual const char *what() const noexcept#

Returns the explanatory string.

Returns:

Pointer to the explanatory string as C-string.

Public Members

int nCode = 0#

Exception code.

std::string ssDescription#

Exception description.

struct SModule#

Module structure containing the module search string and relative target path.

The module structure is used for module selection during packing and direct installation - hence the search string and potential target directory.

Public Members

std::string ssSearchString#

Module path; can contain wildcards and regular expression (therefore of type std::string).

std::filesystem::path pathRelTarget#

Relative target path. Default is empty.

struct SVersion#

Product version structure.

Public Members

size_t nMajor = 0#

Major version number.

size_t nMinor = 0#

Minor version number.

size_t nPatch = 0#

Patch level.