Support for building different arch's such as Rpi / Arm #105

Open
opened 2026-01-29 16:30:59 +00:00 by claunia · 0 comments
Owner

Originally created by @Hecatron on GitHub (Jan 11, 2018).

Originally assigned to: @robertmuehsig on GitHub.

Hi,
I've been experimenting to see if I can get the demo app to build then run on a Rpi with ubuntu mate installed (17.10), I've managed to get it working.
But I'd like to request if we could specify different arch's in the options / arguments to electronize build though to make it easier

I've included some info below for anyone that wants to have a go.

Build for Linux X64

First run electron build for linux-x64

dotnet build
dotnet electronize build linux

Build for Linux arm

Next run dotnet publish specifying the arm arch

dotnet publish -r linux-arm --output "obj\desktop\linux-arm\bin"

Next copy over the api directory / main.js / package.json

cd obj\desktop\linux-arm
xcopy ..\linux\api .\api
xcopy ..\linux\main.js .\
xcopy ..\linux\package.json .\
xcopy ..\linux\package-lock.json .\

Next run npm

npm install
npm install electron-packager --global

Finally manually generate the package

electron-packager . --platform=linux --arch=armv7l --out="electron-packager . --platform=linux --arch=armv7l --out="..\..\..\bin\desktop-arm" --overwrite" --overwrite

Deploying to the Rpi

  • At this point zip up the files under bin\desktop-arm
  • copy across to the Pi
  • unzip on the Pi

Setting up on the Rpi

If you get an error regarding MIT-MAGIC-COOKIE-1 then just try

rm ~/.Xauthority

If this has been built under windows instead of Linux
Then once you've unzipped the contents onto the rpi box you need to make ElectronNET.Host executable. But there's also other files that need to be made executable as well (not exactly sure which ones) to avoid other random errors.

To get around this cd into the directory where you've extracted the files and just make everything executable as a quick workaround

find . -exec chmod +x {} \;

At this point you should be able to run with just

./ElectronNET.Host

I would add this to the wiki but I don't think it's open for public access

Originally created by @Hecatron on GitHub (Jan 11, 2018). Originally assigned to: @robertmuehsig on GitHub. Hi, I've been experimenting to see if I can get the demo app to build then run on a Rpi with ubuntu mate installed (17.10), I've managed to get it working. But I'd like to request if we could specify different arch's in the options / arguments to electronize build though to make it easier I've included some info below for anyone that wants to have a go. ## Build for Linux X64 First run electron build for linux-x64 ``` dotnet build dotnet electronize build linux ``` ## Build for Linux arm Next run dotnet publish specifying the arm arch ``` dotnet publish -r linux-arm --output "obj\desktop\linux-arm\bin" ``` Next copy over the api directory / main.js / package.json ``` cd obj\desktop\linux-arm xcopy ..\linux\api .\api xcopy ..\linux\main.js .\ xcopy ..\linux\package.json .\ xcopy ..\linux\package-lock.json .\ ``` Next run npm ``` npm install npm install electron-packager --global ``` Finally manually generate the package ``` electron-packager . --platform=linux --arch=armv7l --out="electron-packager . --platform=linux --arch=armv7l --out="..\..\..\bin\desktop-arm" --overwrite" --overwrite ``` ## Deploying to the Rpi * At this point zip up the files under bin\desktop-arm * copy across to the Pi * unzip on the Pi ## Setting up on the Rpi If you get an error regarding MIT-MAGIC-COOKIE-1 then just try ``` rm ~/.Xauthority ``` If this has been built under windows instead of Linux Then once you've unzipped the contents onto the rpi box you need to make ElectronNET.Host executable. But there's also other files that need to be made executable as well (not exactly sure which ones) to avoid other random errors. To get around this cd into the directory where you've extracted the files and just make everything executable as a quick workaround ``` find . -exec chmod +x {} \; ``` At this point you should be able to run with just ``` ./ElectronNET.Host ``` I would add this to the wiki but I don't think it's open for public access
claunia added the Feature label 2026-01-29 16:31:00 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#105