Kaydet (Commit) 6d2ef60c authored tarafından Markus Mohrhard's avatar Markus Mohrhard

updater: make it easier to test indenpendent updater parts

Change-Id: I3f06c6315349c9c53e3e76a8a01153679260c272
Reviewed-on: https://gerrit.libreoffice.org/40653Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst a0c54ff9
...@@ -1383,11 +1383,12 @@ int Desktop::Main() ...@@ -1383,11 +1383,12 @@ int Desktop::Main()
return EXIT_FAILURE; return EXIT_FAILURE;
#if HAVE_FEATURE_UPDATE_MAR #if HAVE_FEATURE_UPDATE_MAR
const char* pUpdaterTestReplace = std::getenv("LIBO_UPDATER_TEST_REPLACE"); const char* pUpdaterTestEnable = std::getenv("LIBO_UPDATER_TEST_ENABLE");
if (pUpdaterTestReplace || officecfg::Office::Update::Update::Enabled::get()) if (pUpdaterTestEnable || officecfg::Office::Update::Update::Enabled::get())
{ {
// check if we just updated // check if we just updated
bool bUpdateRunning = officecfg::Office::Update::Update::UpdateRunning::get(); const char* pUpdaterRunning = std::getenv("LIBO_UPDATER_TEST_RUNNING");
bool bUpdateRunning = officecfg::Office::Update::Update::UpdateRunning::get() || pUpdaterRunning;
if (bUpdateRunning) if (bUpdateRunning)
{ {
OUString aSeeAlso = officecfg::Office::Update::Update::SeeAlso::get(); OUString aSeeAlso = officecfg::Office::Update::Update::SeeAlso::get();
...@@ -1426,7 +1427,8 @@ int Desktop::Main() ...@@ -1426,7 +1427,8 @@ int Desktop::Main()
osl::DirectoryItem aDirectoryItem; osl::DirectoryItem aDirectoryItem;
osl::DirectoryItem::get(Updater::getUpdateDirURL(), aDirectoryItem); osl::DirectoryItem::get(Updater::getUpdateDirURL(), aDirectoryItem);
if (pUpdaterTestReplace || (aPatchInfo.is() && aDirectoryItem.is())) const char* pUpdaterTestUpdate = std::getenv("LIBO_UPDATER_TEST_UPDATE");
if (pUpdaterTestUpdate || (aPatchInfo.is() && aDirectoryItem.is()))
{ {
OUString aBuildID("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}"); OUString aBuildID("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}");
rtl::Bootstrap::expandMacros(aBuildID); rtl::Bootstrap::expandMacros(aBuildID);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment