Skip to content

Commit 2d852a0

Browse files
committed
chore: only pkg relevant node binaries
1 parent 130d96b commit 2d852a0

3 files changed

Lines changed: 6 additions & 17 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767

6868
- name: Download Node.js binaries
6969
working-directory: apps/desktop
70-
run: pnpm download-node:all
70+
run: pnpm download-node
7171

7272
- name: Import Developer ID cert
7373
uses: apple-actions/import-codesign-certs@v3

apps/desktop/forge.config.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,9 @@ const config: ForgeConfig = {
5858
`${platform}-${arch}`,
5959
platform === "win32" ? "node.exe" : "node",
6060
);
61-
const nodeBinaryDest = join(
62-
projectRoot,
63-
"node-binaries",
64-
`${platform}-${arch}`,
65-
);
6661

6762
// Check if the binary exists
6863
if (existsSync(nodeBinarySource)) {
69-
// Ensure destination directory exists
70-
if (!existsSync(nodeBinaryDest)) {
71-
mkdirSync(nodeBinaryDest, { recursive: true });
72-
}
7364
console.log(`✓ Node.js binary found for ${platform}-${arch}`);
7465
} else {
7566
console.error(
@@ -282,7 +273,10 @@ const config: ForgeConfig = {
282273
extraResource: [
283274
"../../packages/native-helpers/swift-helper/bin",
284275
"./src/db/migrations",
285-
"./node-binaries",
276+
// Only include the platform-specific node binary
277+
`./node-binaries/${process.platform}-${process.arch}/node${
278+
process.platform === "win32" ? ".exe" : ""
279+
}`,
286280
"./models",
287281
"./src/assets",
288282
],

apps/desktop/src/pipeline/providers/transcription/whisper-provider.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,7 @@ export class WhisperProvider implements TranscriptionProvider {
2727

2828
if (app.isPackaged) {
2929
// In production, use the binary from resources
30-
return path.join(
31-
process.resourcesPath,
32-
"node-binaries",
33-
`${platform}-${arch}`,
34-
binaryName,
35-
);
30+
return path.join(process.resourcesPath, binaryName);
3631
} else {
3732
// In development, use the local binary
3833
return path.join(

0 commit comments

Comments
 (0)