POV-Ray : Newsgroups : povray.programming : POVWIN 3.1a source code. Server Time
29 Jul 2024 12:14:44 EDT (-0400)
  POVWIN 3.1a source code. (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: povray org admin team
Subject: POVWIN 3.1a source code.
Date: 16 Oct 1998 10:40:49
Message: <362c4a05.14508632@news.povray.org>
We're about to release the POVWIN 3.1a source code. It's also had a few minor
post-3.1a tweaks, mostly to font handling in the message window and editor.

We're posting it in a private dir on povray.org first so that some users can
sanity-check it (it's not yet on in the public dir area on povray.org or
Compuserve).

If you can, please grab and compile it. To do so you'll need either Borland C
v5.02, Watcom C v11.0, or Visual C++ v5.0 (unless you want to roll your own
makefile). You'll find the archive at this URL -

  ftp://ftp.povray.org/pub/test/povwin_s.zip
or
  http://www.povray.org/ftp/pub/test/povwin_s.zip

Note that you are not able to compile the editor code - it's there for
reference only (the reason is explained in the editor code readme).

Once you've made the change to pvengine.h (see the comments below), as long as
you're using one of the above compilers, it should build 'out of the box'.

Please do NOT redistribute this - wait for the official povray.org or
compuserve archive.

Here's the README.NOW that is in the main source code archive.

-------------------------------------------------------------------------------

$Id: //depot/POVRAY/povwin/source/windows/README.NOW#3$

You will need a pre-installed version of POV-Ray for Windows v3.1a (or a
compatible version) on your system to be able to run the pvengine.exe that
you can compile from this source.

NOTE that unless you are using Borland or Watcom compilers, you will need to
either roll your own compile of ZTimer using the supplied source code, or make
sure that you DO NOT define PRECISION_TIMER_AVAILABLE in CONFIG.H. If you want
to make your own compile of ZTimer, please remember that we cannot help you
with this.

If you are not using Borland or Watcom you will also need to compile ZLib and
LibPng. If you're lucky, there will be a makefile there that suits your
compiler. If not, again, you're on your own.

You must recreate the bitmaps splash5-8bpp.cmp and splash5-pal.bmp that are
in the bitmaps\ dir if you want to distribute your compile. When you do you
must include our copyright statement and clearly indicate that you have made
a derived version. You MAY NOT remove the splash screen code that shows this
bitmap at startup !

There is a VC5 subdirectory which was contributed by a user for Version 3.1.
We haven't tested this. Make sure you read the CMPL_VC5.TXT file in there if
you want to use it.

If you are doing a Borland compile of Libpng/zlib, and you don't have the DOS
powerpack, the build of the text .exe's will fail. This is harmless ; the .LIB
files will be there and that's all you really need. Make sure you use the make
files called MAKEFILE.B32, not MAKEFILE.BOR, to build these libraries.

Note that Libpng depends on ZLib so you will want to compile ZLib first.

Make sure you READ the TXT files in either the Borland or Watcom
subdirectories.

This source code is ENTIRELY UNSUPPORTED. Please do NOT write the POV-Team for
help in compiling this code. You are on your own.

You MAY NOT distribute an unofficial compile unless you comply with
POVLEGAL.DOC and also comply with the following instructions.

You must customise the UNOFFICIALCOMPILE define in PVENGINE.H to give your
name and a valid email address (or postal mail if you don't have email).

NO PART of this source code may be used in any other program under any
circumstances unless explicit permission is given by the author(s) of the
particular source code segment.

You MAY NOT alter any of the copyright notices in this source code. If you want
to add further copyright notices for your own modifications, add them in a
seperate notice after our own ones.

You MAY NOT remove or alter any of the source code that is used to display or
print copyright and authorship notices. You may not remove or alter the code
that is used to print the UNOFFICIALCOMPILE define message. You must also
customise UNOFFICIALCOMPILE as mentioned above, to give your real name and
email address.

You MUST provide your own splash bitmap that clearly identifies this as an
unofficial compile and gives your name and email address as above.

You must distribute the appropriate help files with any unofficial compile. You
may not modify the about box in any way that alters its function or that
obscures any existing text on it, or alters or obscures the function of the
four buttons on it. The help files that you provide must work such that the
function of the buttons are preserved.

NOTE !!!

The C++Builder files in this archive have LONG FILE NAMES. Make sure you used
an unzipper that supports long filenames.

------------------------------------------------------------------------------

COMPILE.DOC

------------------------------------------------------------------------------

COMPILING SOURCE CODE DOCUMENTATION FOR POV-Ray 3.1

0.0   WINDOWS ADDENDUM

These are more or less generic compile instructions, not specific to the
Windows version.

1.0   INTRODUCTION AND DISCLAIMERS

This documentation is to help you compile the portable C source code into a 
working executable version of POV-Ray.  This is only for those people who 
want to compile a custom version of POV-Ray or to port it to an unsupported 
platform or compiler.  

This documentation DOES NOT tell you how to use POV-Ray. User documentation, 
sample scenes and scene "include" files are in the archives which contain the 
pre-compiled executable versions or as a separate archive for Unix users who 
have no official executable versions.  You MUST HAVE the user documentation and

sample scenes to use POV-Ray. See the file POVWHERE.GET for details on what to 
get and where to get it.

The first question you should ask yourself before proceeding is "Do I really 
need to compile POV-Ray at all?"  Official POV-Ray Team executable versions are

available for MS-Dos, Windows 3.1x/95/NT, Mac 68k, Mac Power PC, Linux for 
Intel x86, and SunOS.  Other unofficial compiles may soon be available for 
other platforms.  If you do not intend to add any custom or experimental 
features to the program, and if an executable already exists for your platform 
then you need not compile this program yourself.

If you do want to proceed, you should be aware that you are very nearly on your

own.  This documentation and other related compiling documentation assumes you 
know what you are doing.  It assumes you have an adequate C compiler installed 
and working.  It assumes you know how to compile and link large, multi-part 
programs using a "make" utility or an IDE project file if your compiler 
supports them.  Because makefiles and project files often specify drive, 
directory or path information, we cannot promise our makefiles or projects will

work on your system.  We assume you know how to make changes to makefiles and 
projects to specify where your system libraries and other necessary files are 
located.

In general you should not expect any technical support from the POV-Ray Team on

how to compile the program.  Everything is provided here "as is".  All we can 
say with any certainty is that we were able to compile it on our systems.  If 
it doesn't work for you, we probably cannot tell you why.

There is no technical documentation for the source code itself except for the 
comments in the source files.  We try our best to write clear, well- commented 
code but some sections are barely commented at all and some comments may be out

dated.  We do not provide any technical support to help you to add features.  
We do not explain how a particular feature works.  In some instances, the 
person who wrote a part of the program is no longer active in the Team and we 
don't know exactly how it works.

When making any custom version of POV-Ray or any unofficial compile, please 
make sure you read and follow all provisions of our license in the file 
POVLEGAL.DOC.  In general you can modify and use POV-Ray on your own however 
you want but if you distribute your unofficial version you must follow our 
rules.  You may not under any circumstances use portions of POV-Ray source 
code in other programs.


2.0   DIRECTORY STRUCTURE

POV-Ray source code is distributed in archives with files arranged in a 
particular hierarchy of directories or folders.  When extracting the archives, 
you should do so in a way that keeps the directory structure intact.  In 
general we suggest you create a directory called \povray3 and extract the files

from there.  The extraction will create a directory called "source" with many 
files and sub-directories from it.  

In general, there are separate archives for each hardware platform and 
operating system but each of these archives may support more than one compiler.

For example here is the directory structure for the MS-Dos archive.

   SOURCE
   SOURCE\LPNG101
   SOURCE\ZLIB
   SOURCE\MSDOS
   SOURCE\MSDOS\PMODE
   SOURCE\MSDOS\ZTIMER
   SOURCE\MSDOS\BORLAND
   SOURCE\MSDOS\DJGPP
   SOURCE\MSDOS\WATCOM

The SOURCE directory contains source files for the generic parts of POV-Ray 
that are the same on all platforms.  The SOURCE\LIBPNG contains files for 
compiling a library of routines used in reading and writing PNG (Portable 
Network Graphics) image files.  The SOURCE\ZLIB contains files for compiling a 
library of routines used by LIBPNG to compress and uncompress data streams.  
All of these files are used by all platforms and compilers.  They are in every 
version of the source archives.

The SOURCE\MSDOS directory contains source files for the MS-Dos version that 
are common to all supported MS-Dos compilers.  The SOURCE\MSDOS\PMODE 
SOURCE\MSDOS\ZTIMER directories contain source files for PMODE.LIB and 
ZTIMER.LIB which are required by all MS-Dos versions.  The 
SOURCE\MSDOS\BORLAND, SOURCE\MSDOS\DJGPP, and SOURCE\MSDOS\WATCOM directories 
contain source, makefiles and project files for C compilers by Borland, DJGPP, 
and Watcom.  

The SOURCE\MSDOS directory is only in the MS-Dos archive.  Similarly the 
Windows archive contains a SOURCE\WINDOWS directory.  The Unix archive contains

source/unix etc.

The SOURCE\MSDOS directory contains a file CMPL_MSD.DOC which contains 
compiling information specific to the MS-Dos version.  Other platform specific 
directories contain similar CMPL_xxx.DOC files and the compiler specific 
sub-directories also contain compiler specific CMPL_xxx.DOC files.  Be sure to 
read all pertinent CMPL_xxx.DOC files for your platform and compiler.


3.0   CONFIGURING POV-Ray SOURCE

Every platform has a header file "config.h" that is generally in the platform 
specific directory but may be in the compiler specific directory.  Some 
platforms have multiple versions of this file and you may need to copy or 
rename it as config.h.  This file is #included in every module of POV- Ray.  It

contains any prototypes, macros or other definitions that may be needed in the 
generic parts of POV-Ray but must be customized for a particular platform or 
compiler.

For example different operating systems use different characters as a separator

between directories and file names.  MS-Dos uses back slash, Unix a front 
slash, or Mac a colon.  The config.h file for MS-Dos and Windows contains the 
following:

  #define FILENAME_SEPARATOR '\\'

which tells the generic part of POV-Ray to use a back slash.  

Every customization that the generic part of the code needs has a default 
setting in the file SOURCE\FRAME.H which is also included in every module after

config.h.  The frame.h header contains many groups of defines such as this:

  #ifndef FILENAME_SEPARATOR
  #define FILENAME_SEPARATOR '/'
  #endif

which basically says "if we didn't define this previously in config.h then 
here's a default value."  See frame.h to see what other values you might wish 
to configure.  

If any of the definitions are used to specify platform specific functions, you 
should also include a prototype for that function.  For example the file 
source\msdos\config.h not only contains the macro:

 #define POV_DISPLAY_INIT(w,h) MSDOS_Display_Init ((w), (h));

to define the name of the graphics display initialization function, it contains

the prototype:

 void MSDOS_Display_Init (int w, int h);

If you plan to port POV-Ray to an unsupported platform, you should probably 
start with the simplest, non-display generic Unix version.  Then add new custom

pieces via the config.h file.


4.0   CONCLUSION

We understand that this file is only the most trivial first steps but half the 
fun of working on POV-Ray source is digging in and figuring it out on your own.

That's how the POV-Ray Team members got started.  We've tried to make the code 
as clear as we can.

Be sure to read the CMPL_xxx.DOC files in your platform specific and compiler 
specific directories for some more minor help if you are working on a supported

platform or compiler.

Good luck!


Post a reply to this message

From: Ron Parker
Subject: Re: POVWIN 3.1a source code.
Date: 16 Oct 1998 12:10:58
Message: <36276202.0@news.povray.org>
On Fri, 16 Oct 1998 13:41:35 GMT, povray.org admin team 
	<new### [at] DESPAMpovrayorg> wrote:
>We're about to release the POVWIN 3.1a source code. It's also had a few minor
>post-3.1a tweaks, mostly to font handling in the message window and editor.

When I build it, there's an ugly dark horizontal line across the 
message window background at regular intervals.  It looks like the
tile bitmap is one row smaller than POV thinks it is.  I'm building 
in release mode on VC++5.0 SP3 on a P-II/333 on WinNT 5.0 beta 2
and my video is an AGP Diamond Stealth 3D/ViRGE GX2 at 1152x864x16 
bits.

>Once you've made the change to pvengine.h (see the comments below), as long as
>you're using one of the above compilers, it should build 'out of the box'.

I notice in the comments that the splash screen now requires your
copyright message.  I'm neither for nor against this; I just thought
it was worth singling out so everyone knows about it.  It might
help, too, to put the exact text of the copyright message into
the readme file so we know exactly what we're expected to include.

Thanks for putting the #error into pvengine.h.  That additional 
change is easy to overlook otherwise (just look at the superpatch
beta... I overlooked it.)  I'm curious, though, why the message 
from optout.h wasn't sufficient.

There is one problem with building "out of the box" on VC++ 5.0 in
release mode.  The linker settings do not include comctl32.lib.
I seem to recall that this was a problem in the 3.02 version as well.
However, add that library and the build works just fine.  When I
try to run it after building, though, it tells me that everything
is out of date and needs to be rebuilt.  I'm not sure if this is
a problem with the project or a quirk of my configuration, but I
know that my real work doesn't suffer from this problem.  If I 
ignore that message and go on, everything works just fine except
for the black line in the message window.

Other patchers should note, too, that there's a difference between 
this version and the 3.0x version: the editor DLLs apparently must 
be in the directory the executable was started from rather than in
the 'home' directory as on 3.0x.


Post a reply to this message

From: povray org admin team
Subject: Re: POVWIN 3.1a source code.
Date: 16 Oct 1998 12:37:37
Message: <36276459.21248143@news.povray.org>
>When I build it, there's an ugly dark horizontal line across the 
>message window background at regular intervals.  It looks like the

I didn't get that (I did test the VC5 compile, though it says I didn't).

>I notice in the comments that the splash screen now requires your
>copyright message.  I'm neither for nor against this; I just thought
>it was worth singling out so everyone knows about it.  It might

It makes sense to do that - there's little point in having someone else's
copyright in a splash screen without our own.

>help, too, to put the exact text of the copyright message into
>the readme file so we know exactly what we're expected to include.

Well, I kinda of left it up to the implementors common sense. Something like
'based on POV-Ray for Windows v3.1a (c) 1998 POV-Team' would do.

>beta... I overlooked it.)  I'm curious, though, why the message 
>from optout.h wasn't sufficient.

If you're referring to the 'UNOFFICIALCOMPILE' define, that's not new. It's
been there for at least two years (to my recollection). It's certainly in the
3.01 source.

>Other patchers should note, too, that there's a difference between 
>this version and the 3.0x version: the editor DLLs apparently must 
>be in the directory the executable was started from rather than in
>the 'home' directory as on 3.0x.

Not so. They must be in the 'bin' directory underneath the POV-Ray install dir.
The location of the install dir is obtained from the INI file and is not
dependent on where you run the EXE from. This is basically the same scheme as
3.0x.

If you want to put them (the DLL's) somewhere else, #define DEVELOPMENT in
pvengine.c, and/or look at line 4886 and modify to suit.


Post a reply to this message

From: Ron Parker
Subject: Re: POVWIN 3.1a source code.
Date: 16 Oct 1998 12:57:41
Message: <36276cf5.0@news.povray.org>
On Fri, 16 Oct 1998 15:38:28 GMT, povray.org admin team 
	<new### [at] DESPAMpovrayorg> wrote:
>>beta... I overlooked it.)  I'm curious, though, why the message 
>>from optout.h wasn't sufficient.
>
>If you're referring to the 'UNOFFICIALCOMPILE' define, that's not new. It's
>been there for at least two years (to my recollection). It's certainly in the
>3.01 source.

Believe me, I know.  I'm embarassed that I forgot to make that change in the
superpatch beta, which is why I'm thankful for the #error that's been added.  
But I was just idly wondering why it was necessary even in 3.0x.  The text 
from optout.h gets displayed in the message window as well, right?  Not 
that there's anything wrong with it, but it just seems redundant.

>>Other patchers should note, too, that there's a difference between 
>>this version and the 3.0x version: the editor DLLs apparently must 
>>be in the directory the executable was started from rather than in
>>the 'home' directory as on 3.0x.
>
>Not so. They must be in the 'bin' directory underneath the POV-Ray install dir.
>The location of the install dir is obtained from the INI file and is not
>dependent on where you run the EXE from. This is basically the same scheme as
>3.0x.

Then there's a problem, because my build gave me errors until I put the 
DLLs in the build directory.  It loads cmedit.dll from the home directory, 
but not cmax101.dll.  The problem is, cmedit implicitly loads cmax101, and 
windows can't find cmax101 in the default search path (it's a little-known 
fact that the search path does _not_ include the path from which the 
current module, in this case cmedit, was loaded.) If the povray home 
directory is in your path, or if your current directory is the home 
directory, this problem will not appear.


Post a reply to this message

From: povray org admin team
Subject: Re: POVWIN 3.1a source code.
Date: 16 Oct 1998 13:05:15
Message: <36276ee3.23946783@news.povray.org>
The source has been removed to fix an error in a header file.


Post a reply to this message

From: povray org admin team
Subject: Re: POVWIN 3.1a source code.
Date: 16 Oct 1998 13:11:07
Message: <36286efd.23972750@news.povray.org>
>superpatch beta, which is why I'm thankful for the #error that's been added.  
>But I was just idly wondering why it was necessary even in 3.0x.  The text 
>from optout.h gets displayed in the message window as well, right?  Not 
>that there's anything wrong with it, but it just seems redundant.

It's not redundant. The optout.h message gets displayed when you start a
render. The pvengine.h one gets shown when PVENGINE loads. That's why there's
two. While I could display the other one, I chose to use a one-liner for the
initial on-load message.

>Then there's a problem, because my build gave me errors until I put the 
>DLLs in the build directory.  It loads cmedit.dll from the home directory, 
>but not cmax101.dll.  The problem is, cmedit implicitly loads cmax101, and 
>windows can't find cmax101 in the default search path (it's a little-known 
>fact that the search path does _not_ include the path from which the 
>current module, in this case cmedit, was loaded.) If the povray home 
>directory is in your path, or if your current directory is the home 
>directory, this problem will not appear.

ok, good point. I forgot about cmax101.dll (we didn't have two DLL's in the
previous version). I never noticed it here since I also have cmax101 in my
system32 directory. I'll add a comment to that effect in the readme.

I've pulled the archive offline anyhow because I forgot to remove the
'official' bit from optout.h.


Post a reply to this message

From: Ron Parker
Subject: Re: POVWIN 3.1a source code.
Date: 16 Oct 1998 13:23:37
Message: <36277309.0@news.povray.org>
On Fri, 16 Oct 1998 16:12:00 GMT, povray.org admin team 
	<new### [at] DESPAMpovrayorg> wrote:

>It's not redundant. The optout.h message gets displayed when you start a
>render. The pvengine.h one gets shown when PVENGINE loads. That's why there's
>two. While I could display the other one, I chose to use a one-liner for the
>initial on-load message.

Okay, that makes sense.  It's not a problem anymore anyway, not that it 
ever really was, because nobody will ever forget to change it again with 
that #error directive in there. :)

Thanks for another great job.  I'm definitely looking forward to the 
official source release.


Post a reply to this message

From: Mark Arrasmith
Subject: Re: POVWIN 3.1a source code.
Date: 16 Oct 1998 16:47:14
Message: <3627a2c2.0@news.povray.org>
Well, I can now say I have a native AlphaNT version running.  Sorry I
couldn't send you an Alpha for you to make an official version with :-)
That and I'm not good enough of a programmer to really help.

Notes on compiling using VC++ 5.0 on AlphaNT.

Compiled pretty much straight out.  I added comctl32.lib to the link list
and changed pvengine.c somewhat.  For some reason in the
PovUnhandledExceptionFilter at line 309

sprintf (str, "An exception was generated at address %08lX\n\nPOV-Ray will
now exit", c->Eip) ;

I get the error:
..\PVENGINE.C(309) : error C2039: 'Eip' : is not a member of '_CONTEXT'

If I comment out all of PovUnhandledExceptionFilter it compiles and seems to
run ok.  I had to do this for the compile of 3.01 on AlphaNT also.

On running the new executable.

With the blue rock tile I see the same line as what Ron saw in the message
window.  And because I can't use the new edit control I delete the dll's out
of the bin directory.  When POV-Ray runs the first time it complains that it
doesn't find the edit control and then starts.  But, unlike 3.01 every time
it runs it reminds me.  At least until I go and set UseEditors=0 in
pvengine.ini.  3.01 did this for me before.

Other than that, it looks great.

- mark


Post a reply to this message

From: Ron Parker
Subject: Re: POVWIN 3.1a source code.
Date: 16 Oct 1998 17:16:48
Message: <3627a9b0.0@news.povray.org>
On Fri, 16 Oct 1998 14:48:33 -0500, Mark Arrasmith 
	<arr### [at] mathtwsuedu> wrote:
>Compiled pretty much straight out.  I added comctl32.lib to the link list
>and changed pvengine.c somewhat.  For some reason in the
>PovUnhandledExceptionFilter at line 309
>
>sprintf (str, "An exception was generated at address %08lX\n\nPOV-Ray will
>now exit", c->Eip) ;
>
>I get the error:
>..\PVENGINE.C(309) : error C2039: 'Eip' : is not a member of '_CONTEXT'
>
>If I comment out all of PovUnhandledExceptionFilter it compiles and seems to
>run ok.  I had to do this for the compile of 3.01 on AlphaNT also.

This is to be expected.  CONTEXT is the processor state at the time of the
exception.  EIP (or Eip) is the instruction pointer.  Looking in the winnt.h
that ships with the NT5 DDK, it looks like you want the Fir member instead,
defined as:

ULONGLONG Fir;      // (fault instruction) continuation address

Since this is a long long, you'll also want to use something besides %08lX 
for a format specifier.


Post a reply to this message

From: povray org admin team
Subject: Re: POVWIN 3.1a source code.
Date: 16 Oct 1998 21:19:08
Message: <3627e27e.53541238@news.povray.org>
>sprintf (str, "An exception was generated at address %08lX\n\nPOV-Ray will
>now exit", c->Eip) ;
>
>I get the error:
>..\PVENGINE.C(309) : error C2039: 'Eip' : is not a member of '_CONTEXT'

ah, good point. that's a Intel-ism. As I don't use that code I'll #define it
out.

>With the blue rock tile I see the same line as what Ron saw in the message
>window.  And because I can't use the new edit control I delete the dll's out

hmmm, weird. I'll have to see if I can find the cause of that.


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.