Packaging a GladeVCP plugin for others to use?

More
30 Jan 2023 03:30 #263206 by JetForMe
This is a more generic question than GladeVCP, but I'm building my panel in Glade/GTK, and wasn't sure if there was a better place to ask.

How does one package up a VCP that has additional dependencies to make it easy for someone else to integrate? I'd like to make it as easy as possible for someone else to download and install the collection of files, and to download the dependency modules (which are all available via pip). I don't want to go so far as to try to modify their .ini files or UI; I just want to make sure all the necessary pieces are there so the minimum they have to do is add a line to their .ini file to add my VCP.

Please Log in or Create an account to join the conversation.

More
30 Jan 2023 07:15 #263216 by rodw
Its a bit of a mystery to me too. There are some tutorials around. Heres one random one
www.makeuseof.com/create-deb-packages-debian-ubuntu/
But you will get tangled up with security keys and so will any user

An alternative could be to script it as james has done here for qtpyvcp pn Debian Bullseye
github.com/joco-nz/lcnc-bullseye-installer
I sometimes use it just for convenience.

Please Log in or Create an account to join the conversation.

More
30 Jan 2023 07:29 #263217 by JetForMe
Oh hmm. I didn't mean so much a debian package. I was thinking more of a Python package. But I suppose that might actually be sufficient, it just needs to install everything system-wide, since it doesn't seem like there's a way to tell LinuxCNC to use a virtual environment. That's probably fine.

That script might have some clues though. I see lines like `python3 -m pip install -e .` in it.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
30 Jan 2023 09:37 - 30 Jan 2023 09:49 #263220 by JetForMe
So, I set up a VM on Debian 12, and things are better and worse. I seem to have to set PYOPENGL_PLATFORM="osmesa" to avoid getting a "NotImplementedError: Platform does not define a GLUT font retrieval function" error when I try to launch gladevcp or my scaffold. Once I set, my scaffold launches, but gladevcp throws an error down in OpenGL stuff saying "AttributeError: 'NoneType' object has no attribute 'glGetError'". Not sure how to fix this.

Another weird thing: Most X11 apps behave as you might expect, opening windows on my Mac. But gladevcp and my little scaffold app open the windows in the VM, on this Debian 12 VM. On the Debian 11 VM, they do the right thing (open on the Mac). This is when launched in a shell via `ssh -X`.
Last edit: 30 Jan 2023 09:49 by JetForMe.

Please Log in or Create an account to join the conversation.

More
30 Jan 2023 10:56 #263223 by rodw
Ah I forgot, there is a current issue as of november 2022. try adding
export PYOPENGL_PLATFORM=x11
to your .profile

refer to
github.com/LinuxCNC/linuxcnc/issues/2264
and this pull request as of today referred to in above link
github.com/LinuxCNC/linuxcnc/pull/2314

So if you wanted to contribute I'm sure they would welcome some help to migrate to EGL Seems like its up your alley :)

I have been installing XFCE which is X11 to work round this issue. you can do this with tasksel (might need to install it first)
I think Seb shows some screen dumps showing how from the logon screen, you can select to use xorg. (click in password field then click on gear)

Please Log in or Create an account to join the conversation.

More
30 Jan 2023 23:09 #263274 by JetForMe

Please Log in or Create an account to join the conversation.

More
30 Jan 2023 23:12 #263275 by JetForMe
ARGGGHHH Kahuna just ate my tedious reply. I hate this forum software.

Attempting to re-create:

I don't know what EGL, XFCE, or "using xorg" are/mean. But I might make a PR for all those strncpy() warnings.

Even with the export, I get two different errors, depending on if I'm logged in via ssh or directly on a console. Via ssh:

(gladevcp:161022): Gtk-WARNING **: 15:06:38.183: GtkPlug only works under X11

Via console:

NotImplementedError: Platform does not define a GLUT font retrieval function

I can't figure out why the two environments run differently. Afaict, they're set up the same (thought it might be a .bashrc vs .profile issue, but doesn't seem to be).

Please Log in or Create an account to join the conversation.

More
31 Jan 2023 00:10 #263283 by JetForMe
Ah I see my issue is like the one you linked to. I came across that in my googling last night, but thought "bookworm" was some other distro! I should've known it was the codename for Debian 12 (I question the utility of public-facing codenames).

Please Log in or Create an account to join the conversation.

More
31 Jan 2023 08:17 #263313 by rodw
Sorry, I thought you were an old hand at Linux.
XFCE is a graphcal environment for Linux (like gnome) that runs on Debian and other platforms. It is an X11 desktop so wayland is not used..
You can select it when installing bookworm. Ooops Debian 12!
The Linuxcnc live CD uses XFCE so using it kinda makes sense. Apparently its not as resource heavy as others.

If you have already installed Gnome and the Debian default graphical environment, you can install it and other things using a program called tasksel.
sudo apt-get tasksel
tasksel

Note tasksel is used in the text based debian installer

Regardless of the desktop used, On the logon screen if you click in the password field, a gear settings icon appears. (bottom right on Debian default desktop) Here you can choose your desktop and also run a X11 version of the Debian default desktop.. MOre recently I only install xfce and turn the others off even though its not as nice...

Please Log in or Create an account to join the conversation.

More
31 Jan 2023 08:41 #263315 by JetForMe
Haha it’s all good. I have a fair bit of experience with Debian, but 99% of it is on the server, via ssh, and command line. I'm really a macOS guy. I have some understanding of the various desktops and window managers, but I'm not steeped in it.

In any event, I’ve gotten much further along with the updated python-opengl, and settings BOTH of these:
export PYOPENGL_PLATFORM=x11
export GDK_BACKEND=x11

This has solved almost all of the weird issues I was experiencing moving to Debian 12. I'm back to writing actual code and UI, trying to integrate and expand my panel into Axis. So for the moment, I’m not going to switch away from the standard GNOME desktop (and I guess Wayland). But thanks for the instructions!
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

Moderators: mhaberlerHansU
Time to create page: 0.127 seconds
Powered by Kunena Forum