Closed tobiasmuecksch closed 1 year ago
This is because you're trying to cross-build a native module.
While packaging, electron-builder
automatically downloads the prebuilt binary for your target platform. If we didn't provide prebuilt binaries, your whole build process would fail. That download only contains the native library file better_sqlite3.node
. What actually happens is it runs electron-builder install-app-deps
under the hood and that process compiles the test_extension.node
. It's only used for tests. It won't be created upon a typical installation.
All this means is that the test_extension.node
is compiled for mac and better_sqlite3.node
is compiled for the target platform. It's a complete mess. Yes, electron-builder
can cross-compile but only when complex native modules aren't involved because electron-builder
doesn't actually compile anything native. It's just a packager.
Moral of the story, never ever cross-build apps. Always use CI for that. Take a look at our build workflow. This issue is the same reason why we go through all this trouble to build prebuilt binaries.
@m4heshd Thank you for your in-depth answer. I will revise my build process accordingly.
https://github.com/electron-userland/electron-builder/issues/7652 this is the reason why!
Error Message
Description
When I'm building my application with electron-builder for production; I also need to sign it (of course). This works perfectly fine for macOS. But it fails for windows.
To track this problem down, could you please explain to me what this file is for? Why is it called
test_extension
? Havingtest
in it's name, seems to me as it shouldn't be there.better-sqlite3-multiple-ciphers/build/Release/test_extension.node
Screenshot
System Info
v18.16.0
^8.4.0
25.1.1
24.4.0