Report Magic for Analog Documentation -
Author: This page created by Wadsack-Allen Digital Goup

#

## Supplemental steps to install Report Magic on Mac OS X v0.1

Note: This process was documented using Report Magic 2.05 on Mac OS X 10.0.3 Server and was written by Jim Powell. OS X server 10.1 and 10.2 are configured differently and require different approaches. See Installing Report Magic on Mac OS X Server for more recent instructions.

Disclaimer: I am not an expert at this. This information is mainly based on my experience with trying to install Report Magic on my own system so I can't guarantee that this is the best way of going about this. If you have any recommendations on how to improve this documentation please send them to Wadsack-Allen Digital Group Support.

I would highly recommend installing the Developer Tools packages if you have not already done so. I don't know of any dependencies however so it isn't required.

This is a command line process so if you have not familiarized yourself in some fashion with Terminal, the command line, and at least one text editor like vi, emacs, pico, etc. then you should probably do so before hand, but hopefully this guide will invlove minimal effort

### Preparation:

Enable root user using NetInfo Manager if you have not done so already. Download the latest Report Magic Source Package from http://www.reportmagic.org/ (or your nearest mirror) and follow the online installation documentation and refer to this document for any changes that need to be made for compiling on OS X.

The following components will need to be installed (in this order):

System Libraries:

  zlib
  libpng
  jpeg-6b
  libgd

Perl Modules:

  GD
  GD::Text
  GD::Graph
  GD::Graph3d
  Config::IniFiles
  HTML::Tagset
  HTML::Parser
  File::Spec

### Installation specifics:

Use `tar -xzf <archive name>` to decompress the downloaded archives.

## System Libraries

zlib:
  Despite zlib being included in Mac OS X, it does not include the library files so you will need to download and install zlib. I used the original zlib-1.1.3 source instead of the Darwin port that is listed, but you should technically be able to use either.
libpng:
  Untar libpng-1.0.12.tar.gz in the same directory you untared your zlib source and then rename the directories using the following:

            mv zlib-1.1.3 zlib
            mv libpng-1.0.12 libpng

  Move or delete the .tar.gz archives before installing. `cd` to libpng. Copy the appropriate makefile:

            cp ./scripts/makefile.macosx ./Makefile

jpeg-6b:
  After running `./configure` edit the resulting Makefile so that `LIBTOOL = /usr/bin/glibtool`
libgd:
  This one involves a little editing of the default Makefile so it can find the correct libraries and include files. My settings were as follows:

    CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG
    LIBS=-lgd -lpng -lz  -lm (I have not gotten the inclusion of -ljpeg to work at the time I write this)
    INCLUDEDIRS=-I. -I/usr/local/include -I/usr/local/lib -I/Users/Shared/jpeg -I/Users/Shared/zlib -I/Users/Shared/libpng
    LIBDIRS=-L. -L/usr/local/lib -L/usr/local/bin -L/Users/Shared/jpeg -L/Users/Shared/zlib -L/Users/Shared/libpng

    (/Users/Shared/ is where I had left the untared source directories, replace it with the
    path to the directory you have those directories in)

    Should you have compile errors make sure your LIBDIRS and INCLUDEDIRS settings point to
    where the .a and .h files are actually located, respectively.  You can also play
    with the order of the LIBS to be compiled, but I didn't have much luck with that.

This should complete the system library requirements needed to install and run the necessary Perl modules. At the time of this writing I could not get the autoloading feature of the `rmagic/Install.PL` script to download the necessary modules [this appears to be an issue in the Mac OS X ftp implementation] so I installed the modules manually. Below I have made note of any necessary changes.

For the most part I did as little as possible so I could get things up and running, but you may wish to make changes to the resulting Makefiles for each module after running Makefile.PL to change where the module is installed, etc.

## Perl Modules

GD:: modules:Before compiling you need to update you ranlib database as root with: `ranlib /usr/local/lib/*.a` [assuming this is where you installed the library files, which is the default]

Now you can continue by issuing `perl Makefile.PL`, `make`, `make test`, and `make install`

Assuming that you were able to compile libgd successfully you should not encounter any major problems compiling the GD, GD::Text, GD::Graph, or GD::Graph3d modules. You should expect some of the subtests for each module to fail but it's nothing to worry about as long as the majority succeed.

HTML::TagSet should be installed before HTML::Parser. HTML::Parser includes the HTML::Entities module that Report Magic uses.

Once you've installed all the modules go back to where you left the Report Magic Source Package archive and untar it if you haven't already done so. `cd` into the resulting directory. If you have a specific directory (e.g. `/Library/WebServer/Documents/`, so you can access the resulting reports via a browser [note there may be some security issue with putting Report Magic in your webserver documents directory]) that you want the Report Magic directory to be installed to, then edit the `$DEST` variable of the `Install.PL` script.

If you don't install into `/Library/WebServer/Documents/` then you will need to change the output destination of Report Magic in the `rmagic.ini` file so that it will generate the reports into a directory that is accessible from your webservers root directory. Issue the `perl Install.PL -no_modules` command

Go to the directory that was just installed called "rmagic" and in there you will find the `rmagic.sample` and `sample.dat` files. The `rmagic.sample` is an example settings file, so just run the `rmagic.pl` application to test your installation and make sure everything works. You should end up with a "reports" directory below your installation directory containing all the reports.

If everything goes as planned you should now be the proud administrator of a much more flexible report formatter. To start customizing Report Magic for your own server see the Quick Start page

[Introduction] [Documentation map] [Index] [Frequently Asked Questions] [License]
Send questions or comments to Wadsack-Allen Digital Group Support.
Report Magic 2.21 Documentation. Copyright © 1999-2003 Wadsack-Allen. All Rights Reserved.