[multi] Improve native package compilation and docs #1904
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main goals for this commit are:
This is basically the result of trying to run the latest version on raspberry pis, while testing and maintaining compatibility to the other platforms.
With SPV suport in the wallet, it's now become possible (if not yet terribly practical) to run decrediton on the latest Raspberry PIs. The main challenge was getting the native modules to compile on the arm7l arch using electron runtime (while ensuring other platforms weren't broken in the process).
In the end, the following changes were required:
dependencies
tooptionalDepencies
. It's pretty much hopelessly broken in electron@arm, so it's install is simply ignored. This package isn't terribly needed anyway, given that the only point of this is to install protoc, and any dev that needs to run protoc to update the grpc in decrediton is likely to have it installed in the system anyway. I'd even vote to drop it completely as a dependency.<windows.h>
and therefore won't fail to compile (in effect, generating an empty module).rebuild-natives
script, to be called on non-standard platforms so that the native modules are rebuilt targeting electron. This is was an added difficulty for trying to run on PI, because the module would usually target the node runtime instead electron, also causing all sorts of problems. This script causes the native modules in the app dir (which is the package the actually requires grpc - trying to rebuild the modules from the root dir doesn't work) to be correctly rebuilt in the current platform.