Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using install-app-deps on ARM #2092

Closed
r4zzz4k opened this issue Sep 18, 2017 · 7 comments
Closed

Using install-app-deps on ARM #2092

r4zzz4k opened this issue Sep 18, 2017 · 7 comments
Labels

Comments

@r4zzz4k
Copy link

r4zzz4k commented Sep 18, 2017

  • Version: 19.28.4
  • Target: arm

I'm trying to build an app with some native dependencies on Raspberry Pi 3. While running install-app-deps it correctly detects target arch (default: "arm"), but it's not listed in available architectures. I know that electron-builder build supports --armv7l flag, but is it possible to retarget native dependencies to Electron's Node?

node_modules/.bin/electron-builder install-app-deps

Options:
  --help      Show help                                                [boolean]
  --platform  The target platform
                        [choices: "linux", "darwin", "win32"] [default: "linux"]
  --arch      The target arch   [choices: "ia32", "x64", "all"] [default: "arm"]

Invalid values:
  Argument: arch, Given: "arm", Choices: "ia32", "x64", "all"
@r4zzz4k
Copy link
Author

r4zzz4k commented Sep 18, 2017

Tried to add arm manually to install-app-deps.ts, it seemed to work, but I'm not sure if it actually rebuilt libraries. node-java, which I'm using, seem to support only armv6, but modified electron-builder install-app-deps finished successfully (and electron-builder build failed as expected).
By the way, is there a way to skip specific depdendency rebuilding? I'm not seeing anything useful in config docs.

Edit: I found beforeBuild hook and an example of direct invocation of installOrRebuild, so I'll try to go that route with filtering productionDeps. Anyway, It would be useful to have uniform architecture processing for both build and install-app-deps actions.

@develar develar added the bug label Sep 18, 2017
@develar
Copy link
Member

develar commented Sep 18, 2017

Will be fixed 22 September.

@r4zzz4k
Copy link
Author

r4zzz4k commented Sep 19, 2017

Cool, thank you!

@elboletaire
Copy link

Any news on this?

@r4zzz4k
Copy link
Author

r4zzz4k commented Oct 10, 2017

Sorry for the long delay. I've written simple JS script which basically passing the following flags to electron-builder based on current arch:

const isArm = os.arch().startsWith('arm')
// Flag for install-app-deps:
isArm ? ' --arch all' : ' --arch x64'
// Flag for build:
isArm ? ' --armv7l' : ' --x64'

Of course this is not generic solution as I needed something for my particular usecase. Somehow I managed to build the app for Raspberry, but building process for my project is messy overall, and I didn't have time to investigate much further (you know, tight deadlines as usual). Due to dependency on node-java, which is itself a bit strange in regards of finding needed libraries, I had to have custom build script anyway.

@Mattb230
Copy link

Mattb230 commented Dec 1, 2017

Any updates on this? Still observed in 19.47.1 running on armv71

@mateodelnorte
Copy link

Bump.

@develar develar closed this as completed in 8474d7d May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants