smenu_install_GD

Home Up

 

 
Install Graphics in Smenu

    Smenu really shine in the domain of diagnosing DB and tells why it is slow. Smenu uses samplers that dumps data to ASCII
files (remember, Smenu does not like to create objects in the DB) and produces report out of these sample files.
Now you can also add graphics. This is specially handy if you need to make reports to your boss, customer  and  explain
what  happened or is currently happening.

Here is an example :

Sample image

Requierement to view bart charts:


 -libgd.a installed
 -perl ( Windows : ActivePerl as it contains libgd.a)
 -make or nmake.exe utility
 -Perl Module GD.pm GDGraph.pm GD-graph3d.pm (or at least GD-bars3d)
 -Firefox

Step by step install: 

a) libgd.A:

You need to have installed a gd library. You can have it in the zipfile
http://www.boutell.com/gd/http/gdwin32.gz
However for windows, the libgd library is comprised on ActivePerl, so we strongly recommand that 
you do not install the perl of the Cygwin but rather  user ActivePerl. If you absolutely need
to use the Cygwin perl, then prepare to install gcc, tons of graphics libs and 3 liter of cofee.


b) perl/ActivePerl
---------------
Windows : Install active perl from "http://www.activestate.com/"
Unix : probably already installed.

WARNING PERL5LIB on windows:
If you have installed Oracle 10gr1 on you machine with perl option, your PERL5LIB env is set to 
the one in the Oracle path and your Activeperl will not work properly. To test this, after 
active perl is installed, open a dos box and type 'ppm' If you receive errors message complaining 
on the path (and you see the path of Oracle' just do

   set PERL5LIB=

You will also have the same problem in Cygwin as it inherits of the Windows enviromenment, 
you will need to issue and unset PERL5LIB. 
Note that Smenu does it for you when you add the addpar.sh (. ./ad) 

c) Windows only : Install Nmake
	To install the perl libray you will need a make utility. Under windows, it is nmake.exe.
Go on google and search for nmake15.exe and pick one.  I extract and installed my nmake.exe into the 
c:\perl\bin since I use it only for perl.


d) Install 4 perl modules.

Once active perl is installed, we need to install 3 library

GD
GDTextUtil
GDGraph
GD-graph3d


You will find them at http://www.smenu.org/misc/smenu_perl_GD.TAR or go to 'http://search.cpan.org', 
search and download the 3 library in a temp dir under Cygwin for they are gzipped and tar.

TIP WINDOWS
Under Cygwin and ActivePerl, I strongly recommend you take the tar file from Smenu. put it under $SBIN, 
untar it. Then run the script 'inst_GD_dll_for_ActivePerl.ksh' and follow the instruction. Basically it
copies the DLL needed by GD.pm into the Perl trees. Those DLL are not easy to produce. 

Next the script untar the remaining 3 GD (textutil, graph, graph3d). Do not try to build them withing Cygwin
Open a Dos box and perform the instruction that the script has left on the screen. There is also a README.txt
file into this smenu_perl dir that contains a copy of step by step installating.



Note :  At this time, when I write this at 05-April-2006, the repository of active perl does not have 
those 4 libraries,  so it is uselles to search them with 'ppm' of active perl.

Linux & Unixies : Go on CPAN and get them,




next for each of the Perl GD module you will have to do :

gzip -d <GDxxxx>
tar xvf <GDxxxx>

Windows : open a dos box (check PERL5LIB, unset it if needed) and cd to the expanded GDnnn.pm directory and type

Perl Makefile.pl
nmake
nmake install

e) Firefox.

	If firefox is not yet installed, then it is time to sacrifice to the gods of browsers. Note that 
mozilla suite is not good at this time of writing, as it does not recognize all command lines that 
Smenu issue to pilot the Browser. I installed a copy of firefox under c:\app to avoid all 
problemes with the blank into 'program files' path.

Once firefox is installed, the easiest is to add a symlink : 

ie)  ln -s /cygdrive/c/app/firefox/firefox.exe   /usr/local/bin/firefox

You are ready to use 'spl' with the -img.

Email: bpolarsk@yahoo.com                             Last updated : 06 April 2006