-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LaserWeb4 development, Linux, the universe and everything #590
Comments
You are very welcome to contribute and care about the AppImage! Unfortunately most devs have left the project and I don't know much about linux. |
Ok, why not. Unfortunately I don´t have much experience with the AppImage ecosystem (and also I am a physician in COVID-19 stress). However, Linux and CNC is my hobby for relaxation. Anyone know a good "quick and dirty" tutorial for packaging nodejs-Applications into .AppImage or .deb? |
A good starting point should be |
You should also check https://github.com/LaserWeb/lw.comm-server, especially the scripts in package.json and the docker files. |
Might I suggest packaging it into a docker image? Would probably be much easier than packaging it as a deb. |
Trying to build the AppImage. (...) gm convert: Unable to open file (/tmp/electron-builder-N3DabI/0-2-linux.iconset/icon_128x128x32.png) [File not found]. Am I missing a git submodule or repository with the image/icon resource-files...? |
Ok.
You have to manually open 127.0.0.1:8000 in your browser to open the GUI in this build. |
I'll try to create a patch for the build problems in the next few days. How can I submit the patch? |
will this be able to run on a raspberry pie ? would it be possible to test it on that ? |
There is a installation guide for rasperry pi on the wiki! The server part (lw.comm-server) can run on a raspberry pi without problems, but the web frontend needs a lot of memory and should be run on a real pc (linux, win, osx). |
What about using Docker? #595 |
Thank you Daniel, it's ist working fine with Docker - also on raspberry pi. |
Hi, I am on Arch and the docker way did not work, in that it cannot read the devices. I tried to run with --privileged, specifying the dev, and some other ways, but none worked. I suspect it does not work on Linux at all. So, I investigated other ways and came up with a few solutions. At the end, I also built some Arch PKGBUILDs (for latest tag and git) that automatically builds the appimage and integrate it into Arch environment. I noticed that something was taken from the janschiefer's pull request, but all the icons are still missing. Maybe that pull should be rechecked. In my appimage version, browser opens automatically together with a console for the server. There are situations in which one closes the browsers and the server still runs in the background, with no way to close it. So, I found it better to have it visible. I preferred to integrate the appimage directly in Linux system rather than rely on its integration method. However, one can also launch the appimage alone, and despite not being integrated it will launch the browser. I add a small modification to server.js to achieve that. So, here are my notes, which can be applied to other Linux systems also (maybe something can be integrated in the documentation): LaserWeb4 on Arch
RUN: To run the server + app only Appimage creation via electron-builder(https://github.com/LaserWeb/lw.comm-server/pull/80/files)
RUN: To run the server + app only Tools
PKGBUILDs for Arch |
I've just created a pull request to fix the dockerfile #647 The package server is indeed flawed. It seems node-gyp isn't able to have access to the system ports and fails, even with root permissions. |
@joesantosio I've merged your pr #647 About the system ports. Could this be caused by missing/incompatible libusb and libudev, as @QuirkyCort wrote in issue #648? |
@cprezzi so I've created the docker image under my user. We can change it for a I set up a PR to modify the Did anyone test a higher version of node? 10 is quite low and it should be bumped. |
Right now i'm running on @easytarget fork that has newer nodejs version with good success. My understanding is it was quite some work. Idea is eventually pull easytarget version back into the main LaserWeb4. @easytarget : Any idea when you'll release you'll issue a pull request? |
Sure, when the @easytarget fork is ready we will pull it over to LW. |
@cprezzi by the way, I don't have other way to communicate with you, I am starting the work on a decoupled API in Go. |
@joesantosio The actual servrer uses node 12 and it also seems to be working with node 18 (according to #648). |
@joesantosio Why do you think we need a go version? |
First of all, I don't think we need per se a Go version and take all of the next rant as an opinion and nothing more than that. In my opinion, we do need a fully decoupled backend from the frontend. The communication is already in place for this to happen and it makes it easier and more flexible to have that separation. You can have the frontend wherever you like running wherever you like and the backend, could run even on a smaller microcontroller (theoretically). Being decoupled also means that the server doesn't depend so much on the frontend and vice-versa which means that you can make better changes on either stack, you can assign people for more frontend or more backend and things tend to evolve a bit faster in that environment because the modularization helps to understand the development thinking. Since, in my opinion, this is a good change, better to do it "right" this time around (not saying it is "bad", just that it could be "better". Architecture is one thing where I think things could be improved. A pattern similar to DDD for example for better separation of concerns and modularization in general. I just find Go to be a better overall language and experience for the backend side of things. |
This all said, I am just dwelling with that idea of Go. I do think, again in my opinion, that at least TypeScript should be used but probably the first steps would be to setup the architecture, decouple, modularize and unit tests so it stays stable regardless of the language. |
The backend is alredy decouppled. It just has the option to embed the web frontend and serve it via http. Only socket.io is a dependency that both (frontend and backend) need, everything else is independant. If you want a pure backend, you can just drop the http server and delete the app folder. But I prefer to have the option of an embedded website for LaserWeb or any other frontend, because it is very convenient for the user to not have to install any frontend app and just use a webbrowser. It also gives us the option to compile a standalone exe (frontend with integrated backend) with electron. I would also like to generate a version with an embedded generic "machine control" or "gcode sender" frontend (like octo-pi). The backend is quite simple. Basically a socket to serial gateway. I don't see the need for changing much on the backend side. Ok, it's not modular at all, but it's quick to maintain (at least for me ;) ). I see much more need for maintenance and development in the frontend. @easytarget already started a new version with updated dependancies and additional features. We need to discuss what's next when his version is releasd. |
Yes I can see the advantage of having the same package with all. I think there are ways though to still maintain the all-in-one package with both decoupled. Well... it isn't really that easy to maintain as is :p but I understand you. I was thinking on just making a simple PR proposition on how I see this working (foregoing the Go and language change at the first instance) but since someone else is already working on a reviewed version, starting from there makes perfect sense. |
LaserWeb4 seems to have dropped support for Linux a while ago. This is a major problem for many users, since LaserWeb is the only "serious" laser engraving solution for GRBL users out there.
However I cannot really comprehend this, since I am able to run the program without major issues on Linux, using the current development branch dev-es6 from 12th April of 2020.
Just run:
npm run installdev (installs all dependcies)
npm start (compiles and starts the server + app)
...and you are ready to go.
The only thing I have to figure out yet, is how to build an proper AppImage or .deb from the current development branch...
Any comments or suggestions?
BTW: I'm using Ubuntu Focal beta pre-release.
The text was updated successfully, but these errors were encountered: