Thanks for publishing this!
Randolph
On Nov 10, 2010, at 12:43 PM, Guy Vaessen wrote:
I have posted this before to the mailing list, I know it is not nice
to double post but since there are still some questions on the Scons
scripts I re-posted everything (in one large message, with a fix or
two):
This is my procedure to compile Radiance 40 HEAD with Scons:
If something is not working let me know then I can look into it.
General procedure for installation, is the one described on
Francesco's Wiki page
How to compile Radiance using the MinGW tools and Scons
http://www.bozzograo.net/radiancewiki/doku.php?id=how_to_compile_radiance_using_the_mingw_tools_and_scons
For compilation I used:
Radiance 4.0 from http://radsite.lbl.gov/radiance/dist/rad4R0all.tar.gz
(Includes auxiliary files)
+ latest HEAD archive from
http://www.radiance-online.org/software/snapshots/radiance-HEAD.tgz
MinGW with gcc 4.5.0
Python 2.7 + scons 1.3.1 (You might also have to set the PATH
variable to Python and Scons)
Extract Radiance 4.0 and HEAD and place HEAD files over Radiance 4.0
files overwriting the old ones.
Extracting can be done with the tools listed on the radiancewiki
site mentioned above.
or possibly also with winzip or 7-zip.
Gendaylit
To make Gendaylit compile add the following line in:
ray\src\gen\SConscript under the section PROGS = (
('gendaylit', Split('gendaylit.c sun.c',), ['rtlamps']),
Change the following line in: ray\src\common\SConscript
RTLAMPS = Split('''fropen.c rexpr.c lamps.c''')+ [getlibpath]
Dctimestep
To make dctimestep compile I had to add the following line to:
ray\src\common\SConscript under the section # build libraries:
rtall = env.StaticLibrary(target=radlib('rtall'), source=ALL)
I changed in ray\src\util\SConscript
('dctimestep', ['dctimestep.c'],
['rtall'])
For Gendaylit you also need a library files called: 'perezlum.cal
coeff_perez.dat defangle.dat'
Add this to ray\scr\gen\SConscript the line should be:
LIBFILES = Split('illum.cal rev.cal skybright.cal glaze1.cal
glaze2.cal perezlum.cal coeff_perez.dat defangle.dat')
Check if: progs.append(prog)
is present before this line in ray\scr\gen\SConscript:
prog = env.Program(target=os.path.join('$RAD_BUILDBIN', 'mksource'),
When compiling tmapluv.c the compiler complains about a variable
declaration that is already declared elsewhere, to solve this:
Change the include order in these files (ray\src\common\):
tmapluv.c to put "tiffio.h" above "tmprivat.h"
tmaptiff.c to put "tiffio.h" above "tmprivat.h"
tmapcolrs.c to put "rtprocess.h" above "tmprivat.h"
To compile mgf2meta:
Change in ray\scr\cv\SConscript
# meta targets
prog = env.Program(target=rbin('mgf2meta'), source=['mgf2meta.c'],
CPPPATH=env.get('CPPPATH', []) +
[os.path.join('#src','meta')],
LIBS=['meta','rtmath','rtcont','rtmem','rterror','mgf'] +
mlib)
env.Append(RAD_BININSTALL=[env.Install(env['RAD_BINDIR'], prog)])
platform/*.cfg files should be updated so that installation paths
aren't
"c:\radiance3.6" or so.
For example next can be changed:
[install]
RAD_BASEDIR: c:\radiance4.0
RAD_BINDIR: bin
RAD_RLIBDIR: lib
RAD_MANDIR: man
Open cmd window on Windows
Change to ray dir
type: scons build
And after a successful build
type: scons install
+
after installation user has to set RAYPATH environment variable to
Radiance
libraries' path.
and the PATH environment variable to Radiance bin path
For those of you interested in compiling ra_tiff and normtiff for
Windows, below are the instructions on how it could be done.
Tools:
Get tiff-3.9.4.zip from ftp://ftp.remotesensing.org/pub/libtiff/
Get MinGW + MSYS shell from http://www.mingw.org/
To open a MSYS shell: Go to C:\msys\1.0\msys.bat (or where you
installed MSYS)
Original instructions from:
http://www.gaia-gis.it/spatialite-2.4.0/mingw_how_to.html#libtiff
Only step 5 should be enough to compile libtiff (since we do not use
libz nor libjpeg)
To make it work with Radiance I had to modify the procedure a bit:
download the latest sources: tiff-3.9.4.zip
uncompress this zip-file
then open an MSYS shell
cd tiff-3.9.4
./configure --enable-static --enable-logluv --disable-shared --
disable-cxx --disable-jpeg --disable-zlib --disable-pixarlog
make
make install-strip
Copy the file libtiff.a from C:\msys\1.0\local\lib to C:\..\..\ray
\src\lib (where ..\..\ points to where you extracted the Radiance
source files)
To build ra_tiff add these lines to ray\src\px\SConscript:
ra_tiff = env.Program(target=radbin('ra_tiff'), source=['ra_tiff.c'],
LIBS=['libtiff','rtpic','rtio','rtmem'] + mlib)
progs.append(ra_tiff)
In a similar way normtiff can be build:
Add this line to \ray\src\common\SConscript after the section #
build libraries:
rtall = env.StaticLibrary(target=radlib('rtall'), source=ALL)
To build normtiff add these lines to ray\src\px\SConscript:
normtiff =
env.Program(target=radbin('normtiff'),source=['normtiff.c'],
LIBS=['libtiff','rtall'] + mlib)
progs.append(normtiff)
Then proceed with building Radiance with scons.
_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev
_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev