core.git: Branch 'libreoffice-24-2' - desktop/source
desktop/source/deployment/registry/package/dp_package.cxx | 17 +- 1 file changed, 16 insertions(+), 1 deletion(-) New commits: commit 96a40862fa010d9022247524913ac51e1d8b189a Author: Patrick Luby AuthorDate: Wed Apr 3 17:34:49 2024 -0400 Commit: Noel Grandin CommitDate: Sun Apr 7 11:36:16 2024 +0200 tdf#159790 temporarily release mutex for child packages This code is normally run on a separate thread so if a child package tries to acquire the solar mutex, a deadlock can occur if the main thread calls isRegistered() on this package or any of its parents. So, temporarily release this package's mutex while registering the child package. Change-Id: I45b534c44d5946637a5441927ed01a68aad4c448 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165766 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit cab028121bd9b620529b6492b3247ac48ac2082b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165831 Reviewed-by: Patrick Luby diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 6af2fb5515f5..d5c1feeb4992 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -781,7 +781,7 @@ uno::Reference< graphic::XGraphic > BackendImpl::PackageImpl::getIcon( sal_Bool void BackendImpl::PackageImpl::processPackage_( -::osl::ResettableMutexGuard &, +::osl::ResettableMutexGuard & guard, bool doRegisterPackage, bool startup, ::rtl::Reference const & abortChannel, @@ -802,10 +802,20 @@ void BackendImpl::PackageImpl::processPackage_( xPackage->createAbortChannel() ); AbortChannel::Chain chain( abortChannel, xSubAbortChannel ); try { +// tdf#159790 temporarily release mutex for child packages +// This code is normally run on a separate thread so if a +// child package tries to acquire the solar mutex, a deadlock +// can occur if the main thread calls isRegistered() on this +// package or any of its parents. So, temporarily release +// this package's mutex while registering the child package. +guard.clear(); xPackage->registerPackage( startup, xSubAbortChannel, xCmdEnv ); +guard.reset(); } catch (const Exception &) { +guard.reset(); + //We even try a rollback if the user cancelled the action (CommandAbortedException) //in order to prevent invalid database entries. Any exc( ::cppu::getCaughtException() ); @@ -856,6 +866,11 @@ void BackendImpl::PackageImpl::processPackage_( ::cppu::throwException(exc); } } +catch (...) { +guard.reset(); +throw; +} + data.items.emplace_back(xPackage->getURL(), xPackage->getPackageType()->getMediaType()); }
core.git: Branch 'libreoffice-24-2' - desktop/source
desktop/source/deployment/registry/configuration/dp_configuration.cxx |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) New commits: commit 27279b82c4e98271db9e999200c70ee8cba11c38 Author: Patrick Luby AuthorDate: Tue Apr 2 10:38:58 2024 -0400 Commit: Adolfo Jayme Barrientos CommitDate: Wed Apr 3 00:01:01 2024 +0200 tdf#159790 eliminate deadlock on main thread A separate thread may have already acquired m_aMutex and that thread will then try to acquire the solar mutex. However, when the main thread calls this method, the main thread has already acquired the solar mutex. So, drop the desktop mutex before calling out. Change-Id: Ic87063266ac5101b866df9f24067a403e1417745 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165682 Reviewed-by: Patrick Luby Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 89e23bb599104d3bde30878148e15cf4deb1593f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165629 Reviewed-by: Adolfo Jayme Barrientos diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 622814248670..ceba81f9470a 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -654,7 +654,7 @@ OUString replaceOrigin( void BackendImpl::PackageImpl::processPackage_( -::osl::ResettableMutexGuard &, +::osl::ResettableMutexGuard & guard, bool doRegisterPackage, bool startup, ::rtl::Reference const &, @@ -689,7 +689,10 @@ void BackendImpl::PackageImpl::processPackage_( if ((that->m_eContext != Context::Bundled && !startup) || comphelper::LibreOfficeKit::isActive()) { -if (m_isSchema) +bool bIsSchema = m_isSchema; +// tdf#159790 prevent lock-ordering deadlock, the code below might acquire the solar mutex +guard.clear(); +if (bIsSchema) { css::configuration::Update::get( that->m_xComponentContext)->insertExtensionXcsFile( @@ -701,6 +704,7 @@ void BackendImpl::PackageImpl::processPackage_( that->m_xComponentContext)->insertExtensionXcuFile( that->m_eContext == Context::Shared, expandUnoRcUrl(url)); } +guard.reset(); } that->addToConfigmgrIni( m_isSchema, true, url, xCmdEnv ); data.iniEntry = dp_misc::makeRcTerm(url);
core.git: Branch 'libreoffice-24-2' - desktop/source
desktop/source/app/updater.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit f28e0f30a47b3c8706d0247e1ee4f3e4084546cd Author: Stephan Bergmann AuthorDate: Fri Jan 5 13:02:04 2024 +0100 Commit: Stephan Bergmann CommitDate: Fri Jan 5 16:33:19 2024 +0100 Also copy updater.ini (so that updater progress UI will actually shown up) Change-Id: I2805087da196aa7153850345803999af4de313df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161660 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit d3a563d8a6fdcdbf880d5e9ad2d3a9076296af71) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161670 diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx index 3221d688a47f..12bb4969a68c 100644 --- a/desktop/source/app/updater.cxx +++ b/desktop/source/app/updater.cxx @@ -145,6 +145,7 @@ void CopyUpdaterToTempDir(const OUString& rInstallDirURL, const OUString& rTempD { OUString aUpdaterName = OUString::fromUtf8(pUpdaterName); CopyFileToDir(rTempDirURL, aUpdaterName, rInstallDirURL); +CopyFileToDir(rTempDirURL, u"updater.ini"_ustr, rInstallDirURL); } #ifdef UNX
core.git: Branch 'libreoffice-24-2' - desktop/source
desktop/source/app/app.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a4ad9b249eb002137dbab9f6df89280bc5ca3ef8 Author: Stephan Bergmann AuthorDate: Wed Dec 20 10:04:45 2023 +0100 Commit: Stephan Bergmann CommitDate: Wed Dec 20 17:58:48 2023 +0100 Revert "updater: check every 12 hours for updates for now" This reverts commit bb5622adc5db348efcc9a6f41d19de9f00a367dd, going back to a less aggressive 7 day period for now. Change-Id: I439a49f3ca6761ef17ca2b92d395b0de5c400197 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161050 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 9f909a9692d3a9a4371b4abb106defd83d28a6f3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161020 diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 8136d39a9806..0d66a48daac7 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1121,7 +1121,7 @@ bool isTimeForUpdateCheck() sal_uInt64 nLastUpdate = officecfg::Office::Update::Update::LastUpdateTime::get(); sal_uInt64 nNow = tools::Time::GetSystemTicks(); -sal_uInt64 n7DayInMS = 1000 * 60 * 60 * 12 * 1; // 12 hours in ms +sal_uInt64 n7DayInMS = 1000 * 60 * 60 * 24 * 7; // 7 days in ms if (nNow - n7DayInMS >= nLastUpdate) return true;
core.git: Branch 'libreoffice-24-2' - desktop/source external/onlineupdate Repository.mk
Repository.mk |1 desktop/source/app/updater.cxx | 26 ++- external/onlineupdate/Executable_update_service.mk |2 external/onlineupdate/Module_onlineupdate.mk |1 external/onlineupdate/Package_updater_ini.mk | 16 ++ external/onlineupdate/README.md|9 + external/onlineupdate/lo.patch | 151 ++--- external/onlineupdate/updater.ini | 12 + 8 files changed, 189 insertions(+), 29 deletions(-) New commits: commit d125fc2a2178b100253ea089b7ad30acafccfb57 Author: Stephan Bergmann AuthorDate: Tue Dec 19 16:50:42 2023 +0100 Commit: Stephan Bergmann CommitDate: Wed Dec 20 08:09:06 2023 +0100 Improve --enable-online-update-mar Windows MOZ_MAINTENANCE_SERVICE feature To get the MOZ_MAINTENANCE_SERVICE mode going at all, update.status needs to contain a "pending-service" token. For Mozilla, code in its toolkit/mozapps/update/UpdateService.sys.mjs takes care of writing that. For us, lets always write that in update_checker() (even on Linux, where it's apparently harmless). Then, the MOZ_MAINTENANCE_SERVICE code is rather picky with its various sanity checks: Among other things, it expects argv[0] to be a full path to the updater executable, and it expects the update.mar (and its status and log files) to be in a directory hierarchy named updates/0/ rather than patch/. So get all that fixed in desktop/source/app/updater.cxx. And patch in external/onlineupdate/lo.patch where it expects to find the updater executable (just updater.exe vs. our program/updater.exe). And we shouldn't interfere with the upstream Mozilla maintenance service, so also rename that in external/onlineupdate/lo.patch. And `update_service install` wants to read version resources from the update_service.exe, so provide that (via gb_Executable_add_default_nativeres). Also, `update_service install` wants to read a MozillaMaintenanceDescription value from an updater.ini, so provide one (with contents of that value inspired by Mozilla's browser/locales/en-US/updater/updater.ini). As we now have an updater.ini anyway (and which apparently works fine with Unix line ends on both Linux and Windows), also use it on Linux and drop the onlineupdate/source/update/updater/progressui_gtk.cpp again from external/onlineupdate/lo.patch. And update external/onlineupdate/README.md how to manually execute that test against an updater.ini. Change-Id: I0e3e5e5311be61e1224cda700af2e5d751113a99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160996 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 290f8f908dc8178c8bc34a8bf909246f591a13aa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161014 diff --git a/Repository.mk b/Repository.mk index b9cf9c2ddb9c..9ef08e814a20 100644 --- a/Repository.mk +++ b/Repository.mk @@ -1096,6 +1096,7 @@ $(eval $(call gb_Helper_register_packages_for_install,brand,\ readlicense_oo_files \ readlicense_oo_license \ $(call gb_Helper_optional,DESKTOP,setup_native_packinfo) \ + $(if $(ENABLE_ONLINE_UPDATE_MAR),updater_ini) \ )) ifeq ($(USING_X11), TRUE) diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx index 925b6b7116a4..3221d688a47f 100644 --- a/desktop/source/app/updater.cxx +++ b/desktop/source/app/updater.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -173,17 +174,14 @@ void createStr(const OUString& rStr, CharT** pArgs, size_t i) pArgs[i] = pStr; } -CharT** createCommandLine(int * argc) +CharT** createCommandLine(OUString const & argv0, int * argc) { OUString aInstallDir = Updater::getInstallationPath(); size_t nCommandLineArgs = rtl_getAppCommandArgCount(); size_t nArgs = 8 + nCommandLineArgs; CharT** pArgs = new CharT*[nArgs]; -{ -OUString aUpdaterName = OUString::fromUtf8(pUpdaterName); -createStr(aUpdaterName, pArgs, 0); -} +createStr(argv0, pArgs, 0); { // directory with the patch log OUString aPatchDir = Updater::getPatchDirURL(); @@ -307,7 +305,7 @@ bool update() Updater::log("Calling the updater with parameters: "); int argc; -CharT** pArgs = createCommandLine(); +CharT** pArgs = createCommandLine(aUpdaterPath, ); bool bSuccess = true; const char* pUpdaterTestReplace = std::getenv("LIBO_UPDATER_TEST_REPLACE"); @@ -676,9 +674,11 @@ void download_file(const OUString& rURL, size_t nFileSize, const OUString& rHash throw invalid_hash(rHash, aHash); } -OUString aPatchDirURL("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/patch/"); +OUString aPatchDirURL("${$BRAND_BASE_DIR/"
core.git: Branch 'libreoffice-24-2' - desktop/source
desktop/source/app/app.cxx | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) New commits: commit 62a50239e06ac2f94f4a1cfbef5a8689bd42b875 Author: Stephan Bergmann AuthorDate: Fri Dec 15 14:40:53 2023 +0100 Commit: Stephan Bergmann CommitDate: Sat Dec 16 10:54:01 2023 +0100 Avoid "Desktop disposed before terminating it" assert ...from Desktop::disposing() at framework/source/services/desktop.cxx:1041, on Windows, when the HAVE_FEATURE_UPDATE_MAR update() call returns true (and soffice.bin is about to exit now), but the css.frame.Desktop service happens to already have been created somewhere else (and will thus be disposed as part of disposing the service manager) but doesn't receive a terminate() call in Desktop::Main(). So reorder the code in Desktop::Main(), moving the HAVE_FEATURE_UPDATE_MAR code after the > xDesktop = css::frame::Desktop::create( xContext ); so that we have something to call > xDesktop->terminate(); on in this scenario. Change-Id: Iee5b6eeece33d5a27cadb94a7da0d26aa1492e91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160831 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 98caf4786033da6c39b4f746d79ab4f340683d32) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160850 diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 4c13a2a8e716..8136d39a9806 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1351,6 +1351,22 @@ int Desktop::Main() if ( !InitializeConfiguration() ) return EXIT_FAILURE; +SetSplashScreenProgress(30); + +// create title string +OUString aTitle(ReplaceStringHookProc(RID_APPTITLE)); +#ifdef DBG_UTIL +//include buildid in non product builds +aTitle += " [" + utl::Bootstrap::getBuildIdData("development") + "]"; +#endif + +SetDisplayName( aTitle ); +SetSplashScreenProgress(35); +pExecGlobals->pPathOptions.reset( new SvtPathOptions); +SetSplashScreenProgress(40); + +xDesktop = css::frame::Desktop::create( xContext ); + #if HAVE_FEATURE_UPDATE_MAR const char* pUpdaterTestEnable = std::getenv("LIBO_UPDATER_TEST_ENABLE"); if (pUpdaterTestEnable || officecfg::Office::Update::Update::Enabled::get()) @@ -1414,7 +1430,10 @@ int Desktop::Main() CloseSplashScreen(); bool bSuccess = update(); if (bSuccess) +{ +xDesktop->terminate(); return EXIT_SUCCESS; +} } else if (isTimeForUpdateCheck() || pForcedUpdateCheck) { @@ -1429,22 +1448,6 @@ int Desktop::Main() } #endif -SetSplashScreenProgress(30); - -// create title string -OUString aTitle(ReplaceStringHookProc(RID_APPTITLE)); -#ifdef DBG_UTIL -//include buildid in non product builds -aTitle += " [" + utl::Bootstrap::getBuildIdData("development") + "]"; -#endif - -SetDisplayName( aTitle ); -SetSplashScreenProgress(35); -pExecGlobals->pPathOptions.reset( new SvtPathOptions); -SetSplashScreenProgress(40); - -xDesktop = css::frame::Desktop::create( xContext ); - // create service for loading SFX (still needed in startup) pExecGlobals->xGlobalBroadcaster = Reference < css::document::XDocumentEventListener > ( css::frame::theGlobalEventBroadcaster::get(xContext), UNO_SET_THROW );
core.git: Branch 'libreoffice-24-2' - desktop/source
desktop/source/app/updater.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit dec2ee4f9d1e01757c76362f2f94600fe6c25066 Author: Stephan Bergmann AuthorDate: Fri Dec 15 10:22:51 2023 +0100 Commit: Stephan Bergmann CommitDate: Fri Dec 15 14:15:36 2023 +0100 -Werror,-Wunused-result ...caused by typo in previous 58bfd8f982950566018f77ce8895963d914058f8 "Fix backward vs. forward slashes on Windows" Change-Id: Ibd1967688c6ab4c962818595d435c7f821ad3d64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160820 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit b7f9c56ff1007d33de1a0e1b757c9bb1d93e87e4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160808 diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx index 8796583df4d8..925b6b7116a4 100644 --- a/desktop/source/app/updater.cxx +++ b/desktop/source/app/updater.cxx @@ -91,7 +91,7 @@ OUString normalizePath(const OUString& rPath) aPath = aPath.replace('\\', '/'); #endif -aPath.replaceAll("//", "/"); +aPath = aPath.replaceAll("//", "/"); // remove final / if (aPath.endsWith("/"))
core.git: Branch 'libreoffice-24-2' - desktop/source
desktop/source/app/updater.cxx | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) New commits: commit 084b1f6d0c43a90bb15c58e7e8d7b4f6d2e53de4 Author: Stephan Bergmann AuthorDate: Thu Dec 14 12:15:10 2023 +0100 Commit: Stephan Bergmann CommitDate: Fri Dec 15 12:23:21 2023 +0100 Fix backward vs. forward slashes on Windows Change-Id: I24771a526848901ccedb15aa5dd7b373fe854977 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 58bfd8f982950566018f77ce8895963d914058f8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160801 diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx index fa3836596cc3..8796583df4d8 100644 --- a/desktop/source/app/updater.cxx +++ b/desktop/source/app/updater.cxx @@ -86,7 +86,12 @@ const char* pSofficeExeName = "soffice.exe"; OUString normalizePath(const OUString& rPath) { -OUString aPath = rPath.replaceAll("//", "/"); +OUString aPath = rPath; +#if defined WNT +aPath = aPath.replace('\\', '/'); +#endif + +aPath.replaceAll("//", "/"); // remove final / if (aPath.endsWith("/")) @@ -108,7 +113,10 @@ OUString normalizePath(const OUString& rPath) aPath = aTempPath.copy(0, i) + aPath.copy(nIndex + 3); } -return aPath.replaceAll("\\", "/"); +#if defined WNT +aPath = aPath.replace('/', '\\'); +#endif +return aPath; } void CopyFileToDir(const OUString& rTempDirURL, const OUString & rFileName, const OUString& rOldDir)
core.git: Branch 'libreoffice-24-2' - desktop/source
desktop/source/app/updater.cxx |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit acf00a90166bd17198e5b3c9fb2417dd0bd45deb Author: Stephan Bergmann AuthorDate: Wed Dec 13 09:58:29 2023 +0100 Commit: Stephan Bergmann CommitDate: Thu Dec 14 08:07:32 2023 +0100 Fix number of actual arguments Change-Id: I04bb3462948aeab24d46ee7ee910fdae8da2aa65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160674 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 8adfdb2a6dad7b6d67c1557c2a0160a53eec7cfe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160649 diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx index 5596028b0f79..fa3836596cc3 100644 --- a/desktop/source/app/updater.cxx +++ b/desktop/source/app/updater.cxx @@ -165,7 +165,7 @@ void createStr(const OUString& rStr, CharT** pArgs, size_t i) pArgs[i] = pStr; } -CharT** createCommandLine() +CharT** createCommandLine(int * argc) { OUString aInstallDir = Updater::getInstallationPath(); @@ -231,6 +231,7 @@ CharT** createCommandLine() pArgs[nArgs - 1] = nullptr; +*argc = nArgs - 1; return pArgs; } @@ -297,7 +298,8 @@ bool update() OUString aUpdaterPath = getPathFromURL(aTempDirURL + "/" + OUString::fromUtf8(pUpdaterName)); Updater::log("Calling the updater with parameters: "); -CharT** pArgs = createCommandLine(); +int argc; +CharT** pArgs = createCommandLine(); bool bSuccess = true; const char* pUpdaterTestReplace = std::getenv("LIBO_UPDATER_TEST_REPLACE"); @@ -311,7 +313,7 @@ bool update() bSuccess = false; } #elif defined(_WIN32) -bSuccess = WinLaunchChild((wchar_t*)aUpdaterPath.getStr(), 8, pArgs); +bSuccess = WinLaunchChild((wchar_t*)aUpdaterPath.getStr(), argc, pArgs); #endif } else
core.git: Branch 'libreoffice-24-2' - desktop/source
desktop/source/app/updater.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit bce717bcc3b647fa43e403c459500ed5ed79def4 Author: Stephan Bergmann AuthorDate: Fri Dec 8 16:32:56 2023 +0100 Commit: Stephan Bergmann CommitDate: Mon Dec 11 14:18:16 2023 +0100 Fix Linux --enable-online-update-mar build ...after 13595f6220095d120e13ccb6fbfac1de4c803fe7 "Fix --enable-online-update-mar on Windows" Change-Id: I8e13a3f4234f3b5fb64d606eb3c2c16611dacd33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160491 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 2e92f184f025e99d51542722f0398c33a3d146f1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160475 diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx index bdd232be8560..5596028b0f79 100644 --- a/desktop/source/app/updater.cxx +++ b/desktop/source/app/updater.cxx @@ -141,9 +141,11 @@ void CopyUpdaterToTempDir(const OUString& rInstallDirURL, const OUString& rTempD #ifdef UNX typedef char CharT; #define tstrncpy std::strncpy +char const * toStream(char const * s) { return s; } #elif defined(_WIN32) typedef wchar_t CharT; #define tstrncpy std::wcsncpy +OUString toStream(wchar_t const * s) { return OUString(o3tl::toU(s)); } #else #error "Need an implementation" #endif @@ -317,7 +319,7 @@ bool update() SAL_WARN("desktop.updater", "Updater executable path: " << aUpdaterPath); for (size_t i = 0; i < 8 + rtl_getAppCommandArgCount(); ++i) { -SAL_WARN("desktop.updater", OUString(o3tl::toU(pArgs[i]))); +SAL_WARN("desktop.updater", toStream(pArgs[i])); } bSuccess = false; }