QT questions

Many thanks for Radzilla 1.1
About Trolltech's Qt/Mac 3.3.5 for MacOSX 10.3.x Binary Installation, I see that it installs to /Developer/qt/ and /usr/local/lib/ which is at odds with
Franesco's comments in the last digest.
Anyway, does Radzilla expect QT at /Developer/qt/ and /usr/local/lib/ ?……if not could, you please give guidance as to how exactly to amend Radzilla to look
for /Developer/qt/ and /usr/local/lib/ instead. Sorry that I am not overly savvy in customising compiles~installations.


{I am registered on the mailing list}

Hi Patrick,

……is that to say that the 'make' process will pause at this point for user input? at which point I would enter

yep, so far you've got it right. Let me explain it a bit more:

The installation script is undoubtedly somewhat 'old-fashioned', I did not spend much time on it and merely copied Gregs classic Radiance 'makeall',
and just modified it here and there. So in general it still has that queer Unix/Linux flavour ...

If you run the command 'makeall RADZILLA' from a terminal (on some OSes you may have to type ./makeall, the ./ means search in the current directory for the executable, which is in this case the script)
Ok, ehhm, yeah, if you type makeall RADZILLA the script prompts at some points for user input, answer y or n, or input of a directory name for the
exectuables etc, etc At one point right at the beginning you're asked for your favorite editor program. Type in the name of the program you normally use for simple text editing tasks. Later, e.g when the follwing questions appear

1) Edit basic compilation parameters (compiler options etc.)
2) Edit QT specific parameters (Location of QT libraries etc.)
3) Return to OS selection

4) Continue installation

you can e.g. type 2 at the prompt, then the script will call the mentioned editor and you can edit a separate file which holds
the specific info for compiling (locations of the libraries and other stuff). Here you can adjust the specific data for your OS installation.
When you close the editor you always return to the above question, and if everything is ok, you finally can type 4 to continue the installation, compiling will then start with the parameters you have changed.

This editor hack is the same as Greg uses in his classic makeall, and it makes it a lot simpler for me, as I don't have to include an editor in the script but just use one which is present on your system.

So far for the way to adjust the compiling process, I admit that I should have written some explanations also on the meaning of the variables:

normally, each QT installation is collected into some base or root directory, this is the variable
QTDIR (on my system it's /usr/lib/qt3).
For compling stuff which uses the QT libraries you need a) header files and b) the libraries itself, the headerfiles reside in the 'include-.directory'
QTINCL, that cryptic -I$(QTDIR)/include is already the format the compiling program (eg. g++) needs as input parameter, in my case it translates to
QTLIB points to the location of the library, QTLIBNAME is another gimmick, sometimes the library is named
libqt.so, sometimes it is named libqt-mt.so (that 'lib' is always ommitted in the paramater name, again the -lqt-mt is already in the format the compiler expects.
And finally, the last special QT gimmick: QT has a so called 'meta compiler', which is just another step during the compilation, and it means a separate program called 'moc' is run which produces some additional code out of existing files. The parameter
MOC points to this program..

Ok, OK Ok, this is probably quite a lot for all who just want to run and use RADZILLA and don't want to bother half a day about all the intricacies of compiling and esp. checking where is what on different systems, but normally it is not a heavy as it sounds.

So you have to check if /Developer/qt contains a subdirectory 'include' and one named 'lib' and one named 'bin', and further if there are header files in the include-dir (tons of files with ending .h) and if there are libraries in .../lib (files named e.g libqt.so.3.3.5 and symbolic links like libqt.so or libqt.mt.so) and if there is an exectuable called 'moc in ..../bin,
If this is the case you can simply edit the QTDIR declaration to
i.e you only have to edit one variable, the one poiting to the base directory of your QT installation.

If your QT installation is not in a separate base directory, then all stuff probably is simply thrown into /usr/local/lib, mixed with everything else from
other tools and programs. I would be strange but in principle its possible. To be on the safe side you then better check where the necessary files are and set each of the variable separately.
You might use the 'find' command (if it exists on MacOSX, its a standard Unix commad, so it should exist.)
As an example, you can type:
find /usr -name moc
this looks for the program moc , starting from /usr and all its subdirectories. You might get something like
/usr/local/bin/moc or
as result, whatever the result is, this is the name you have to set for the varable MOC when editing the compiling parameters during the makeall run ...

Hope this helps ..




"Der Deckel muß zugehen." (P.Kölsch)


Certainly is very helpful Carsten,

I sense from from your notes and my findings following through on them that there is a good chance this will proceed smoothly (!).

First it seems I will be asked to choose an text editor……I would prefer 'pico'

Then in steps
  1) Edit basic compilation parameters (compiler options etc.) ……

here I shall enter 1 which will open the editor and should be able to see where to enter the following……< /Developer/qt/bin >……{for MOC}

2) Edit QT specific parameters (Location of QT libraries etc.)

here I shall enter 2 and the following where required……< /Developer/qt >……{for QTDIR}……and……< /Developer/qt/include> ……{for QTLIB}……and……</Developer/qt/include>……{for QTINCL}……and should that be it apart from step 4) which is straight forward?

How does that seem? Sorry for being cautious but things, for me, can certainly unravel badly when they get going.

Oh yes, about Radiance, the various exec's are 'loose' in /usr/local/bin, that must be the installed src version……OK?……well actually I would prefer to use the binary install at /Applications/Radiance (renamed from macosx_bin)……I better check the install notes for Radiance but a couple of things now……

a)RayPath is set as ……RAYPATH=.:/Users/patrickh/mylib:/usr/local/lib/ray……however the directory 'Users/patrickh/mylib' does not exist…not been aware of it before, mentioned in the radiance readme with no particular detail…does this matter…but perhaps as per radzilla install notes, place compiled radzilla executables with Radiance, say /Applications/Radiance?

b) have installed the radiance binary dist …the directory name + location for this is not relevant ~ is independent of Radzilla is it not…accepting a)?


Hi Patrick,

I wouldn't be too cautious :-), just try it out and if it doesn't work try it out again with some things changed etc..Every expert has once started like this..

So just run the makeall script, enter your editor(pico) when asked, and enter the directory where your classic Radiance execs reside as installation directory for radzilla
When you're asked for the editing of the compilation parameters take only the second option, the basic compilation paramteres often don't need to be adjusted so just bother about the QT specific stuff.
i.e type 2, makeall then calls pico and you should see the configuration file in the editor window..

In your case, if /Developer/qt is the base directory of your qt installation, edit the QT specific file so that it looks as follows:


# QT locations
MOC = $(QTDIR)/bin/moc


It means you only have to edit the first line and replace /usr/lib/qt3 with your system specific QT directory /Developer/qt.
Save the file and close the editor, you'll automatically return to the dialog, then chose option 4 to continue the installation.
If the compilation runs through, your're lucky. If not, you'll get error messages, sent them to me then I might be able to help
you further.

Concerning the RAYPATH:
If you have RAYPATH set, and it works with your classic Radiance programs (i.e rpict, rvu etc find the necessary stuff like rayinint.cal, source.cal etc), then you need not bother about it anymore, because Radzilla will evaluate the RAYPATH in the same way as classic Radiance.

Take care not to mix up RAYPATH with PATH.
The PATH environment variable is used to search for executables, if e.g. you type 'rpict ...', the machine has to know where to look
for it, and it looks in all directories listed in the semicolon-separated list in PATH.
The RAYPATH variable is evaluated by Radiance or Radzilla programs to look for auxiliary files like rayinit.cal or picture.cal, and it usually
points to a different location.

If you want to have all your Radiance/Radzilla executables in /Applications/Radiance, just move them there, and
then append /Applications/Radiance to your PATH declaration (you find that in the file .bashrc in your home directory (if you use bash)
If you like, you can also move all your Radiance auxiliary stuff from /usr/local/lib/ray into , for example, /Applications/Radiance/lib, and append this
directory name then to your RAYPATH declaration, i.e. set

Then you have all Radiance stuff neatly in a separate location and not intermixed with other programs.




"Der Deckel muß zugehen." (P.Kölsch)