| ... | ... | @@ -941,6 +941,19 @@ export const MAC_FILE_EXCLUSIONS = [ |
| 941 | 941 | "!**/node_modules/node-pty/prebuilds/win32-*/**/*", |
| 942 | 942 | "!**/node_modules/node-pty/third_party/conpty/**/*", |
| 943 | 943 | ] as const; |
| 944 | |
| 945 | // node-pty publishes both Darwin prebuilds in one package. Single-architecture |
| 946 | // apps only need the native target; universal apps need both. An omitted arch |
| 947 | // preserves the existing common exclusions for callers that only inspect the |
| 948 | // generic platform config. |
| 949 | export function resolveMacFileExclusions(arch?: typeof BuildArch.Type) { |
| 950 | if (arch === undefined || arch === "universal") { |
| 951 | return [...MAC_FILE_EXCLUSIONS]; |
| 952 | } |
| 953 | |
| 954 | const unusedArch = arch === "arm64" ? "x64" : "arm64"; |
| 955 | return [...MAC_FILE_EXCLUSIONS, `!**/node_modules/node-pty/prebuilds/darwin-${unusedArch}/**/*`]; |
| 956 | } |
| 944 | 957 | // Windows ships the server tree (bundle + node_modules) as a separate |
| 945 | 958 | // resources/server.asar sidecar instead of loose files: the NSIS installer |
| 946 | 959 | // then extracts a handful of large archives instead of thousands of small |
| ... | ... | @@ -2428,13 +2441,17 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( |
| 2428 | 2441 | // sidecar staging skips the archive in that case, and listing a resource |
| 2429 | 2442 | // whose source file was never written fails the electron-builder step. |
| 2430 | 2443 | wslRuntimeBundled = false, |
| 2444 | arch?: typeof BuildArch.Type, |
| 2431 | 2445 | ) { |
| 2432 | 2446 | const buildConfig: Record<string, unknown> = { |
| 2433 | 2447 | appId: DESKTOP_APP_ID, |
| 2434 | 2448 | productName: resolveDesktopProductName(version), |
| 2435 | 2449 | artifactName: "T3-Code-${version}-${arch}.${ext}", |
| 2436 | 2450 | electronLanguages: [...DESKTOP_ELECTRON_LANGUAGES], |
| 2437 | | files: [...DESKTOP_FILE_EXCLUSIONS, ...(platform === "mac" ? MAC_FILE_EXCLUSIONS : [])], |
| 2451 | files: [ |
| 2452 | ...DESKTOP_FILE_EXCLUSIONS, |
| 2453 | ...(platform === "mac" ? resolveMacFileExclusions(arch) : []), |
| 2454 | ], |
| 2438 | 2455 | directories: { |
| 2439 | 2456 | buildResources: "apps/desktop/resources", |
| 2440 | 2457 | }, |
| ... | ... | @@ -3502,6 +3519,7 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( |
| 3502 | 3519 | } |
| 3503 | 3520 | : undefined, |
| 3504 | 3521 | bundlesWslRuntime({ arch: options.arch, prebuildPath: options.wslPrebuild }), |
| 3522 | options.arch, |
| 3505 | 3523 | ), |
| 3506 | 3524 | dependencies: stageDependencies, |
| 3507 | 3525 | devDependencies: { |