Skip to content
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

Remove some broken configs inside configs/sim/gscreen #3096

Closed

Conversation

Sigma1912
Copy link
Contributor

This removes some of the simulation configs in the 'gscreen' folder.
These have been broken and unmaintained for at least two years. Nobody, including the original authors, have shown any interest in maintaining these since.

The simulation configs included in LinuxCNC should showcase the capabilities of the application, which is now part of the debian repository, it seems a rather sad state of affairs to have unmaintained configs that have been failing to load over several releases.

See also #3094

Thank you.

@andypugh
Copy link
Collaborator

andypugh commented Sep 5, 2024

Should probably remove the mention of Silverdragon here, too.
https://linuxcnc.org/docs/stable/html/gui/gscreen.html
(Though it looks like the screenshot shown is actually of QTdragon anyway)

@Sigma1912
Copy link
Contributor Author

Sigma1912 commented Sep 5, 2024

Thanks for pointing that out.

Looking at this again it seems that I might have got myself a somewhat bigger job then expected.

  1. It seems that really only the most basic configs in the main folder are still working:
    'gscreen.ini'
    'gscreen_lathe.ini'
    'gscreen_mm.ini

  2. Given that all other configs (with the possible exception of the three mentioned above) should really be removed there seems to be a question as to what should happen to all the files in 'share/gscreen/' and indeed also all the references in 'src/Makefile':

./src/Makefile:182:    emc/usr_intf/gremlin emc/usr_intf/gscreen emc/usr_intf/pyui emc/usr_intf/qtvcp \
./src/Makefile:681:		$(DESTDIR)$(datadir)/gscreen/images \
./src/Makefile:682:		$(DESTDIR)$(datadir)/gscreen/skins \
./src/Makefile:752:	$(FILE) ../share/linuxcnc/gscreen.glade $(DESTDIR)$(prefix)/share/linuxcnc
./src/Makefile:774:	$(DIR) $(DESTDIR)$(SITEPY)/gscreen
./src/Makefile:797:	$(FILE) ../lib/python/gscreen/*.py $(DESTDIR)$(SITEPY)/gscreen
./src/Makefile:829:	$(EXE) ../bin/gscreen $(DESTDIR)$(bindir)
./src/Makefile:840:	$(FILE) ../share/gscreen/images/*.gif $(DESTDIR)$(datadir)/gscreen/images
./src/Makefile:841:	$(TREE) ../share/gscreen/skins/* $(DESTDIR)$(datadir)/gscreen/skins

Given that really very little of gscreen is still in working order it seems to me that if a more thorough cleanup is desired then it may make a lot more sense to just remove all of gscreen now rather then leave possibly broken/obsolete bits and pieces that will probably remain in the source code for years to come.

So should we just remove the broken content in 'configs/sim/gscreen' and ignore the obsolete files in the background or should this be a more thorough cleanup?

Thanks

@andypugh
Copy link
Collaborator

andypugh commented Sep 5, 2024

I have had a play around, and now have Silverdragon loading.

This mainly involved loading the .glade file into the new version of Glade and re-saving targetting 3.16.
Then working through the Gtk3 changes.

Screenshot 2024-09-05 at 23 00 46

@andypugh
Copy link
Collaborator

andypugh commented Sep 5, 2024

See 6fe73e7

@andypugh
Copy link
Collaborator

andypugh commented Sep 8, 2024

What do you think about #3106 as an alternative?

@Sigma1912
Copy link
Contributor Author

Nice. If it's fixed then it doesn't need removing.
Does this fix all the configs in the 'configs/sim/gscreen' folder or does it need more work?
Thanks.

@andypugh
Copy link
Collaborator

andypugh commented Sep 9, 2024

I have worked on all the fies in share/gscreen/skins (I think) and launched at least one config that uses each then homed it.
I haven't gone through them all, and I haven't done much testing of any of them. Party because I was working through ssh to my dev machine, rather than directly at the machine. A consequence of this is no open-gl so the graphical pane doesn't work.
I still need to sit in front of the actual machine (buried under other projects) to check the varuous functions where I have had to make changes in the handler file.

I can see why Chris shifted loyalties to QT. Gtk is awful. For example to set the DRO text colour some handlers create a Pango attribute and insert that into the widget:
But others use the modify_fg method:
but modify_fg was deprecated and replaced by override_color in 3.0: which looks the same, but takes a Gtk.RGBA as an argument, not a Gtk.Color. And then it turns out the override_color is itself deprecated in 3.16, with them now wanting you to use CSS for everything. Which is a really painful way to just change some text colour. It's hard to know what to use if you want the code to work after the next seemingly random update.

@Sigma1912
Copy link
Contributor Author

I'm sure it won't be very long before this has to be fixed again, that is why I lean towards removing things rather than investing a lot of time trying to fix it again and again.

I'll try to checkout your branch and see how things look.

@Sigma1912
Copy link
Contributor Author

So I had a look at your branch. The result is rather mixed:

  1. 'gscreen', 'gscreen_lathe' and 'gscreen_mm' fail on start
  2. the configs in 'gscreen_custom' starts with errors, the GUI is responsive and homing works.
  3. 'industrial_lathe_wear' starts with errors, the GUI is responsive and homing works.
  4. 'ngcgui' loads without errors but the 'gladevcp' window is empty
  5. 'silverdragon' starts with errors, the GUI is responsive and homing works but there are runtime errors in the background
  6. 'spartan' loads without errors (except 'Encoder Fault' for X,Y,Z) but homing doesn't work

Not sure how much time you are willing to invest but given the likelihood of all this breaking again in the foreseeable future I'm not inclined to invest any time in fixing these bugs.

@andypugh
Copy link
Collaborator

andypugh commented Sep 9, 2024

They all work for me, though with errors. (fewer now)
The ngcgui one works, with the ngcgui tab displaying as expected.

I have cleaned up all but one of the silverdragon errors. And that's proving tricky:

(gscreen:938046): Gtk-WARNING **: 00:45:48.122: Don't know color '#27FFD8CFFF30D8FF27'

Obviously gscreen doesn't have that many lines, and the Hex number appears nowhere in the code.
(I had some other errors due to old data in ~/.gscreen_preferences, but those were cleared by deleting the file.)

@Sigma1912
Copy link
Contributor Author

Closing this since these seem to be mostly working again.

Thanks for all the work.

@Sigma1912 Sigma1912 closed this Sep 12, 2024
@Sigma1912 Sigma1912 deleted the master-remove-broken-in-sim_gscreen branch September 24, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants