windows Borland Makefile for radiance

I would like to export rtace to windows, building it with borland c++ complier, sure anybody has done it yet, can you help me with the makefile &| srcs? thanks

Ignacio Munárriz wrote:

I would like to export rtace to windows, building it with borland c++
complier, sure anybody has done it yet, can you help me with the makefile &|
srcs? thanks

You can use the Scons build system. For this to work, you need
Python (www.python.org) and SCons (www.scons.org) installed on
your system. SCons will use the borland compiler, unless it finds
another one installed on the system first (ie. if you also have
VC installed, then that one will be used).

If all the tools are present, you should be able to build most of
Radiance that way on Windows. Open a console window ("DOS box")
and change to the "ray" directory. Then type "scons .", (or just
"scons bin/rtrace.exe") and the system should do the rest
automatically (depending on your installation, you may need to
specify a full path for SCons).

I assume that the borland compiler accepts different command line
arguments than VC though, so you will most likely have to do some
more editing. Copy the file "ray\platform\win32.cfg" to
"ray\platform\win32_custom.cfg" (the "*_custom.cfg" will be used
if present). Open the new file in a text editor, and modify the
CCFLAGS and LINKFLAGS variables in the [build] and [debug]
sections as needed. If you find a combination that works, please
send me the resulting file, and I'll see if I can integrate it in
a way that it gets selected automatically when borland tools are
used.

I haven't tried to build Radiance on Windows for a while, so you
might run into some problems. If you manage to identify the
causes of any stumbling blocks, or even better if you can whip
up some fixes, please send them to me, and I'll try to update the
CVS version accordingly.

-schorsch

···

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/

Georg, the first error

scons: Reading SConscript files ...
Detected platform "win32" (nt).
Reading configuration "platform\win32_custom.cfg"
Checking for main() in C library GL... no
meta
cv
gen
ot
rt
px
hd
util
cal
scons: done reading SConscript files.
scons: Building targets ...
bcc32 -q -O2 -H -c -D_WIN32 -DNDEBUG -D_CONSOLE -D_MBCS -Isrc\common -c -o
src\cv\mgflib\3ds2mgf.obj src\cv\mgflib\3ds2mgf.c
Error E2194: Could not find file 'src\cv\mgflib\3ds2mgf.obj'
src\cv\mgflib\3ds2mgf.c:
Warning W8004 src\cv\mgflib\3ds2mgf.c 1277: 'spec' is assigned a value that
is never used in function write_pov10_material
Warning W8004 src\cv\mgflib\3ds2mgf.c 1354: 'spec' is assigned a value that
is never used in function write_pov20_material
Warning W8004 src\cv\mgflib\3ds2mgf.c 1565: 'total' is assigned a value that
is never used in function write_mgf_material
Warning W8004 src\cv\mgflib\3ds2mgf.c 1560: 'smag' is assigned a value that
is never used in function write_mgf_material
Warning W8004 src\cv\mgflib\3ds2mgf.c 1776: 'token' is assigned a value that
is never used in function parse_morph
Warning W8004 src\cv\mgflib\3ds2mgf.c 2026: 'frame' is assigned a value that
is never used in function find_frame
scons: building terminated because of errors.

the problem is that -o must be close to the file, ie
bcc32 -q -O2 -H -c -D_WIN32 -DNDEBUG -D_CONSOLE -D_MBCS -Isrc\common -c -osr
c\cv\mgflib\3ds2mgf.obj src\cv\mgflib\3ds2mgf.c

but i dont know where change it

···

----- Original Message -----
From: "Georg Mischler" <[email protected]>
To: "code development" <[email protected]>
Sent: Friday, February 25, 2005 2:36 PM
Subject: Re: [Radiance-dev] windows Borland Makefile for radiance

Ignacio Mun�rriz wrote:

I would like to export rtace to windows, building it with borland c++
complier, sure anybody has done it yet, can you help me with the makefile

&|

srcs? thanks

You can use the Scons build system. For this to work, you need
Python (www.python.org) and SCons (www.scons.org) installed on
your system. SCons will use the borland compiler, unless it finds
another one installed on the system first (ie. if you also have
VC installed, then that one will be used).

If all the tools are present, you should be able to build most of
Radiance that way on Windows. Open a console window ("DOS box")
and change to the "ray" directory. Then type "scons .", (or just
"scons bin/rtrace.exe") and the system should do the rest
automatically (depending on your installation, you may need to
specify a full path for SCons).

I assume that the borland compiler accepts different command line
arguments than VC though, so you will most likely have to do some
more editing. Copy the file "ray\platform\win32.cfg" to
"ray\platform\win32_custom.cfg" (the "*_custom.cfg" will be used
if present). Open the new file in a text editor, and modify the
CCFLAGS and LINKFLAGS variables in the [build] and [debug]
sections as needed. If you find a combination that works, please
send me the resulting file, and I'll see if I can integrate it in
a way that it gets selected automatically when borland tools are
used.

I haven't tried to build Radiance on Windows for a while, so you
might run into some problems. If you manage to identify the
causes of any stumbling blocks, or even better if you can whip
up some fixes, please send them to me, and I'll try to update the
CVS version accordingly.

-schorsch

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

It is fixed changing scons\tool\bcc32.py but i dont know if it's the way.
arggg! now, learning python :slight_smile:

···

----- Original Message -----
From: "Ignacio Mun�rriz" <[email protected]>
To: "code development" <[email protected]>
Sent: Saturday, February 26, 2005 10:59 AM
Subject: Re: [Radiance-dev] windows Borland Makefile for radiance

Georg, the first error

scons: Reading SConscript files ...
Detected platform "win32" (nt).
Reading configuration "platform\win32_custom.cfg"
Checking for main() in C library GL... no
meta
cv
gen
ot
rt
px
hd
util
cal
scons: done reading SConscript files.
scons: Building targets ...
bcc32 -q -O2 -H -c -D_WIN32 -DNDEBUG -D_CONSOLE -D_MBCS -Isrc\common -c -o
src\cv\mgflib\3ds2mgf.obj src\cv\mgflib\3ds2mgf.c
Error E2194: Could not find file 'src\cv\mgflib\3ds2mgf.obj'
src\cv\mgflib\3ds2mgf.c:
Warning W8004 src\cv\mgflib\3ds2mgf.c 1277: 'spec' is assigned a value

that

is never used in function write_pov10_material
Warning W8004 src\cv\mgflib\3ds2mgf.c 1354: 'spec' is assigned a value

that

is never used in function write_pov20_material
Warning W8004 src\cv\mgflib\3ds2mgf.c 1565: 'total' is assigned a value

that

is never used in function write_mgf_material
Warning W8004 src\cv\mgflib\3ds2mgf.c 1560: 'smag' is assigned a value

that

is never used in function write_mgf_material
Warning W8004 src\cv\mgflib\3ds2mgf.c 1776: 'token' is assigned a value

that

is never used in function parse_morph
Warning W8004 src\cv\mgflib\3ds2mgf.c 2026: 'frame' is assigned a value

that

is never used in function find_frame
scons: building terminated because of errors.

the problem is that -o must be close to the file, ie

bcc32 -q -O2 -H -c -D_WIN32 -DNDEBUG -D_CONSOLE -D_MBCS -Isrc\common -c -osr

c\cv\mgflib\3ds2mgf.obj src\cv\mgflib\3ds2mgf.c

but i dont know where change it

----- Original Message -----
From: "Georg Mischler" <[email protected]>
To: "code development" <[email protected]>
Sent: Friday, February 25, 2005 2:36 PM
Subject: Re: [Radiance-dev] windows Borland Makefile for radiance

Ignacio Mun�rriz wrote:

> I would like to export rtace to windows, building it with borland c++
> complier, sure anybody has done it yet, can you help me with the

makefile

&|
> srcs? thanks

You can use the Scons build system. For this to work, you need
Python (www.python.org) and SCons (www.scons.org) installed on
your system. SCons will use the borland compiler, unless it finds
another one installed on the system first (ie. if you also have
VC installed, then that one will be used).

If all the tools are present, you should be able to build most of
Radiance that way on Windows. Open a console window ("DOS box")
and change to the "ray" directory. Then type "scons .", (or just
"scons bin/rtrace.exe") and the system should do the rest
automatically (depending on your installation, you may need to
specify a full path for SCons).

I assume that the borland compiler accepts different command line
arguments than VC though, so you will most likely have to do some
more editing. Copy the file "ray\platform\win32.cfg" to
"ray\platform\win32_custom.cfg" (the "*_custom.cfg" will be used
if present). Open the new file in a text editor, and modify the
CCFLAGS and LINKFLAGS variables in the [build] and [debug]
sections as needed. If you find a combination that works, please
send me the resulting file, and I'll see if I can integrate it in
a way that it gets selected automatically when borland tools are
used.

I haven't tried to build Radiance on Windows for a while, so you
might run into some problems. If you manage to identify the
causes of any stumbling blocks, or even better if you can whip
up some fixes, please send them to me, and I'll try to update the
CVS version accordingly.

-schorsch

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/

_______________________________________________
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

Another error, the libs need the .lib extension
ie
bcc32 -q /Lc:\cpp\ray\src\lib src\cv\arch2rad.obj src\cv\trans.obj
rtcont.lib rtmem.lib
but i dont know where change it (again)

scons: Reading SConscript files ...
Detected platform "win32" (nt).
Reading configuration "platform\win32_custom.cfg"
Checking for main() in C library GL... no
meta
cv
gen
ot
rt
px
hd
util
cal
scons: done reading SConscript files.
scons: Building targets ...
bcc32 -q /Lc:\cpp\ray\src\lib src\cv\mgflib\3ds2mgf.obj
src\cv\mgflib\rayopt.obj src\cv\mgflib\vect.obj src\lib\mgf.lib
bcc32 -q /Lc:\cpp\ray\src\lib src\cv\arch2rad.obj src\cv\trans.obj rtcont
rtmem
Error E2194: Could not find file 'rtcont.cpp'
Error E2194: Could not find file 'rtmem.cpp'
scons: building terminated because of errors.

···

----- Original Message -----
From: "Ignacio Mun�rriz" <[email protected]>
To: "code development" <[email protected]>
Sent: Saturday, February 26, 2005 11:20 AM
Subject: Re: [Radiance-dev] windows Borland Makefile for radiance

It is fixed changing scons\tool\bcc32.py but i dont know if it's the way.
arggg! now, learning python :slight_smile:

----- Original Message -----
From: "Ignacio Mun�rriz" <[email protected]>
To: "code development" <[email protected]>
Sent: Saturday, February 26, 2005 10:59 AM
Subject: Re: [Radiance-dev] windows Borland Makefile for radiance

> Georg, the first error
>
> scons: Reading SConscript files ...
> Detected platform "win32" (nt).
> Reading configuration "platform\win32_custom.cfg"
> Checking for main() in C library GL... no
> meta
> cv
> gen
> ot
> rt
> px
> hd
> util
> cal
> scons: done reading SConscript files.
> scons: Building targets ...
>

bcc32 -q -O2 -H -c -D_WIN32 -DNDEBUG -D_CONSOLE -D_MBCS -Isrc\common -c -o

> src\cv\mgflib\3ds2mgf.obj src\cv\mgflib\3ds2mgf.c
> Error E2194: Could not find file 'src\cv\mgflib\3ds2mgf.obj'
> src\cv\mgflib\3ds2mgf.c:
> Warning W8004 src\cv\mgflib\3ds2mgf.c 1277: 'spec' is assigned a value
that
> is never used in function write_pov10_material
> Warning W8004 src\cv\mgflib\3ds2mgf.c 1354: 'spec' is assigned a value
that
> is never used in function write_pov20_material
> Warning W8004 src\cv\mgflib\3ds2mgf.c 1565: 'total' is assigned a value
that
> is never used in function write_mgf_material
> Warning W8004 src\cv\mgflib\3ds2mgf.c 1560: 'smag' is assigned a value
that
> is never used in function write_mgf_material
> Warning W8004 src\cv\mgflib\3ds2mgf.c 1776: 'token' is assigned a value
that
> is never used in function parse_morph
> Warning W8004 src\cv\mgflib\3ds2mgf.c 2026: 'frame' is assigned a value
that
> is never used in function find_frame
> scons: building terminated because of errors.
>
> the problem is that -o must be close to the file, ie
>

bcc32 -q -O2 -H -c -D_WIN32 -DNDEBUG -D_CONSOLE -D_MBCS -Isrc\common -c -osr

> c\cv\mgflib\3ds2mgf.obj src\cv\mgflib\3ds2mgf.c
>
> but i dont know where change it
>
>
>
> ----- Original Message -----
> From: "Georg Mischler" <[email protected]>
> To: "code development" <[email protected]>
> Sent: Friday, February 25, 2005 2:36 PM
> Subject: Re: [Radiance-dev] windows Borland Makefile for radiance
>
>
> Ignacio Mun�rriz wrote:
>
> > I would like to export rtace to windows, building it with borland c++
> > complier, sure anybody has done it yet, can you help me with the
makefile
> &|
> > srcs? thanks
>
> You can use the Scons build system. For this to work, you need
> Python (www.python.org) and SCons (www.scons.org) installed on
> your system. SCons will use the borland compiler, unless it finds
> another one installed on the system first (ie. if you also have
> VC installed, then that one will be used).
>
> If all the tools are present, you should be able to build most of
> Radiance that way on Windows. Open a console window ("DOS box")
> and change to the "ray" directory. Then type "scons .", (or just
> "scons bin/rtrace.exe") and the system should do the rest
> automatically (depending on your installation, you may need to
> specify a full path for SCons).
>
> I assume that the borland compiler accepts different command line
> arguments than VC though, so you will most likely have to do some
> more editing. Copy the file "ray\platform\win32.cfg" to
> "ray\platform\win32_custom.cfg" (the "*_custom.cfg" will be used
> if present). Open the new file in a text editor, and modify the
> CCFLAGS and LINKFLAGS variables in the [build] and [debug]
> sections as needed. If you find a combination that works, please
> send me the resulting file, and I'll see if I can integrate it in
> a way that it gets selected automatically when borland tools are
> used.
>
> I haven't tried to build Radiance on Windows for a while, so you
> might run into some problems. If you manage to identify the
> causes of any stumbling blocks, or even better if you can whip
> up some fixes, please send them to me, and I'll try to update the
> CVS version accordingly.
>
>
> -schorsch
>
> --
> Georg Mischler -- simulations developer -- schorsch at schorsch com
> +schorsch.com+ -- lighting design tools -- http://www.schorsch.com/
>
> _______________________________________________
> 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
>

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

Ignacio Munárriz wrote:

Georg, the first error

the problem is that -o must be close to the file, ie
bcc32 -q -O2 -H -c -D_WIN32 -DNDEBUG -D_CONSOLE -D_MBCS -Isrc\common -c -osr
c\cv\mgflib\3ds2mgf.obj src\cv\mgflib\3ds2mgf.c

So you're saying that your version requires this:
... -osrc\cv\mgflib\3ds2mgf.obj ...
instead of this:
... -o src\cv\mgflib\3ds2mgf.obj ...
?

That seems to be a bug in bcc32.py, although I assume there
must be versions of bcc where it works as implemented.
There already was a bug report about this filed for SCons,
but I've just submitted a patch as well (trivial as it is).

I think you already found the file SCons/Tool/bcc32.py.
You don't really need to understand much of Python to fix it.
The change is in the two strings that contain the -o flag.

    env['CCCOM'] = '$CC -q $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o$TARGET $SOURCES'

  env['SHCCCOM'] = '$SHCC -WD $SHCCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o$TARGET $SOURCES'

The trick is just to remove the offending space character
in those two command line templates. After that, it should
work with your version of bcc too.

-schorsch

···

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/

Ignacio Munárriz wrote:

Another error, the libs need the .lib extension
ie
bcc32 -q /Lc:\cpp\ray\src\lib src\cv\arch2rad.obj src\cv\trans.obj
rtcont.lib rtmem.lib
but i dont know where change it (again)

My guess would be the ilink32.py file in the same location.
Add a line linke this at the end of the other environment
initializations:

    env['LINKSUFFIX']='.lib'

Make sure that there are exactly four space characters in
front of the "env", because indentation is significant in Python.
If that works, then I'll submit it as another patch to SCons.

-schorsch

···

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/

finally i got it, many warnings and some errors(fixed) but it works, and i
got the all radiance binaries except rananimate(a win_kill problem),

in ilink32.py i had to use
env['LINKCOM'] = '$LINK -q $LINKFLAGS $SOURCES ${_concat(LIBLINKPREFIX,
LIBS, LIBLINKSUFFIX, __env__)}'

because

env['LINKSUFFIX']='.lib' did not work

if you want i'll try to recompile and recopile the radiance building errors
and the fixes, because i have not write them
thanks,

ignacio

···

----- Original Message -----
From: "Georg Mischler" <[email protected]>
To: "code development" <[email protected]>
Sent: Saturday, February 26, 2005 4:17 PM
Subject: Re: [Radiance-dev] windows Borland Makefile for radiance

Ignacio Mun�rriz wrote:

Another error, the libs need the .lib extension
ie
bcc32 -q /Lc:\cpp\ray\src\lib src\cv\arch2rad.obj src\cv\trans.obj
rtcont.lib rtmem.lib
but i dont know where change it (again)

My guess would be the ilink32.py file in the same location.
Add a line linke this at the end of the other environment
initializations:

    env['LINKSUFFIX']='.lib'

Make sure that there are exactly four space characters in
front of the "env", because indentation is significant in Python.
If that works, then I'll submit it as another patch to SCons.

-schorsch

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

i've put the binarys at http://www.alfanature.com/radiance/radiance-bin.zip

···

----- Original Message -----
From: "Jelle Feringa / EZCT Architecture & Design Research"
<[email protected]>
To: <[email protected]>
Sent: Saturday, May 28, 2005 3:20 PM
Subject: windows Borland Makefile for radiance

Dear Ignacio,

I'm looking into compiling the radiance code into a win32 binary.
I've been over your posts on the code development mailing list, and am
wondering if you would be willing to share your binaries with me, since

I'm

unfamiliar with C compiling (I'm a python fan!) and this seems Far from
trivial!

Cheers,

Jelle Feringa.

yes i forgot it too, use :
RAPATH=c:/ray/lib;.

ATTENTION you must use / and not \ in the RAYPATH variable

very nice your work in the EZCT, i would like we'd do it spain , but our
architecture schools are yet with lightscape :slight_smile:

···

----- Original Message -----
From: "Jelle Feringa / EZCT Architecture & Design Research"
<[email protected]>
To: "'Ignacio Mun�rriz'" <[email protected]>
Sent: Sunday, May 29, 2005 1:57 PM
Subject: RE: windows Borland Makefile for radiance

Oops, forgot,

I used to work with the old dtp-rad binaries, which use the registry to find
the .cal files. Unless I put the .cal's in the dir. my radiance files are
located in, your binaries don't find them. Is there an environment variable
I can use? The right directory is in fact in my Path, so that's a bit
puzzling?

Cheers,

Jelle.