chore: only pkg relevant node binaries

This commit is contained in:
haritabh-z01 2025-08-12 15:32:16 +05:30
parent 130d96b14b
commit 2d852a0d14
3 changed files with 6 additions and 17 deletions

View file

@ -67,7 +67,7 @@ jobs:
- name: Download Node.js binaries
working-directory: apps/desktop
run: pnpm download-node:all
run: pnpm download-node
- name: Import Developer ID cert
uses: apple-actions/import-codesign-certs@v3

View file

@ -58,18 +58,9 @@ const config: ForgeConfig = {
`${platform}-${arch}`,
platform === "win32" ? "node.exe" : "node",
);
const nodeBinaryDest = join(
projectRoot,
"node-binaries",
`${platform}-${arch}`,
);
// Check if the binary exists
if (existsSync(nodeBinarySource)) {
// Ensure destination directory exists
if (!existsSync(nodeBinaryDest)) {
mkdirSync(nodeBinaryDest, { recursive: true });
}
console.log(`✓ Node.js binary found for ${platform}-${arch}`);
} else {
console.error(
@ -282,7 +273,10 @@ const config: ForgeConfig = {
extraResource: [
"../../packages/native-helpers/swift-helper/bin",
"./src/db/migrations",
"./node-binaries",
// Only include the platform-specific node binary
`./node-binaries/${process.platform}-${process.arch}/node${
process.platform === "win32" ? ".exe" : ""
}`,
"./models",
"./src/assets",
],

View file

@ -27,12 +27,7 @@ export class WhisperProvider implements TranscriptionProvider {
if (app.isPackaged) {
// In production, use the binary from resources
return path.join(
process.resourcesPath,
"node-binaries",
`${platform}-${arch}`,
binaryName,
);
return path.join(process.resourcesPath, binaryName);
} else {
// In development, use the local binary
return path.join(