ChartDirector Ver 3.0 (Perl Edition)
Installation
Windows Installation
This section describes how to install ChartDirector for Perl under Windows. For
the Linux, FreeBSD or Solaris version, please refer to
Linux/FreeBSD/Solaris Installation.
Perl Version Compatibility on Windows
ChartDirector for Perl on Windows has been tested with the following Perl versions:
- Perl 5.8.0 (the latest Perl release as of the date of this document)
- Perl 5.6.1
- Perl 5.6.0
- Perl 5.005_03
- Perl 5.004_02
Installing ChartDirector for Perl on Windows
ChartDirector for Perl on Windows is distributed as a zip file. To install
ChartDirector:
- Unzip the ChartDirector distribution.
- The ChartDirector for Perl module and its supporting DLLs are in the
"ChartDirector\lib" subdirectory. Copy all files in "ChartDirector\lib"
to a subdirectory in your Perl module search path in your system.
If you do not know what is the Perl module search path in your system, you may
enter the following command to find out. The Perl module search path is listed
as the @INC variable.
perl -V
|
If you could not access any of the subdirectories in the default Perl module
search path (e.g. you are using a virtual web host, and the system directories
are inaccessible to you), there are a number of alternative methods.
Installing Sample Scripts on Windows
ChartDirector for Perl comes with numerous sample Perl scripts under the
"ChartDirector\perldemo" and "ChartDirector\perldemo_cgi" subdirectories. The
former is for standalone scripts, while the latter is for CGI scripts. They are
good examples and tutorials on how to use ChartDirector.
You may run these sample scripts to verify that ChartDirector is correctly
installed.
To run the standalone ChartDirector sample scripts:
- In the command line prompt, change to the "ChartDirector\perldemo"
subdirectory.
Note: If you have not installed the ChartDirector for Perl modules in a
directory in your Perl module search path, you would need to copy all files in
"ChartDirector\lib" to the "ChartDirector\perldemo" subdirectory.
- Type "perl [script_name]". For example, the command "perl simplebar.pl"
should generate a PNG chart image called "simplebar.png".
To run the ChartDirector sample CGI scripts:
- Copy all files in "ChartDirector\perldemo_cgi" to your web server's CGI
directory.
Note: If you have not installed the ChartDirector for Perl modules in a
directory in your Perl module search path, you would need to copy all files in
"ChartDirector\lib" the same CGI script directory as the ChartDirector sample
scripts.
- Browse the sample scripts by using a browser to access the sample scripts
index page "index.pl".
If for some reason, you cannot see the charts, please click on the "check
installation" link on main index page. This will perform a diagnostic test
and display any error encountered.
Installing ChartDirector License on Windows
If you have purchased a license to use ChartDirector, you should have a license
code delivered to you via email and postal mail.
To install the license code, follow the steps below:
- Save the license code in an ASCII text file, and name the file
"chartdir.lic". The ASCII text file should contain just one line,
which is the license code. A sample license file is available at
http://www.advsofteng.com/chartdir.lic
for your reference.
- Put the license file in the same directory as "chartdir.dll", which should
be in the directory where the ChartDirector for Perl modules are installed or
copied to.
- If you are using ChartDirector with a web server, make sure the web server
"anonymous user" has sufficient privileges to read the license file.
Using ChartDirector for Perl on Windows
To use ChartDirector in your own Perl scripts, include the following statement in your
script:
use perlchartdir;
Depending on how you have installed ChartDirector, you may need to copy the ChartDirector
for Perl modules to your script directory. Please refer to the
installation
instructions for details.
Linux/FreeBSD/Solaris Installation
This section describes how to install ChartDirector for Perl under
Linux/FreeBSD/Solaris. For the Windows version, please refer to
Windows
Installation.
Perl Version Compatibility on Linux/FreeBSD/Solaris
ChartDirector for Perl on Linux/FreeBSD/Solaris has been tested with the
following Perl versions:
- Perl 5.8.0 (the latest Perl release as of the date of this document)
- Perl 5.6.1
- Perl 5.6.0
- Perl 5.005_03
- Perl 5.005
- Perl 5.004_05
- Perl 5.004
Installing ChartDirector for Perl on Linux/FreeBSD/Solaris
ChartDirector for Perl on Linux/FreeBSD/Solaris is distributed as a tar.gz file.
To install ChartDirector:
If you could not access any of the subdirectories in the default Perl module
search path (e.g. you are using a virtual web host, and the system directories
are inaccessible to you), there are a number of alternative methods.
- Copy all files in "ChartDirector/lib" the "current working directory". If the
Perl script is running as a CGI on Apache server, the "current working directory"
is the directory of the script. So you can just copy everything (recrusive copy)
in "ChartDirector/lib" the same directory as the script.
- Include a "use lib [subdirectory];" statement in your Perl script to add
an extra subdirectory to the Perl module search path. You may then copy everything
(recrusive copy) in "ChartDirector/lib" to that subdirectory.
- Use the "perl -I" flag to add an extra subdirectory to the
Perl module search path when invoking the Perl interpretor. You may then copy
everything (recrusive copy) in "ChartDirector/lib" to that subdirectory.
Installing Sample Scripts on Linux/FreeBSD/Solaris
ChartDirector for Perl comes with numerous sample Perl scripts under the
"ChartDirector/perldemo" and "ChartDirector/perldemo_cgi" subdirectories. The
former is for standalone scripts, while the latter is for CGI scripts. They are
good examples and tutorials on how to use ChartDirector.
You may run these sample scripts to verify that ChartDirector is correctly
installed.
To run the standalone ChartDirector sample scripts:
- In the command line prompt, change to the "ChartDirector/perldemo"
subdirectory.
Note: If you have not installed the ChartDirector for Perl modules in a
directory in your Perl module search path, you would need to copy everything
(recrusive copy) in "ChartDirector/lib" to the "ChartDirector/perldemo"
subdirectory.
- Type "perl [script_name]". For example, the command "perl simplebar.pl"
should generate a PNG chart image called "simplebar.png".
To run the ChartDirector sample CGI scripts:
- Copy all files in "ChartDirector/perldemo_cgi" to your web server's CGI
directory.
Note: If you have not installed the ChartDirector for Perl modules in a
directory in your Perl module search path, you would need to copy copy everything
(recrusive copy) in "ChartDirector/lib" the same CGI script directory as the
ChartDirector sample scripts.
- Browse the sample scripts by using a browser to access the sample scripts
index page "index.pl".
All ChartDirector sample scripts assume the Perl interpreter is at
"/usr/bin/perl" (the scripts use "#!/usr/bin/perl"). This is usually
correct for Linux, FreeBSD, and Solaris 2.8 or above.
For earlier versions of Solaris, the location of Perl is not standard and
could be in many different places, such as "/usr/bin", "/usr/local/bin",
"/opt/bin", "/opt/local/bin", etc. If your Perl interpreter is not at
"/usr/bin/perl", you could link "/usr/bin/perl" to the actual location
of your perl interpreter as follows:
ln -s [actual_perl_location] /usr/bin/perl
Of course, you could also change all scripts to use "#!",
but it is much easier to just make a link. |
If for some reason, you cannot see the charts, please click on the "check
installation" link on main index page. This will perform a diagnostic test
and display any error encountered.
Installing ChartDirector License on Linux/FreeBSD/Solaris
If you have purchased a license to use ChartDirector, you should have a license
code delivered to you via email and postal mail.
To install the license code, follow the steps below:
- Save the license code in an ASCII text file, and name the file
"chartdir.lic". The ASCII text file should contain just one line,
which is the license code. A sample license file is available at
http://www.advsofteng.com/chartdir.lic
for your reference.
- Put the license file in the same directory as "libchartdir.so", which should
be in the directory where the ChartDirector for Perl module is installed or
copied to.
- If you are using ChartDirector with a web server, make sure the web server
"anonymous user" has sufficient privileges to read the license file.
Using ChartDirector for Perl on Linux/FreeBSD/Solaris
To use ChartDirector in your own Perl scripts, include the following statement in your
script:
use perlchartdir;
Depending on how you have installed ChartDirector, you may need to copy the ChartDirector
for Perl modules to your script directory. Please refer to the
installation
instructions for details.
© 2003 Advanced Software Engineering Limited. All rights reserved.