domingoladron / LearnBlazor.ElectronNet

Source code for my article Let's Learn Blazor: Blazor and Electron.net
1 stars 1 forks source link

How to build the app for Linux? #2

Open ZedZipDev opened 2 years ago

ZedZipDev commented 2 years ago

Thank you for the sample. Did you try to build the app for OSX or Linux? I could to build the desktop app for windows, but could not for linux. Also I have created an issue there: https://github.com/ElectronNET/Electron.NET/issues/713

domingoladron commented 2 years ago

Last time I tried (when I wrote the article), Electron.NET was working for both Mac and Linux. If that's changed, then that's a definite pity. I hope they get around to fixing it as one of my big motivations for using Electron.NET was to build a cross-platform app that works everywhere.

ZedZipDev commented 2 years ago

Oh, I see. Thank you. I have tried for lwin, inux and osx. Only for win was ok. The build for linux and osx completed with errors.

ZedZipDev commented 2 years ago

Nobody from Electron.Net team answered me, what do you think: probably uninstall the freshest Electron.Net NuGet and install one of previous one?

domingoladron commented 2 years ago

I'd suggest waiting a couple days. I have raised things which took a wee while for them to get around to answering / fixing.

Also, yes, you could try rolling back a couple versions, see if it comes right.

And what errors did you receive when you compiled linux / mac? Exact commands you used to do the compilation? Were you building them ON a windows machine?

ZedZipDev commented 2 years ago

What I did: I have Blazor+NET 6 app , build it in VS 2022 in WIndows 10. It is my usual dev environment. For example: I use this small app https://github.com/edandersen/blazor-desktop-crossplatform-sample I have built the app and run it^ It is console Web Server and http://localhost:5000 in Chrome: it works fine. Ok, Then I have published it in VS2022 for Linux, copied files to Ubuntu and run the app and browser - it works fine! Especially Water demo . The next step: I build a Desktop exe for windows. Added Electron.Net NuGet, CLI, and run

electronize build /target win Run the *exe and it works fine in Windows. Ok

electronize build /target linux I receive errors, I have attached my log here https://github.com/ElectronNET/Electron.NET/issues/713#issuecomment-1187602000

The end of my story ;-)

ZedZipDev commented 2 years ago

By the way: try to get this app and

electronize build /target linux

domingoladron commented 2 years ago

This appears to be the major issue in play:

ΓÇó cannot get, wait error=Get "https://service.electron.build/find-build-agent?no-cache=1hdasls": dial tcp 51.15.76.176:443: connectex: No connection could be made because the target machine actively refused it.

It appears as the app is being compiled for electron, it's using service.electron.build to build the app, but that service is blocking the call.

ZedZipDev commented 2 years ago

Yes, but what is the 51.15.76.176 ? why it is trying to connect? The link https://service.electron.build/ does not exist too. Btw, no these errors when

electronize build /target win

Elangovan4ever commented 9 months ago

I'm also not able to build for linux. Having same error - process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE.

electronize build /target linux

Able to build for windows successfully. but for linux it doesn't build. Anyone got it work for linux?

domingoladron commented 9 months ago

AFAIK you'd have to use wsl to build it

https://stackoverflow.com/questions/63947006/how-do-you-build-an-electron-net-app-for-ubuntu-platform

domingoladron commented 8 months ago

I tried this myself, and yes, I can confirm building a linux version of your electron.net app does work in WSL.