home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / povray3a / Docs / Compile < prev    next >
Text File  |  1996-07-25  |  8KB  |  164 lines

  1. COMPILING SOURCE CODE DOCUMENTATION FOR POV-Ray 3.0
  2.  
  3. 1.0   INTRODUCTION AND DISCLAIMERS
  4.  
  5. This documentation is to help you compile the portable C source code into a 
  6. working executable version of POV-Ray.  This is only for those people who 
  7. want to compile a custom version of POV-Ray or to port it to an unsupported 
  8. platform or compiler.  
  9.  
  10. This documentation DOES NOT tell you how to use POV-Ray.  User 
  11. documentation, sample scenes and scene "include" files are in the archives 
  12. which contain the pre-compiled executable versions or as a separate archive 
  13. for Unix users who have no official executable versions.  You MUST HAVE the 
  14. user documentation and sample scenes to use POV-Ray. See the file 
  15. POVWHERE.GET for details on what to get and where to get it.
  16.  
  17. The first question you should ask yourself before proceeding is "Do I 
  18. really need to compile POV-Ray at all?"  Official POV-Ray Team executable 
  19. versions are available for MS-Dos, Windows 3.1x/95/NT, Mac 68k, Mac Power 
  20. PC, Amiga, Linux for Intel x86, and SunOS.  Other unofficial compiles may 
  21. soon be available for other platforms.  If you do not intend to add any 
  22. custom or experimental features to the program, and if an executable 
  23. already exists for your platform then you need not compile this program 
  24. yourself.
  25.  
  26. If you do want to proceed, you should be aware that you are very nearly on 
  27. your own.  This documentation and other related compiling documentation 
  28. assumes you know what you are doing.  It assumes you have an adequate C 
  29. compiler installed and working.  It assumes you know how to compile and 
  30. link large, multi-part programs using a "make" utility or an IDE project 
  31. file if your compiler supports them.  Because makefiles and project files 
  32. often specify drive, directory or path information, we cannot promise our 
  33. makefiles or projects will work on your system.  We assume you know how to 
  34. make changes to makefiles and projects to specify where your system 
  35. libraries and other necessary files are located.
  36.  
  37. In general you should not expect any technical support from the POV-Ray 
  38. Team on how to compile the program.  Everything is provided here "as is".  
  39. All we can say with any certainty is that we were able to compile it on our 
  40. systems.  If it doesn't work for you, we probably cannot tell you why.
  41.  
  42. There is no technical documentation for the source code itself except for 
  43. the comments in the source files.  We try our best to write clear, well-
  44. commented code but some sections are barely commented at all and some 
  45. comments may be out dated.  We do not provide any technical support to help 
  46. you to add features.  We do not explain how a particular feature works.  In 
  47. some instances, the person who wrote a part of the program is no longer 
  48. active in the Team and we don't know exactly how it works.
  49.  
  50. When making any custom version of POV-Ray or any unofficial compile, please 
  51. make sure you read and follow all provisions of our license in the file 
  52. POVLEGAL.DOC.  In general you can modify and use POV-Ray on your own 
  53. however you want but if you distribute your unofficial version you must 
  54. follow our rules.  You may not under any circumstances use portions of POV-
  55. Ray source code in other programs.
  56.  
  57.  
  58. 2.0   DIRECTORY STRUCTURE
  59.  
  60. POV-Ray source code is distributed in archives with files arranged in a 
  61. particular hierarchy of directories or folders.  When extracting the 
  62. archives, you should do so in a way that keeps the directory structure 
  63. intact.  In general we suggest you create a directory called \povray3 and 
  64. extract the files from there.  The extraction will create a directory 
  65. called "source" with many files and sub-directories from it.  
  66.  
  67. In general, there are separate archives for each hardware platform and 
  68. operating system but each of these archives may support more than one 
  69. compiler.  For example here is the directory structure for the Unix
  70. archive.
  71.  
  72.    source
  73.    source/libpng
  74.    source/zlib
  75.    source/unix
  76.  
  77. The source directory contains source files for the generic parts of POV-Ray 
  78. that are the same on all platforms.  The source/libpng contains files for 
  79. compiling a library of routines used in reading and writing PNG (Portable 
  80. Network Graphics) image files.  The source/zlib contains files for 
  81. compiling a library of routines used by libPNG to compress and uncompress 
  82. data streams.  All of these files are used by all platforms and compilers.  
  83. They are in every version of the source archives.
  84.  
  85. The source/unix directory contains source files for the Unix version 
  86. that are common to all supported Unix systems.  POV-Ray was developed
  87. on Linux and SunOS systems using the GNU ANSI C compiler (gcc), but has
  88. also been compiled and tested using the IBM xlc compiler under AIX.  It
  89. should also compile with the older K&R style compilers, but this hasn't
  90. been extensively tested.
  91.  
  92. The source/unix directory is only in the Unix archive.  The DOS archive
  93. contains SOURCE\MSDOS.  Similarly the Windows archive contains a
  94. SOURCE\WINDOWS directory, etc.
  95.  
  96. The source/unix directory contains a file CMPL_Unix.doc which contains 
  97. compiling information specific to the Unix version. There is also the
  98. README.unix which contains other important information specific to the
  99. Unix versions.  Other platform specific directories contain similar
  100. CMPL_xxx.DOC files.  Be sure to read all pertinent CMPL_xxx.doc files
  101. for your platform and compiler.
  102.  
  103.  
  104. 3.0   CONFIGURING POV-Ray SOURCE
  105.  
  106. Every platform has a header file "config.h" that is generally in the 
  107. platform specific directory but may be in the compiler specific directory.  
  108. Some platforms have multiple versions of this file and you may need to copy 
  109. or rename it as config.h.  This file is #included in every module of POV-
  110. Ray.  It contains any prototypes, macros or other definitions that may be 
  111. needed in the generic parts of POV-Ray but must be customized for a 
  112. particular platform or compiler.
  113.  
  114. For example different operating systems use different characters as a 
  115. separator between directories and file names.  MS-Dos uses back slash,
  116. Unix a front slash, or Mac a colon.  The config.h file for all MS-DOS
  117. versions contains the following:
  118.  
  119.   #define FILENAME_SEPARATOR '\'
  120.  
  121. which tells the generic part of POV-Ray to use a '\' to denote a directory.
  122.  
  123. Every customization that the generic part of the code needs has a default 
  124. setting in the file source/frame.h which is also included in every module 
  125. after config.h.  The frame.h header contains many groups of defines such as 
  126. this:
  127.  
  128.   #ifndef FILENAME_SEPARATOR
  129.   #define FILENAME_SEPARATOR '/'
  130.   #endif
  131.  
  132. which basically says "if we didn't define this previously in config.h then 
  133. here's a default value."  See frame.h to see what other values you might 
  134. wish to configure.  
  135.  
  136. If any of the definitions are used to specify platform specific functions, 
  137. you should also include a prototype for that function.  For example the 
  138. file source/unix/xwinconf.h not only contains the macro:
  139.  
  140.  #define POV_DISPLAY_INIT(w,h) XWIN_display_init (w, h);
  141.  
  142. to define the name of the graphics display initialization function, it 
  143. contains the prototype:
  144.  
  145.  void XWIN_Display_Init (int w, int h);
  146.  
  147. If you plan to port POV-Ray to an unsupported platform, you should probably 
  148. start with the simplest, non-display generic Unix version.  Then add new 
  149. custom pieces via the config.h file.
  150.  
  151.  
  152. 4.0   CONCLUSION
  153.  
  154. We understand that this file is only the most trivial first steps but half 
  155. the fun of working on POV-Ray source is digging in and figuring it out on 
  156. your own.  That's how the POV-Ray Team members got started.  We've tried to 
  157. make the code as clear as we can.
  158.  
  159. Be sure to read the CMPL_xxx.doc files in your platform specific and 
  160. compiler specific directories for some more minor help if you are working 
  161. on a supported platform or compiler.
  162.  
  163. Good luck!
  164.