MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / probedPackageKey

Function probedPackageKey

app/src/Misc/ModuleManager.cpp:458–471  ·  view source on GitHub ↗

* @brief Detects the packaging at runtime when no stamp resolved: the AppImage runtime * environment on Linux, the Win32 package identity (Microsoft Store) on Windows. */

Source from the content-addressed store, hash-verified

456 * environment on Linux, the Win32 package identity (Microsoft Store) on Windows.
457 */
458[[nodiscard]] static QString probedPackageKey()
459{
460#if defined(Q_OS_LINUX)
461 const auto suffix = updaterArchSuffix();
462 if (qEnvironmentVariableIsSet("APPIMAGE") && !suffix.isEmpty())
463 return QStringLiteral("linux-appimage-%1").arg(suffix);
464#elif defined(Q_OS_WIN)
465 UINT32 length = 0;
466 if (GetCurrentPackageFullName(&length, nullptr) == ERROR_INSUFFICIENT_BUFFER)
467 return QStringLiteral("windows-msix");
468#endif
469
470 return QString();
471}
472
473/**
474 * @brief Configures QSimpleUpdater defaults and resolves the packaging-aware appcast key:

Callers 1

configureUpdaterMethod · 0.85

Calls 2

updaterArchSuffixFunction · 0.85
isEmptyMethod · 0.80

Tested by

no test coverage detected