chore: only pkg relevant node binaries
This commit is contained in:
parent
130d96b14b
commit
2d852a0d14
3 changed files with 6 additions and 17 deletions
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue