Comments (24)
Okay well thanks for your help. I will keep using chroot for now, and will maybe as the Postmarket OS team a package request.
from webcord.
A flatpak would also work, pmOS seems to be able to use those even if they use glibc, maybe they are statically compiled?
from webcord.
Is your feature request related to a problem? Please describe.
I'd really like to be able to use Discord on my Pinephone, but the only OS that works well for me is PostmarketOS with SXMO.Describe the solution you'd like
Please make an APK package for Alpine aarch64, it would allow PostmarketOS and Alpine users to install on aarch64 devices.Describe alternatives you've considered
I've considered packaging it myself, but I'm having trouble understanding how, both how to package an Electron app, and how to crosscompile for PostmarketOS.
Have you considered using the AppImages instead? They are supported by almost any distribution that supports FUSE mounting.
As of native format, it is possible to extend Electron Forge capabilities by writing a script called maker. As AFAIK electron-builder
supports APK files, there's a chance that an upstream package (that is used in AppImage maker for packaging as well) called app-builder
will support it as well, allowing for making a similar implementation as in case of AppImage format.
If you wish to, you could even start a new issue in Electron Forge bug tracer about APK support.
from webcord.
Unfortunately AppImage doesn't work on musl libc based distributions. I'll have a look at electron-builder. This program you made just seems perfect for Pinephone!
from webcord.
Unfortunately AppImage doesn't work on musl libc based distributions. I'll have a look at electron-builder. This program you made just seems perfect for Pinephone!
You can always run it directly from the sources (without packaging at all) – just clone repository, npm i
and npm start
and it should have run without any issues! I can always provide ZIP releases for Linux as well.
Could you create an issue on Electron Forge repository about that? This is rather an Electron Forge not supporting your package standard rather than an issue or feature that needs to be implemented within WebCord. Also, I do not recommend using electron-builder
, it has poor support for ARM devices with distribution-specific packages (I couldn't package it for DEB package standard once I've tried to do that on Raspberry Pi)...
Personally, I could create a such maker, but I would need some information about Alpine Linux package standard – is there any documentation describing how to package stuff to APK format? If not, I'll probably won't be able to help you...
Also, you could you share what's not working and where it fails with AppImages? If that's the runtime, maybe you just need rebuild it?
from webcord.
It doesn't run with npm i && npm start
unfortunately, I can get a log and upload it if that'll help. I can share the stuff on alpine packaging as well. And maybe making a maker wouldn't be too hard?
AppImage is known to not work on Alpine unfortunately.
from webcord.
2021-08-13T19_33_18_072Z-debug.log
2021-08-13T19_33_29_713Z-debug.log
from webcord.
If it doesn't run with npm i && npm start
, I doubt you will be able to package it.
Also, could you give me less verbose logs, like terminal output? I would like to see what it does, but analyzing whole verbose output is and understanding what's going on is time-consuming...
from webcord.
I can get less verbose logs later today. But one thing I thought of, have you considered Flatpak? It's a great way to package apps for any distro, even musl libc ones like Void Linux or Alpine/PostmarketOS. I've so far found that it works on everything, I'm not sure how. AppImage is apparently going to be able to work too, once they reach version 3.
from webcord.
I can get less verbose logs later today. But one thing I thought of, have you considered Flatpak? It's a great way to package apps for any distro, even musl libc ones like Void Linux or Alpine/PostmarketOS. I've so far found that it works on everything, I'm not sure how. AppImage is apparently going to be able to work too, once they reach version 3.
I don't think that solves the issue through, unless it will use the same enviroment that is needed to make Electron work... Personally, I could release a Flatpaks in form of the files if that's possible for their standard (Snaps support that for instance, it has it's own GLIBC version AFAIK and also works in other distributions as well and I could even package to this format as well due being officially supported by Electron Forge developers).
from webcord.
There is this. I'm not sure it will be any help but hopefully.
https://docs.flatpak.org/en/latest/electron.html
from webcord.
Ok, so I noticed what fails from your logs:
2212 error make: g++: No such file or directory
The issue is caused by lzma-native
NPM package not providing the native modules for your enviroment nor being possible to be compiled due to lack of the GNU C compiler...
The possible workaround would be to relative symlink musl-g++
to g++
like this:
ln -sr /usr/bin/musl-g++ /usr/bin/g++
(try same for musl-gcc
if it still fails)
As of Flatpak, I may reconsider providing them in the future, but it will take me time to adapt my configuration for it. I would propose you then to report issue to the lzma-native project, so you will be fine using Electron Forge as well.
EDIT: Testing on the Alpine Linux, you need to install a GNU compiler set to be able to compile stuff:
apk add build-base
from webcord.
@Silent-Hunter Not sure if you noticed the edits, I thought earlier that programs like g++
are unavailable for musl-based Linux distributions, but in fact I was wrong and after a further testing I did found a possible fix to that is caused npm i
falling...
You may consider why compiling is needed at first place, the thing is that many native C/C++-based modules don't come statically linked, thus you can't use them as of the binaries on your musl-based OS, so it will fallback to node-pre-gyp
that will handle compiling them to your native architecture... As of other problems that you may encounter is that Electron itself might be needed to be recompiled with musl libraries to work as well, so you may except a long time of the installation due many native modules needed to be compiled...
Also, this Electron issue seems to be relevant.
from webcord.
webcord.log
Here's what it does now.
I think I'm going to try making a debian chroot.
from webcord.
It works in a chroot. Still, if packaging it for flatpak isn't too difficult, I'd recommend it.
from webcord.
It works in a chroot. Still, if packaging it for flatpak isn't too difficult, I'd recommend it.
I need to give it a time, as I don't know how I should configure it...
It's not impossible task, but I would need to understand a concepts on it, so I would know exactly how I should package it...
That being said, I'll probably enable Snaps and Flatpaks in WebCord v2.0.0...
from webcord.
webcord.log
Here's what it does now.
I think I'm going to try making a debian chroot.
Checking the logs, you're using outdated WebCord version... Master had a huge update up to beta v2.0.0, where the start command should be:
tsc && electron .
I changed that due I don't use the native C modules, so there's no reason why I would need to use Forge to handle rebuilding them...
As this seems to fail on Electron Forge, you may give it a try and update to the latest version of the WebCord with git pull
and try npm start
again...
from webcord.
Chroot works extremely well, so I'm just going to use that. Thank you for making this!
from webcord.
Chroot works extremely well, so I'm just going to use that. Thank you for making this!
I still want to make sure it can work for the libc musl library directly, so you can use my app with the libraries that are installed on the OS (and not those took from Flatpaks or chroot). This should make my app take much less space...
As you already installed the dependencies with npm i
, you probably won't need to npm i
again and compile the native modules after you update to newer WebCord version (even if it is there a new dependency, it is currently unused so there's no need to install it).
from webcord.
Okay I will give it a try when I get home.
from webcord.
webcord.log
This is what it does now. Unfortunately I have no experience with Electron development so I'm not sure how to fix it.
from webcord.
That seems to be an issue with the Electron binaries missing for musl-based Linux distributions. At first I thought that it would compile somehow with the magic of the scripts
, but I doubt that would be possible for the low-end devices due to high Electron requirements for the build machine specification (it's just the same pain as building Chromium).
Unfortunely, I got issues packaging for Snaps and Flatpaks via Electron Forge makers, at least without changing its configuration. For that reason, I doubt I'll enable them for now.
For that reason, I'll flag this issue as wontfix
and close it. If something has changed, e.g. Electron has started to provide official builds for musl, you can still post the information here (it will notify me).
from webcord.
as electron21 is aparently merged into alpine repos ( https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/40094 ) would you package for it now?
from webcord.
as electron21 is aparently merged into alpine repos ( https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/40094 ) would you package for it now?
That would require to implement a maker of APK format, which will bundle my app in way it can be distributed as an Alpine package. But that information gives some more hope for it to be done, although I am not sure if I'll be able to package it on my own, considering I don't know how Alpine packages stuff at all. l still might consider to work on as a part of Reforged project (Electron packaging is outside of WebCord's scope).
As of now, anyone could extract app.asar from any distributable from the repositories and use electron
to run it, or just build WebCord from scratch (it should be possible, given you won't try to download electron
binaries from NPM, but only just types it provides for TypeScript) and use electron
for running it after it is being transpiled to JavaScript.
Also please take a look at some notes from Support.md
(both a section about musl libc support and tips about running WebCord on FreeBSD):
Some Linux distibutions seem to provide Electron packages and in that case, it should be possible to run WebCord on them without any issues (...)
After you install a specific Electron package (e.g.
electron19
), you can extractapp.asar
from any distributable (most likely from Windows or Linux ones) and run it in terminal with installed system-wide Electron:electron$v $path(Replace
$v
and$path
with actual version number and path to the extractedapp.asar
.)
from webcord.
Related Issues (20)
- [Linux] Give the microphone input and the stream audio input streams unique names HOT 7
- Add streaming quality 1080p and higher HOT 6
- "Automatic Gain Control" does not work HOT 4
- Change User-Agent option for privacy HOT 1
- [Windows] About page is missing version information HOT 1
- Screen Sharing broken 4.7.0 HOT 16
- Poor performance on Hyprland + Nvidia HOT 1
- Clear cache option
- Links generated by the "open in browser" function aren't accepted by the CDN HOT 2
- Take Ownership of the io.spacingbat3.webcord Flathub repo HOT 7
- RPM package cannot be installed on Mageia 9 HOT 1
- UncaughtException: WebCord threw 'SyntaxError' HOT 1
- Webcord RPM package cannot be installed because headers are not signed. HOT 2
- Activites do not load due to the Content Security Policy HOT 3
- Font size
- Webcord crashed, now crashes on startup. HOT 2
- Drag and drop breaks mouse on Wayland HOT 6
- Ctrl+Tab does not work
- Disable startup webcord splash screen HOT 3
- Custom CSP configurable by the user HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webcord.