I build my application with Electron-builder. On Linux I need to ship a .so file used by the .node library, but the file is nowhere inside the app.asar file. On Windows I do the same for a .dll file and it works perfectly. Here is my `electron-builder.yaml file:
---
"$schema": .json
appId: com.electron.{productName}
productName: STMng
copyright: Copyright © 2025 ${author}
asar: true
directories:
output: release/${version}
buildResources: resources
files:
- dist-electron
- dist
- build/Release/native.node
- "!**/node_modules/**/*.d.ts.map"
- "!**/node_modules/**/*.flow"
- "!**/node_modules/**/tsconfig.tsbuildinfo"
- "!**/node_modules/**/{test,__tests__,tests,powered-test,example,examples}"
asarUnpack:
- dist/bin/ffmpeg.exe
- dist/bin/ffmpeg
- dist/doc/**/*.*
electronLanguages:
- en-US
linux:
icon: resources/icon.png
category: Visualization
target:
- AppImage
extraFiles:
- from: build/Release/libsymspg.so.2.3.2
to: dist/libsymspg.so.2
mac:
artifactName: "${productName}_${version}.${ext}"
target:
- dmg
win:
target:
- target: nsis
arch:
- x64
artifactName: ${productName}-${version}-setup.${ext}
extraFiles:
- from: build/Release/symspg.dll
to: .
nsis:
oneClick: false
perMachine: true
selectPerMachineByDefault: true
allowToChangeInstallationDirectory: true
deleteAppDataOnUninstall: false
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
What I'm missing? Thanks!