* @brief Detects the packaging at runtime when no stamp resolved: the AppImage runtime * environment on Linux, the Win32 package identity (Microsoft Store) on Windows. */
| 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: |
no test coverage detected