add a getBuildVersion helper

This commit is contained in:
Caolán McNamara
2012-04-10 12:36:57 +01:00
parent f597ebe353
commit 65cf853589
2 changed files with 15 additions and 0 deletions

View File

@@ -61,6 +61,9 @@ namespace utl
/// retrieve the BUILDID information item; uses the given default, if not found
static rtl::OUString getBuildIdData(rtl::OUString const& _sDefault);
/// retrieve the BuildVersion information item; uses the given default, if not found
static rtl::OUString getBuildVersion(rtl::OUOUString const& _sDefault);
/// reload cached data
static void reloadData();

View File

@@ -54,6 +54,7 @@
#define BOOTSTRAP_ITEM_PRODUCT_SOURCE "ProductSource"
#define BOOTSTRAP_ITEM_VERSIONFILE "Location"
#define BOOTSTRAP_ITEM_BUILDID "buildid"
#define BOOTSTRAP_ITEM_BUILDVERSION "BuildVersion"
#define BOOTSTRAP_ITEM_BASEINSTALLATION "BRAND_BASE_DIR"
#define BOOTSTRAP_ITEM_USERINSTALLATION "UserInstallation"
@@ -642,6 +643,17 @@ OUString Bootstrap::getProductSource(OUString const& _sDefault)
}
// ---------------------------------------------------------------------------------------
OUString Bootstrap::getBuildVersion(OUString const& _sDefault)
{
OUString const csBuildVersionItem(BOOTSTRAP_ITEM_BUILDVERSION);
OUString sBuildVersion;
// read ProductSource from version.ini (versionrc)
data().getVersionValue( csBuildVersionItem, sBuildVersion, _sDefault );
return sBuildVersion;
}
// ---------------------------------------------------------------------------------------
OUString Bootstrap::getBuildIdData(OUString const& _sDefault)
{
OUString const csBuildIdItem(RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_ITEM_BUILDID));