-
Notifications
You must be signed in to change notification settings - Fork 6
Installation
The system is now on CPAN. I would recommend that you try out the test environment (see below) first before committing to install.
This page is how I got everything to work after getting a new hardware setup on Ubuntu 18.04. Most of my previous attempts had included multiple failed attempts and rollbacks and with these it is difficult to know what worked and what didn't. For other systems please try the following.
Using Wx requires installation of
- Wx Perl Modules
sudo cpanm Wx
- Wx::Perl::Imagick This is Jouke's Drop in replacement for Wx::Image (I couldn't get WxImage to work...some help would be useful). In my setup, this module fails with an error. This appears to be because the path in the MakeFile.PL uses backslashes (as in Windows) rather than forward slashes. Linux users may download the tarball and extract the files and edit the MakeFile.PL to use forward-slashes rather than back-slashes. Would be nice if this could be installed directly using cpanm on Linux.
John Ankarström has also found a way to overcome difficulties in 64-bit Windows machines on Strawberry Perl. Essentially
cpan Wx
fails to install Alien::wxWidgets. Thismay be because a PATH issue, which he resolved using:-
C:\>set PATH=C:\Windows\system32;C:\Windows;C:\Perl\c\bin;C:\Perl\perl\site\bin;C:\Perl\perl\bin
C:\>cpan
cpan>install Alien::wxWidgets
Then before cpan Wx
can succeed, in the build directory created by cpan for Wx, the file cpp/wxapi.h has to be edited, and the following added:-
#undef calloc
Then gmake test install
in the build directory should hopefully result in a successful install
Using Tk requires installation of
- Tk and Tk::JPEG Perl Modules
sudo cpanm Tk
sudo cpanm Tk::JPEG
- Image::Magick
sudo cpanm Image::Magick
- MIME::Base64
Using Gtk requires
- Glib
- Gtk3
In my case also required
sudo apt-get install libgirepository1.0-dev libgirepository1.0
sudo cpanm Glib-Object-Introspection --force
Running GUIDeFATE using Gtk results in an Introspection warning, but seems to work nevertheless.
This target was suggested by Perl Monk chanio Using Gtk2 requires
- Glib
- Gtk2
In my case also required
sudo apt-get install gtk2.0 libcanberra-gtk-module
sudo cpanm Gtk2
I had already installed GTK 3.0 and many overlapping dependencies The warning message that I had had with Gtk3 above does not appear with Gtk2
Installing PerlQt4 took me up a fair number of backends and alleyways...eventually this worked. instructions and files from the Google Code Archive...this below may the easiest way to install it...I took a more convoluted manual way.
411544
sudo apt-get install qt4-qmake
sudo apt-get install libqt4-dev
git clone git://anongit.kde.org/smokegen
git clone git://anongit.kde.org/smokeqt
git clone git://anongit.kde.org/perlqt
cd smokegen mkdir build; cd build; cmake ..; make ;make install ;cd ../..
cd smokeqt mkdir build; cd build; cmake ..; make ;make install ;cd ../..
cd perlqt mkdir build; cd build; cmake .. ;make ;make install ```
daxim also has suggested the following:-
On 17.10/"artful":
install libsmokeqt4-dev libqt4-dev and possibly a few others,
On openSUSE Tumbleweed:
install libsmokeqt-devel from repository KDE:Distro:Factory Current bindings (ideally this git repo should be bundled and published to CPAN, updating distro Qt4/main namespace QtCore4):
git clone git://anongit.kde.org/perlqt.git
cd perlqt
perl Makefile.PL && make && make install
To test:
cd qtgui/examples/designer/calculatorform
puic4 calculatorform.ui -o Ui_CalculatorForm.pm
perl -Mblib -I. ./calculatorform.pl
It is a mistake to install distros PerlQt or Qt from CPAN, they are for versions of Qt that are many years out of date.
requires Win32::GUI and Imager. Previous versions used to use Image::Magick. Had difficulty getting Win32::GUI::DIBitmap working, so used Image::Magick as a image resize and convert tool. I got things to finally work using Strawberry Perl and their own version of Image::Magick rather than the downloaded version from the ImageMagick website. Note ActiveState with PerlMagick appears to fail...According to the Image::Magick website this may be due the fact that ActiveState Perl and ImageMagick using different compilers. From the IM website:-
Note, reading from or writing to a Perl filehandle may fail under Windows due to different versions of the C-runtime libraries between ImageMagick and the ActiveState Perl distributions or if one of the DLL's is linked with the /MT option. See Potential Errors Passing CRT Objects Across DLL Boundaries for an explanation.
So the solution may be to use Imager. The current version does this.
- install Strawberry Perl or ActiveState Perl
- From a console install Imager using
ppm install Imager
- From a console install Win32::GUI using
cpan install Win32::GUI
This is the easiest without dependencies. It creates and executes a .html file with a similar name to the calling perl script. (e.g if called from calculator.pl a file calculator.pl.html file will be created and opened in a browser window). Additionally a JavaScript file will be also linked, e.g. in the above case a file called calculator.pl.js if one exists...this is the location of any interactivity for the user to program in Javascript.
GUIDeFATE.pm -
- Converts the Textual Data extracting parameters required to create the objects, setting up location and sizes of widgets, making up ID numbers, key values to reference the object and any function to be called on interaction.
- This can also auto-generate the code required for the functions to interact with the interface created.
GFwx.pm and GFwxFrame.pm needed for Wx backend, GFtk.pm needed for Tk backend, GFgtk for Gtk backend, GFqt.pm needed for the Qt back-end and GFwin32.pm for the Win32 backend and GFhtml.pm for the HTML backend.
- Creates the window and inserts a soon to be created frame object
- Assists development by printing to console any widgets found, their id for the toolkit, the key for the reference as part of the "frame" object exported by GFrame, and function to be called.
- Creates a frame object to be inserted into the window and exported to the calling application code.
- Assembles the frame contents from a list of widgets parameters inserted into object by GUIDeFATE::convert
- Abstracts out many of the functions to manipulate or query the interface so that the same commands work independent of back end used
This is a compressed archive of a folder containing the Perl modules in a lib folder and test scripts in a scripts folder. Executing Executioner.pl will bring up a menu that allows the user to select the back-end and test different demo applications. This will use the library included in the archive over any installed versions of GUIDeFATE. (GUIDeFATE does not need to be installed, but other modules do (e.g. Tk, Wx, etc)