Install.xml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <?xml-stylesheet type="text/xsl" href="../Xsl/doc2html.xsl"?>
  3. <doc>
  4. <title>Install and Compile</title>
  5. <chapter>
  6. <title>Install and Compile</title>
  7. <par>
  8. Simply extract contents of distributed archive somewhere
  9. on your hard disk and Imaging is installed.
  10. However, you need to setup your compilers to be able to compile
  11. Imaging.
  12. </par>
  13. <table>
  14. <title>Source directories needed to be known by compilers</title>
  15. <row>
  16. <th>Directory</th>
  17. <th>Contents</th>
  18. </row>
  19. <row>
  20. <td><keyword>(Imaging Root)\Source</keyword></td>
  21. <td>Imaging library source code</td>
  22. </row>
  23. <row>
  24. <td><keyword>(Imaging Root)\Source\JpegLib</keyword></td>
  25. <td>JpegLib needed by Imaging to load/save JPEG/JNG images</td>
  26. </row>
  27. <row>
  28. <td><keyword>(Imaging Root)\Source\ZLib</keyword></td>
  29. <td>ZLib needed by Imaging to decode/decode PNG/MNG image data and other things</td>
  30. </row>
  31. <row>
  32. <td><keyword>(Imaging Root)\Source\Projects</keyword></td>
  33. <td>Project files for libraries and packages</td>
  34. </row>
  35. <row>
  36. <td><keyword>(Imaging Root)\Source\Extensions</keyword></td>
  37. <td>Imaging extensions source code</td>
  38. </row>
  39. <row>
  40. <td><keyword>(Imaging Root)\Source\Wrappers\*</keyword></td>
  41. <td>Wrappers for other languages</td>
  42. </row>
  43. <row>
  44. <td><keyword>(Imaging Root)\Demos\ObjectPascal\Common</keyword></td>
  45. <td>Some common routines used by Object Pascal demos</td>
  46. </row>
  47. <row>
  48. <td><keyword>(Imaging Root)\Extras\Extensions</keyword></td>
  49. <td>Extras extensions source code (mainly new file formats)</td>
  50. </row>
  51. <row>
  52. <td><keyword>(Imaging Root)\Extras\Extensions\J2KObjects</keyword></td>
  53. <td>Dir with static libraries needed for FPC if you have
  54. JPEG 2000 support enabled. Must be added to FPC library path (-Fl).</td>
  55. </row>
  56. <row>
  57. <td><keyword>(Imaging Root)\Extras\Extensions\LibTiff</keyword></td>
  58. <td>Needed for <link url="../FileFormats/Tiff.xml">TIFF</link> support in Delphi.</td>
  59. </row>
  60. </table>
  61. <lcap>Compiler Setup</lcap>
  62. <mcap>Compiling Library</mcap>
  63. <scap>Delphi/Kylix Setup</scap>
  64. <par>
  65. You need to add directories listed in the above
  66. table to library path.
  67. </par>
  68. <olist>
  69. <li>Choose <mitem>Tools<inimg url="../../Common/path.png" />Options<inimg
  70. url="../../Common/path.png" />Environment Options<inimg
  71. url="../../Common/path.png" />Delphi Options<inimg
  72. url="../../Common/path.png" />Library - Win32</mitem>
  73. in Delphi 2005+ or <mitem>Tools<inimg
  74. url="../../Common/path.png" />Environment Options<inimg
  75. url="../../Common/path.png" />Library</mitem> in Delphi 7- and Kylix.
  76. </li>
  77. <li>Add directories to <mitem>Library path</mitem> string.</li>
  78. </olist>
  79. <scap>Free Pascal Setup</scap>
  80. <par>
  81. You can write settings to <keyword>fpc.cfg</keyword> configuration
  82. file or use them directly as command line parameters
  83. </par>
  84. <olist>
  85. <li>
  86. Use <keyword>-FuUnitPath</keyword> parameter for all
  87. directories listed in the above table and <keyword>-FiIncludePath</keyword>
  88. only for <keyword>(Imaging_Root)\Source</keyword> directory.
  89. Also library path must me added for JPEG2000
  90. (Imaging Root\Extras\Extensions\J2KObjects) using <keyword>-FlLibPath</keyword>.
  91. Example: <keyword>fpc -FuD:\Imaging\Source -FuD:\Imaging\Source\JpegLib ... -FiD:\Imaging\Source</keyword>
  92. </li>
  93. <li>
  94. You should also set compiler mode and other compilation specific options.
  95. I use <keyword>-Sgi2dh</keyword> and it works.
  96. <keyword>g</keyword> means allow <icode>goto</icode>,
  97. <keyword>i</keyword> means allow function inlining,
  98. <keyword>2</keyword> allows some Delphi 2 extensions,
  99. <keyword>d</keyword> turns on Delphi compatibility mode
  100. and <keyword>h</keyword> turns on ANSI strings.
  101. </li>
  102. </olist>
  103. <mcap>Using Wrappers For Other Languages</mcap>
  104. <scap>Delphi.NET Setup</scap>
  105. <par>
  106. You need to add directory in which Delphi.NET wrapper is located
  107. to library path.
  108. </par>
  109. <olist>
  110. <li>Choose <mitem>Tools<inimg url="../../Common/path.png" />Options<inimg
  111. url="../../Common/path.png" />Environment Options<inimg
  112. url="../../Common/path.png" />Delphi Options<inimg
  113. url="../../Common/path.png" />Library - NET</mitem>
  114. in Delphi 2005+.</li>
  115. <li>Add directory to <mitem>Library path</mitem> string.</li>
  116. </olist>
  117. <scap>C/C++ Compiler Setup</scap>
  118. <par>
  119. Settings depend entirely on the compiler used.
  120. You need to add directory in which C/C++ wrapper headers are located
  121. to its include path and then compile <icode>ImagingImport.c</icode>
  122. file located in wrapper directory and link it with your object files.
  123. You can find working MS VC++ 8.0 project in <keyword>Demos\Cpp\Bench</keyword>
  124. directory.
  125. </par>
  126. <lcap>Build Scripts</lcap>
  127. <par>
  128. You can also compile Imaging library and demos without
  129. setting your compilers. All you need is to make sure that you have
  130. paths to compilers' executables in your system's search path
  131. (<keyword>PATH</keyword> environment variable).
  132. Then you can run one of these scripts located in <keyword>Scripts</keyword>
  133. directory:
  134. </par>
  135. <table>
  136. <row>
  137. <th>Script Name</th>
  138. <th>Usage</th>
  139. </row>
  140. <row>
  141. <td><keyword>BuildLibraryDelphi.bat (Win32)</keyword></td>
  142. <td>Builds <keyword>VampyreImaging.dll</keyword> in
  143. <keyword>Bin</keyword> directory using Delphi</td>
  144. </row>
  145. <row>
  146. <td><keyword>BuildLibraryFPC.bat (Win32)</keyword></td>
  147. <td>Builds <keyword>VampyreImaging.dll</keyword> in
  148. <keyword>Bin</keyword> directory using Free Pascal</td>
  149. </row>
  150. <row>
  151. <td><keyword>BuildLibraryFPC.sh (Linux/Unix)</keyword></td>
  152. <td>Builds <keyword>libVampyreImaging.so</keyword> in
  153. <keyword>Bin</keyword> directory using Free Pascal</td>
  154. </row>
  155. <row>
  156. <td><keyword>BuildDemosDelphi.bat (Win32)</keyword></td>
  157. <td>Builds demos in <keyword>Demos\Bin</keyword> directory using Delphi</td>
  158. </row>
  159. <row>
  160. <td><keyword>BuildExtDemosDelphi.bat (Win32)</keyword></td>
  161. <td>Builds demos of Imaging extensions which require external units
  162. in <keyword>Demos\Bin</keyword>
  163. directory using Delphi (<link url="#extnote">Note</link>)</td>
  164. </row>
  165. <row>
  166. <td><keyword>BuildDemosFPC.bat (Win32)</keyword></td>
  167. <td>Builds demos in <keyword>Demos\Bin</keyword> directory using Free Pascal</td>
  168. </row>
  169. <row>
  170. <td><keyword>BuildDemosFPC64.bat (Win64)</keyword></td>
  171. <td>Builds demos in <keyword>Demos\Bin</keyword> directory using Free Pascal</td>
  172. </row>
  173. <row>
  174. <td><keyword>BuildExtDemosFPC.bat (Win32)</keyword></td>
  175. <td>Builds demos of Imaging extensions which require external units
  176. in <keyword>Demos\Bin</keyword>
  177. directory using Free Pascal (<link url="#extnote">Note</link>)</td>
  178. </row>
  179. <row>
  180. <td><keyword>BuildDemosDOS.bat (DOS)</keyword></td>
  181. <td>Builds demos in <keyword>Demos\Bin</keyword> directory using Free Pascal</td>
  182. </row>
  183. <row>
  184. <td><keyword>BuildDemosFPC.sh (Linux/Unix)</keyword></td>
  185. <td>Builds demos in <keyword>Demos/Bin</keyword> directory using Free Pascal</td>
  186. </row>
  187. <row>
  188. <td><keyword>BuildExtDemosFPC.sh (Linux/Unix)</keyword></td>
  189. <td>Builds demos of Imaging extensions which require external units
  190. in <keyword>Demos\Bin</keyword>
  191. directory using Free Pascal (<link url="#extnote">Note</link>)</td>
  192. </row>
  193. </table>
  194. <anchor name="extnote">
  195. <note>
  196. You must first set search directories in which
  197. third party units required by some demos (like <keyword>JEDI-SDL</keyword>,
  198. <keyword>Direct3D</keyword>, ...) are located. Just open the script and
  199. you will see couple of empty variables (like <icode>set SDLDIR=</icode> in
  200. *.bat or <icode>SDLDIR=""</icode> in *.sh script). Set the variables
  201. to paths to required libraries and run the script. If you don't have
  202. some of these libraries installed and variables are left empty
  203. demos which require them will be simply skipped when the script is
  204. executed.
  205. </note>
  206. </anchor>
  207. </chapter>
  208. </doc>