A script to install Gtk3 for perl apps

For PC type software that runs under some PC opsys.

A script to install Gtk3 for perl apps

Postby Doug Coulter » Sun Oct 01, 2017 11:08 am

Which can be a real pain to do by hand each time you build a linux box. This needs that, which needs something else and so on so deep the usual install tools for perl modules and their dependencies choke on it, and every time I build a new machine or do a full install/upgrade - it takes way too long to remember all the stuff, scan the install logs for what failed, fix that, have it fail again for the next layer of missing junk, repeat...

This just gets it done.
With the perl Gtk3.pm installed, you can use the Glade program to create GUI's pretty easily, there's only a few obscure parts and I could explain those pretty easily.
The resulting xml file (something.glade) can then be used very easily by perl (once this module is installed) and only a couple lines of code create the gui and hook up all the events you specified in Glade (button clicks, typing stuff, you name it) are *automatically hooked up to perl subroutines* without you lifting a finger other than to give glade the names you want to call for that event.

So, in this attachment are the Gtk3Install.sh file and a sample perl file (speedvolt) that uses Gtk3 internally and doesn't really have any other dependencies to use as an example.
Look at all the lines of code I don't need! Compared to C/C++ this is NOTHING. Letting Glade do the layout makes it WYSIWYG. In perl, we know who we are so we don't need as many parameters to the gtk calls either. A real time-saver for the programmer, which is why I do things this way.
Gtk3Install.tar.gz
Shell script to install Gtk3 and sample program
(4.04 KiB) Downloaded 268 times


You'll need to put glade in to use it, the usual ways (apt-get or synaptic or perhaps your software boutique) work fine.
This should work in any modern linux. I tested on a pristine install of Mint Mate 18.2 after doing all the immediate updates it wants to do.

Hint - create a folder named bin (lower case like that) under your user home folder for stuff like this - it will be added to your path automatically on the next boot. You may have to ensure that the programs in this tarball are executable after extracting them - and /youruser/bin is a good place for them.

Here I am yakking about it:
https://youtu.be/1SGPZTEECbo

Vokoscreen is nice!
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA

Return to PC

Who is online

Users browsing this forum: No registered users and 1 guest

cron