()
| 423 | } |
| 424 | |
| 425 | async function runMac10 () { |
| 426 | console.log(' Fetching release info...') |
| 427 | const releaseInfo = await getReleaseInfo(r => /mac10-x64\.dmg$/.test(r.name)) |
| 428 | if (!releaseInfo) { |
| 429 | throw new Error('No release found for macOS 10.x') |
| 430 | } |
| 431 | |
| 432 | const safeName = sanitizeFilename(releaseInfo.name) |
| 433 | const proxyUrl = applyProxy(releaseInfo.browser_download_url) |
| 434 | console.log(` URL: ${proxyUrl}`) |
| 435 | |
| 436 | await download(releaseInfo.browser_download_url, packageRoot, { extract: false, displayName: releaseInfo.name }) |
| 437 | |
| 438 | const dmgPath = join(packageRoot, safeName) |
| 439 | showFinalMessage() |
| 440 | |
| 441 | // Install from DMG automatically |
| 442 | try { |
| 443 | await installFromDmg(dmgPath) |
| 444 | |
| 445 | // Clean up DMG |
| 446 | try { |
| 447 | fs.unlinkSync(dmgPath) |
| 448 | console.log(' Cleaned up DMG file') |
| 449 | } catch (e) { |
| 450 | // Ignore cleanup errors |
| 451 | } |
| 452 | |
| 453 | console.log('') |
| 454 | console.log(' Installation complete! You can now launch electerm from /Applications') |
| 455 | } catch (err) { |
| 456 | console.error('') |
| 457 | console.error(' Warning: Automatic installation failed:', err.message) |
| 458 | console.error(' Please manually copy the app from the DMG to /Applications') |
| 459 | console.error('') |
| 460 | console.log(' Opening DMG for manual installation...') |
| 461 | execFile('open', [dmgPath]) |
| 462 | } |
| 463 | } |
| 464 | |
| 465 | // --------------------------------------------------------------------------- |
| 466 | // Main |
no test coverage detected