()
| 26 | } |
| 27 | |
| 28 | export function findPackagedAppExecutable() { |
| 29 | if (process.platform === 'darwin') { |
| 30 | for (const outputDir of ['mac-arm64', 'mac']) { |
| 31 | const executable = path.join(releaseDir, outputDir, macAppName, 'Contents/MacOS', productName); |
| 32 | if (existsSync(executable)) return executable; |
| 33 | } |
| 34 | |
| 35 | for (const outputDir of ['mac-arm64', 'mac']) { |
| 36 | const executable = path.join(releaseDir, outputDir, 'Agent Tower Desktop Spike.app/Contents/MacOS/Agent Tower Desktop Spike'); |
| 37 | if (existsSync(executable)) return executable; |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | if (process.platform === 'win32') { |
| 42 | const executable = path.join(releaseDir, 'win-unpacked', `${productName}.exe`); |
| 43 | if (existsSync(executable)) return executable; |
| 44 | |
| 45 | const legacyExecutable = path.join(releaseDir, 'win-unpacked', 'Agent Tower Desktop Spike.exe'); |
| 46 | if (existsSync(legacyExecutable)) return legacyExecutable; |
| 47 | } |
| 48 | |
| 49 | const linuxExecutable = path.join(releaseDir, 'linux-unpacked', 'agent-tower'); |
| 50 | if (existsSync(linuxExecutable)) return linuxExecutable; |
| 51 | |
| 52 | const legacyLinuxExecutable = path.join(releaseDir, 'linux-unpacked', 'agent-tower-desktop-spike'); |
| 53 | if (existsSync(legacyLinuxExecutable)) return legacyLinuxExecutable; |
| 54 | |
| 55 | throw new Error(`Could not find packaged app executable in ${releaseDir}. Run pnpm --filter @agent-tower/desktop package:dir first.`); |
| 56 | } |
| 57 | |
| 58 | export function createIsolatedDesktopTestEnv({ |
| 59 | prefix = 'agent-tower-desktop-test', |
no test coverage detected