mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 13:44:47 +00:00
How to build a Desktop app for a linux? #817
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ZedZipDev on GitHub (Jul 18, 2022).
I build my app for win
and find 2 folders:
bin\Release\net5.0\win-x64
and
\bin\Desktop\win-unpacked.
When I run exe from the 1st folder I see the server console only. and if I use query in a browser http://localhost:5000 I see the page but abs not formatted. Ok.
But when run exe form the 2nd folder - I have what I need: desktop app.
When I build
@ZedZipDev commented on GitHub (Jul 18, 2022):
This is my log.
FInally I have a folder:
bin\Desktop\linux-unpacked but it contains subfolder \resources only
What I do wrong?
Determining projects to restore...
Restored D:\MyProjects4\Blazor\NET501_Blazor_ElectronNET\blazor-desktop-crossplatform-sample-master\src\WebviewAppShared\WebviewAppShared.csproj (in 280 ms).
Restored D:\MyProjects4\Blazor\NET501_Blazor_ElectronNET\blazor-desktop-crossplatform-sample-master\src\BlazorDesktopTest\BlazorDesktopTest.csproj (in 358 ms).
WebviewAppShared -> D:\MyProjects4\Blazor\NET501_Blazor_ElectronNET\blazor-desktop-crossplatform-sample-master\src\WebviewAppShared\bin\Release\net6.0\WebviewAppShared.dll
BlazorDesktopTest -> D:\MyProjects4\Blazor\NET501_Blazor_ElectronNET\blazor-desktop-crossplatform-sample-master\src\BlazorDesktopTest\bin\Release\net6.0\linux-x64\BlazorDesktopTest.dll
BlazorDesktopTest -> D:\MyProjects4\Blazor\NET501_Blazor_ElectronNET\blazor-desktop-crossplatform-sample-master\src\BlazorDesktopTest\obj\desktop\linux\bin\
Start npm install...
npm install --production
npm WARN config global
--global,--localare deprecated. Use--location=globalinstead.npm WARN config production Use
--omit=devinstead.npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
added 69 packages, and audited 70 packages in 2s
found 0 vulnerabilities
ElectronHostHook handling started...
Build Electron Desktop Application...
Executing electron magic in this directory: D:\MyProjects4\Blazor\NET501_Blazor_ElectronNET\blazor-desktop-crossplatform-sample-master\src\BlazorDesktopTest\bin\desktop
Create electron-builder configuration file...
node build-helper.js electron.manifest.json
Package Electron App for Platform linux...
npx electron-builder --config=./bin/electron-builder.json --linux --x64 -c.electronVersion=13.1.5
npm WARN config global
--global,--localare deprecated. Use--location=globalinstead.ΓÇó electron-builder version=23.1.0 os=10.0.19044
ΓÇó loaded configuration file=D:\MyProjects4\Blazor\NET501_Blazor_ElectronNET\blazor-desktop-crossplatform-sample-master\src\BlazorDesktopTest\obj\desktop\linux\bin\electron-builder.json
ΓÇó description is missed in the package.json appPackageFile=D:\MyProjects4\Blazor\NET501_Blazor_ElectronNET\blazor-desktop-crossplatform-sample-master\src\BlazorDesktopTest\obj\desktop\linux\package.json
ΓÇó packaging platform=linux arch=x64 electron=13.1.5 appOutDir=D:\MyProjects4\Blazor\NET501_Blazor_ElectronNET\blazor-desktop-crossplatform-sample-master\src\BlazorDesktopTest\bin\Desktop\linux-unpacked
ΓÇó scheduling remote build target=snap arch=x64
ΓÇó scheduling remote build target=appImage arch=x64
ΓÇó 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.
attempt=0
waitTime=2
ΓÇó 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.
attempt=1
waitTime=4
ΓÇó 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.
attempt=2
waitTime=6
Γ¿» 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.
Γ¿» C:\Users\John\AppData\Local\npm-cache_npx\009083ec26dc578f\node_modules\app-builder-bin\win\x64\app-builder.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1 failedTask=build stackTrace=Error: C:\Users\John\AppData\Local\npm-cache_npx\009083ec26dc578f\node_modules\app-builder-bin\win\x64\app-builder.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1
at ChildProcess. (C:\Users\John\AppData\Local\npm-cache_npx\009083ec26dc578f\node_modules\builder-util\src\util.ts:250:14)
at Object.onceWrapper (node:events:642:26)
at ChildProcess.emit (node:events:527:28)
at ChildProcess.cp.emit (C:\Users\John\AppData\Local\npm-cache_npx\009083ec26dc578f\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
From previous event:
at processImmediate (node:internal/timers:466:21)
From previous event:
at RemoteBuilder.build (C:\Users\John\AppData\Local\npm-cache_npx\009083ec26dc578f\node_modules\app-builder-lib\src\remoteBuilder\RemoteBuilder.ts:51:28)
at RemoteTarget.finishBuild (C:\Users\John\AppData\Local\npm-cache_npx\009083ec26dc578f\node_modules\app-builder-lib\src\linuxPackager.ts:105:30)
at async Promise.all (index 2)
at AsyncTaskManager.awaitTasks (C:\Users\John\AppData\Local\npm-cache_npx\009083ec26dc578f\node_modules\builder-util\src\asyncTaskManager.ts:65:25)
at Packager.doBuild (C:\Users\John\AppData\Local\npm-cache_npx\009083ec26dc578f\node_modules\app-builder-lib\src\packager.ts:453:5)
at Object.executeFinally (C:\Users\John\AppData\Local\npm-cache_npx\009083ec26dc578f\node_modules\builder-util\src\promise.ts:12:14)
at Packager._build (C:\Users\John\AppData\Local\npm-cache_npx\009083ec26dc578f\node_modules\app-builder-lib\src\packager.ts:376:31)
at Packager.build (C:\Users\John\AppData\Local\npm-cache_npx\009083ec26dc578f\node_modules\app-builder-lib\src\packager.ts:337:12)
at Object.executeFinally (C:\Users\John\AppData\Local\npm-cache_npx\009083ec26dc578f\node_modules\builder-util\src\promise.ts:12:14)
... done
PS D:\MyProjects4\Blazor\NET501_Blazor_ElectronNET\blazor-desktop-crossplatform-sample-master\src\BlazorDesktopTest>
@ZedZipDev commented on GitHub (Jul 22, 2022):
Anybody from Electron.Net team can help?
@ZedZipDev commented on GitHub (Jul 22, 2022):
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
@win32nipuh commented on GitHub (Jul 26, 2022):
How to fix it? Anybody can help?
Or my be it is impossible to build Linux app in WIndows?
@vinnaykulkarni commented on GitHub (Aug 1, 2022):
@win32nipuh
I am not an expert on Electron though, trying to build a Linux app in Windows could be a good idea, try with the Linux subsystem on Windows
@Oleg26Dev
If you could mention details about which Linux distribution you are working on would be a more input for the community members to help you, as per my experience the builds do have some variations with different distributions. Also, check if your app is getting built properly without Electron or maybe at baseline, it has some issues.
@ZedZipDev commented on GitHub (Aug 1, 2022):
@vinaykulkarni89 Yes, but I use Windows+VS2022 and would like to build
electronize build /target win
electronize build /target osx
electronize build /target linux
in my OS, also it is declared possibility of the Electron.
@ZedZipDev commented on GitHub (Aug 16, 2022):
Hello everybody, what about this issue?
@Cav-jj commented on GitHub (Sep 20, 2022):
I compiled a version on linux using vs Code with the latest Nodejs 18.9.x
can't compile it on windows have to be a linux mashine for it to work on linux
don't know if wsl works
@ZedZipDev commented on GitHub (Feb 13, 2023):
I have tried again. it repeats:
Γ¿» 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.
What is it? how to ix it?
@DarioChele commented on GitHub (Mar 21, 2023):
Hi, maybe you should try to mount a linux distro on a VMBox, then make a new tiny app (lets call it "TestApp") , just for test, copy all the files realted to "TestApp" from your win machine to the Linux VM, and build ur app using the console it in the VM.., and see what happens..
@GregorBiswanger commented on GitHub (Mar 28, 2023):
🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉
With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!
@connorsanders1 commented on GitHub (May 9, 2023):
I am also having this problem. I updated the CLI to 23.6.1 and when I try to build for Linux on Windows, I get:
ΓÇó cannot get, wait error=Get "https://service.electron.build/find-build-agent?no-cache=1i5lfuj": dial tcp 51.15.76.176:443: connectex: No connection could be made because the target machine actively refused it.
attempt=0
waitTime=2
Is it not possible to build for Linux on a Windows machine?