Merge pull request #486 from dpaulat/feature/windows-installer-suffix

Look for the appropriate .msi asset suffix depending on platform
This commit is contained in:
Dan Paulat 2025-07-15 08:25:33 -05:00 committed by GitHub
commit 13a891b477
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -91,7 +91,14 @@ void UpdateDialog::UpdateReleaseInfo(const std::string& latestVersion,
void UpdateDialog::Impl::HandleAsset(const types::gh::ReleaseAsset& asset)
{
#if defined(_WIN32)
if (asset.name_.ends_with(".msi"))
# if defined(_M_AMD64)
static constexpr std::string assetSuffix = "-x64.msi";
# else
static constexpr std::string assetSuffix = "-arm64.msi";
# endif
if (asset.name_.ends_with(assetSuffix))
{
self_->ui->installUpdateButton->setVisible(true);
installUrl_ = asset.browserDownloadUrl_;