chore(desktop): direct Windows installs to Microsoft Store

This commit is contained in:
reviewer 2026-07-23 14:00:42 +02:00
parent 6e3c57a9ff
commit ee2a8520cc
3 changed files with 15 additions and 11 deletions

View file

@ -27,7 +27,7 @@
<img src="https://raw.githubusercontent.com/getagentseal/codeburn/main/assets/desktop.jpg" alt="CodeBurn Desktop" /><br/>
<a href="https://github.com/getagentseal/codeburn/releases/download/desktop-v0.9.19/CodeBurn-0.9.19-arm64.dmg"><img src="https://img.shields.io/badge/macOS-Apple_Silicon-F97316?logo=apple&logoColor=white" alt="Download for macOS (Apple Silicon)" /></a>
<a href="https://github.com/getagentseal/codeburn/releases/download/desktop-v0.9.19/CodeBurn-0.9.19.dmg"><img src="https://img.shields.io/badge/macOS-Intel-F97316?logo=apple&logoColor=white" alt="Download for macOS (Intel)" /></a>
<a href="https://github.com/getagentseal/codeburn/releases/download/desktop-v0.9.19/CodeBurn-Setup-0.9.19.exe"><img src="https://img.shields.io/badge/Windows-Setup-F97316?logoColor=white" alt="Download for Windows" /></a>
<a href="https://apps.microsoft.com/detail/9P0R4ZL5XMB8"><img src="https://img.shields.io/badge/Windows-Microsoft_Store-F97316?logo=microsoft&logoColor=white" alt="Get CodeBurn from the Microsoft Store" /></a>
<a href="https://github.com/getagentseal/codeburn/releases/download/desktop-v0.9.19/codeburn-desktop_0.9.19_amd64.deb"><img src="https://img.shields.io/badge/Linux-.deb-F97316?logo=debian&logoColor=white" alt="Download for Linux (.deb)" /></a>
<a href="https://github.com/getagentseal/codeburn/releases/download/desktop-v0.9.19/codeburn-desktop-0.9.19.x86_64.rpm"><img src="https://img.shields.io/badge/Linux-.rpm-F97316?logo=redhat&logoColor=white" alt="Download for Linux (.rpm)" /></a>
<a href="https://github.com/getagentseal/codeburn/releases/download/desktop-v0.9.19/CodeBurn-0.9.19.AppImage"><img src="https://img.shields.io/badge/Linux-AppImage-F97316?logo=linux&logoColor=white" alt="Download for Linux (AppImage)" /></a>

View file

@ -4,7 +4,7 @@ vi.mock('../lib/ipc', () => ({
codeburn: { platform: 'linux', arch: 'x64' },
}))
import { directDownloadUrl, releasePageUrl, updateDownloadUrl } from './useUpdateStatus'
import { directDownloadUrl, MICROSOFT_STORE_URL, releasePageUrl, updateDownloadUrl } from './useUpdateStatus'
const TAG = 'desktop-v0.9.19'
const BASE = 'https://github.com/getagentseal/codeburn/releases/download/desktop-v0.9.19'
@ -18,9 +18,9 @@ describe('directDownloadUrl', () => {
expect(directDownloadUrl(TAG, 'darwin', 'x64')).toBe(`${BASE}/CodeBurn-0.9.19.dmg`)
})
it('maps Windows to the Setup exe regardless of arch', () => {
expect(directDownloadUrl(TAG, 'win32', 'x64')).toBe(`${BASE}/CodeBurn-Setup-0.9.19.exe`)
expect(directDownloadUrl(TAG, 'win32', undefined)).toBe(`${BASE}/CodeBurn-Setup-0.9.19.exe`)
it('maps Windows to the official Microsoft Store regardless of arch', () => {
expect(directDownloadUrl(TAG, 'win32', 'x64')).toBe(MICROSOFT_STORE_URL)
expect(directDownloadUrl(TAG, 'win32', undefined)).toBe(MICROSOFT_STORE_URL)
})
it('returns null for Linux (three formats, the user picks on the page)', () => {

View file

@ -30,12 +30,16 @@ export function releasePageUrl(tag: string): string {
return `https://github.com/getagentseal/codeburn/releases/tag/${tag}`
}
/** Official signed Windows distribution. The Store handles installation and
* updates, avoiding the unsigned GitHub installer and SmartScreen warning. */
export const MICROSOFT_STORE_URL = 'https://apps.microsoft.com/detail/9P0R4ZL5XMB8'
/**
* Direct asset download for the running platform, so Download saves the file
* instead of landing on a GitHub page. Filenames mirror the electron-builder
* output (app/DISTRIBUTION.md) and are version-derived from the tag. Returns
* null (callers fall back to the release page) for Linux three formats, the
* user picks and for unknown platforms or a preload without `arch`.
* Preferred install target for the running platform. macOS downloads the
* matching release asset; Windows opens the signed Microsoft Store listing.
* Returns null (callers fall back to the release page) for Linux three
* formats, the user picks and for unknown platforms or a preload without
* `arch`.
*/
export function directDownloadUrl(tag: string, platform: string | undefined, arch: string | undefined): string | null {
const version = tag.startsWith('desktop-v') ? tag.slice('desktop-v'.length) : null
@ -45,7 +49,7 @@ export function directDownloadUrl(tag: string, platform: string | undefined, arc
if (!arch) return null
file = arch === 'arm64' ? `CodeBurn-${version}-arm64.dmg` : `CodeBurn-${version}.dmg`
} else if (platform === 'win32') {
file = `CodeBurn-Setup-${version}.exe`
return MICROSOFT_STORE_URL
}
if (!file) return null
return `https://github.com/getagentseal/codeburn/releases/download/${tag}/${file}`