diff --git a/desktop/src-tauri/tauri.conf.json b/desktop/src-tauri/tauri.conf.json index 0c8e56e..5d6ee87 100644 --- a/desktop/src-tauri/tauri.conf.json +++ b/desktop/src-tauri/tauri.conf.json @@ -47,6 +47,11 @@ "infoPlist": "Info.plist", "signingIdentity": "-", "entitlements": "./Entitlements.plist" + }, + "windows": { + "nsis": { + "installMode": "currentUser" + } } }, "plugins": { @@ -54,7 +59,10 @@ "endpoints": [ "https://exdev.co.kr/desktop/updates/latest.json" ], - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDg3MUJCMjIyRkIyNzdFMUUKUldRZWZpZjdJckliaDlMS3pvRHpmQ2lnSFNjaDQrT1pEZTdDZEJ5S2RhOXV5aU1QY3JObEEwaFUK" + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDg3MUJCMjIyRkIyNzdFMUUKUldRZWZpZjdJckliaDlMS3pvRHpmQ2lnSFNjaDQrT1pEZTdDZEJ5S2RhOXV5aU1QY3JObEEwaFUK", + "windows": { + "installMode": "passive" + } } } } diff --git a/scripts/generate-desktop-latest-json.mjs b/scripts/generate-desktop-latest-json.mjs index 7a1d3f9..3f7fbf5 100644 --- a/scripts/generate-desktop-latest-json.mjs +++ b/scripts/generate-desktop-latest-json.mjs @@ -48,6 +48,15 @@ function cmpSemver(a, b) { /** @type {Record} */ const platforms = {}; +/** Windows updater bundle 우선순위 (낮을수록 preferred) — setup.exe 수동 설치용은 제외 */ +function windowsBundlePriority(name) { + const lower = name.toLowerCase(); + if (lower.endsWith('.nsis.zip')) return 0; + if (lower.endsWith('.msi.zip')) return 1; + if (lower.endsWith('-setup.exe') || (lower.includes('setup') && lower.endsWith('.exe'))) return 9; + return 5; +} + function addPlatform(platformKey, bundleName) { const bundlePath = path.join(dir, bundleName); if (!fs.existsSync(bundlePath)) return; @@ -62,7 +71,17 @@ function addPlatform(platformKey, bundleName) { const bundleVersion = versionFromName(bundleName); const effectiveVersion = bundleVersion === '0.0.0' ? version : bundleVersion; const existing = platforms[platformKey]; - if (existing && cmpSemver(effectiveVersion, existing.bundleVersion) <= 0) return; + if (existing) { + const cmp = cmpSemver(effectiveVersion, existing.bundleVersion); + if (cmp < 0) return; + if (cmp === 0 && platformKey === 'windows-x86_64') { + const prevPri = windowsBundlePriority(path.basename(existing.url.split('/').pop() ?? '')); + const nextPri = windowsBundlePriority(bundleName); + if (nextPri > prevPri) return; + } else if (cmp === 0 && platformKey !== 'windows-x86_64') { + return; + } + } platforms[platformKey] = { url: `${baseUrl}/${encodeURIComponent(bundleName)}`, signature,