I am currently developing a application for the raspberry pi which requires the AppImage to be in ARM format. It would be nice if i could build my application in ARM format with electron-builder.
Is there already any progress on this feature? Or is there any way how i can help to include this into electron-builder?
If I try to build on the raspberry pi, there is no 7za binary. So I think that would be the first thing to attempt (./node_modules/7z-bin-linux/armv7l/7za would be required as part of the 7z-bin-linux package)
If I try to build on my mac, the resulting AppImage binary is for x86-64, not for the intended armv7l...
matt$ yarn run dist
yarn run v0.19.1
$ build --armv7l --linux
Skip app dependencies rebuild because platform is different
Packaging for linux armv7l using electron 1.6.10 to dist/linux-armv7l-unpacked
⚠️ Application icon is not set, default Electron icon will be used
Building AppImage for arch armv7l
✨ Done in 43.10s.
matt$ file dist/electron-0.1.0-armv7l.AppImage
dist/electron-0.1.0-armv7l.AppImage: ELF 64-bit LSB executable, x86-64, version 1, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=c271a1d61198e53b90595d8bf0a7d50a57e0a53e, stripped
Please note I have only been using this for less than a day, so I may be missing something.
Right. So after another day I have realised that AppImage does not have a valid target for arm, so this is not an electron-builder issue. (yet)
no 7za binary
For now you can set env USE_SYSTEM_7ZA=true and system 7za will be used (so, simply install manually).
Right. So after another day I have realised that AppImage does not have a valid target for arm, so this is not an electron-builder issue. (yet)
What do you mean by this? AppImages can be built for ARM, e.g., here are builds of appimagetool for ARM:
http://download.opensuse.org/repositories/OBS:/AppImage/toolchain.arm/aarch64/ (64-bit ARM)
http://download.opensuse.org/repositories/OBS:/AppImage/toolchain.arm/armv7hl/ (32-bit ARM)
And here are some test AppImages for ARM:
http://download.opensuse.org/repositories/OBS:/AppImage:/Templates/AppImage.arm/
@develar I'm having the same issue as @mattsoftware but on the Raspberry PI itself. When I run the build I get no error, but the executable doesn't seem to be built for the right architecture.
pi@raspberrypi:~/projects/myapp $ npm run dist -- --armv7l
[email protected] dist /home/pi/projects/myapp
build "--armv7l"No native production dependencies
Packaging for linux armv7l using electron 1.6.15 to dist/linux-armv7l-unpacked
Building AppImage for arch armv7l
pi@raspberrypi:~/projects/myapp $ file dist/myapp-1.0.0-armv7l.AppImage
dist/myapp-1.0.0-armv7l.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=...
The machine itself seems to be using the right architecture:
pi@raspberrypi:~/projects/myapp $ uname -a
Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux
Has anyone been able to successfully build an AppImage for armv7l using electron-builder, or is it a feature still under development? In the latter case I'd like to contribute, is there a todo list on the subject?
Best regards.
@Yovar If you want to help — please provide a link (or setup docker container to build) to runtime for ARM. Officially this file is not provided, only runtime-i686/runtime-x86_64.
When runtime will be provided, I will fix https://github.com/electron-userland/electron-builder/blob/master/packages/electron-builder-lib/src/targets/AppImageTarget.ts#L99 and bundle it as a part of our distribution.
openSUSE is building it for 64-bit and 32-bit ARM:
https://download.opensuse.org/repositories/OBS:/AppImage/toolchain.arm/
Inside the appimagetool package, you'll find usr/lib/appimagetool/runtime. But please do check its version, as it may be outdated, in which case we should ask them to build the latest one in order not to re-introduce bugs we have already fixed.
Yes, I have already checked — latest for arm is 12 oct. is it outdated?
Unfortunately yes. Ping @adrianschroeter, I thought it would build the latest one from GitHub?
Both, linuxdeployqt and also AppImageKit (providing runtime binary) are following now directly your git master.
(linuxdeployqt was build failing and AppImageKit was set to frozen)
@probonopd part of the problem was that there is still a patch needed to specify the own build version of mksquashfs. And that breaks easily on code changes.
It would be nice if the mksquashfs binary location could become a configure/compile time option.
It would be nice if the mksquashfs binary location could become a configure/compile time option.
Do I understand it correct that you would like it to __not__ pick up the one on the $PATH but give preference to a different one, e.g., in something like lib/appimage/mksquashfs, @adrianschroeter?
@probonopd that is correct. This is my current patch for reference:
https://build.opensuse.org/package/view_file/OBS:AppImage/AppImageKit/own-mksquashfs.patch?expand=1
I have to admit that I don't know if we can make our normal mksquashfs working, but this way it should be safe to be used atm.
Fixed in upcoming 19.53.1 Please try, because I cannot perform integration test.
Hi develar, I try to build appimage for rpi on lubuntu. I get the error unsupported arch arm message.
@adrianschroeter Could you please update https://download.opensuse.org/repositories/OBS:/AppImage/toolchain.arm/? Latest 5 Feb, but https://github.com/AppImage/AppImageKit/releases/tag/11 was released last month.
Hi @develar . I'm pretty sure you meant to ping @adrianschroeter instead?
Most helpful comment
For now you can set env
USE_SYSTEM_7ZA=trueand system7zawill be used (so, simply install manually).