app-builder icon indicating copy to clipboard operation
app-builder copied to clipboard

Support for more prebuild systems

Open Julusian opened this issue 2 years ago • 2 comments

This application is doing a lot of work to invoke prebuild-install correctly, but does not for any other prebuild system. It falls back to relying on either npm rebuild or invoking yarn run install for dependencies.

However, when cross-compiling (eg for arm mac from intel), it is not setting npm_config_platform or npm_config_arch, so the yarn run install gets run for the host architecture rather than the target architecture. Or the other related variables.
It feels like those variables should be defined when invoking either npm rebuild or yarn run install.

I am also wondering why does prebuild-install need such special treatment? It listens to those same variables, so it feels like it should be possible to let it use the same code flow. A good example of why is https://github.com/lovell/sharp, because it does a pre-step of downloading the correct libvips dll/so files, before invoking prebuild-install. Which means that this application is only doing half of the rebuild for that library

Julusian avatar Apr 15 '22 17:04 Julusian