ReadMe.rtf 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  1. {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf350
  2. {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Monaco;}
  3. {\colortbl;\red255\green255\blue255;}
  4. \margl1440\margr1440\vieww8720\viewh11500\viewkind0
  5. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc\pardirnatural
  6. \f0\b\fs36 \cf0 GRASS Mac OS X Build\
  7. \b0 (and other Mac notes)\
  8. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  9. \fs24 \cf0 \
  10. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  11. \cf0 \ul \ulc0 Contents\
  12. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  13. \cf0 \ulnone \
  14. \pard\tx360\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  15. \cf0 Quickstart\
  16. About\
  17. Building GRASS\
  18. Application Build\
  19. Universal Build*\
  20. Optimization*\
  21. Configure Example*\
  22. Leopard Notes*\
  23. Building an Installer Package\
  24. Bundling Libraries and Programs\
  25. Developer Notes\
  26. Help Files*\
  27. Addon Modules\
  28. Dependency Build Notes\
  29. Universal Aqua Tcl/Tk*\
  30. Universal GPSBabel*\
  31. Universal NetPBM*\
  32. Universal FFMPEG*\
  33. \
  34. \pard\tx360\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  35. \b \cf0 (* apply to any OSX build, not just an application package build)
  36. \b0 \
  37. \
  38. \
  39. \b Quickstart\
  40. \pard\tx360\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  41. \b0 \cf0 \
  42. To build a Mac OS X application, add this to your configure options:\
  43. \
  44. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  45. \f1\fs20 \cf0 --prefix=/Applications --enable-macosx-app
  46. \f0\fs24 \
  47. \pard\tx360\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  48. \cf0 \
  49. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  50. \cf0 \
  51. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  52. \b \cf0 About\
  53. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  54. \b0 \cf0 \
  55. This builds GRASS as a Mac OS X application, more or less.\
  56. \
  57. The startup wrapper is a simple AppleScript that fires up a custom grass.sh (instead of the standard grass6x) and quits, leaving grass.sh running in a new Terminal window. The custom grass.sh takes care of some default and required environment settings (so the user doesn't have to fiddle with .bash_profile), makes sure X11 in running, then starts init.sh.\
  58. \
  59. \
  60. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  61. \b \cf0 Building GRASS\
  62. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  63. \b0 \cf0 \
  64. Building GRASS as a Mac OS X application is pretty much the same as for a unix build (see the "INSTALL" document for details). For an application, just add this option to configure:\
  65. \
  66. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  67. \f1\fs20 \cf0 --enable-macosx-app\
  68. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  69. \f0\fs24 \cf0 \
  70. With this option, the
  71. \f1\fs20 --prefix
  72. \f0\fs24 specified is the path where GRASS.app will be installed. The default GRASS prefix is
  73. \f1\fs20 /usr/local
  74. \f0\fs24 , but for a Mac OS X application it should be
  75. \f1\fs20 /Applications
  76. \f0\fs24 . It is not possible to have alternative default prefixes in configure, so you must set
  77. \f1\fs20 --prefix=/Applications
  78. \f0\fs24 yourself for configure.\
  79. \
  80. The makefile tries to figure out the location of the GDAL programs, from the configured GDAL libs. This is set in grass.sh, and if it doesn't correctly figure it out (some GRASS commands fail to find needed GDAL commands), set GDAL_BIN before running make:\
  81. \
  82. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  83. \f1\fs20 \cf0 export GDAL_BIN=[/path/to/gdal/bin]\
  84. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  85. \f0\fs24 \cf0 \
  86. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  87. \cf0 \ul Universal Build\
  88. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  89. \cf0 \ulnone \
  90. The GRASS build system is very friendly to a Universal build (unlike libtool-based builds).
  91. \i This applies to a standard unix build as well as the app build.
  92. \i0 First, a couple things to check:\
  93. \
  94. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  95. \b \cf0 \'95 The Universal SDK
  96. \b0 .
  97. \i This is only needed when building on OSX 10.4 PPC - the Intel system is all Universal, and so is 10.5 for both architectures (though you may still want to use an SDK).
  98. \i0 Using the SDK forces GCC to use an alternate root for everything, so if a dependency is not in the SDK (/usr/local is NOT in the SDK), you will get configure, compile and link errors about missing stuff. To fix this, create symlinks in the SDK to where you have your extra dependencies. The SDKs in Leopard are mostly taken care of.\
  99. \
  100. For example, /usr/local:\
  101. \
  102. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  103. \f1\fs20 \cf0 sudo ln -s /usr/local /Developer/SDKs/MacOSX10.4u.sdk/usr/local\
  104. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  105. \f0\fs24 \cf0 \
  106. For Leopard, there may be problems locating
  107. \f1\fs20 bin
  108. \f0\fs24 programs. Add the following:\
  109. \
  110. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  111. \f1\fs20 \cf0 sudo ln -s /usr/local/bin /Developer/SDKs/MacOSX10.4u.sdk/usr/local/bin\
  112. sudo ln -s /usr/local/bin /Developer/SDKs/MacOSX10.5.sdk/usr/local/bin\
  113. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  114. \f0\fs24 \cf0 \
  115. If there are subfolders involved that are not already in the SDK, add them first. Say you have some libraries in /Users/Shared/unix (I put my static libraries there):\
  116. \
  117. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  118. \f1\fs20 \cf0 sudo mkdir -p /Developer/SDKs/MacOSX10.4u.sdk/Users/Shared\
  119. ln -s /Users/Shared/unix /Developer/SDKs/MacOSX10.4u.sdk/Users/Shared/unix
  120. \f0\fs24 \
  121. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  122. \cf0 \
  123. For /Library/Frameworks:\
  124. \
  125. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  126. \f1\fs20 \cf0 sudo mkdir -p /Developer/SDKs/MacOSX10.4u.sdk/Library\
  127. sudo ln -s /Library/Frameworks /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks
  128. \f0\fs24 \
  129. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  130. \cf0 \
  131. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  132. \b \cf0 \'95 Universal Dependencies
  133. \b0 . Make sure all your extra dependencies are Universal.\
  134. \
  135. \b \'95\'a0 Tiger+
  136. \b0 . This will NOT work on anything less than OSX 10.4.\
  137. \
  138. If those check OK, here's what to do. Simply add the universal flags to all compile and link commands. This is done by setting CFLAGS, CXXFLAGS and LDFLAGS before configuring the build. The basic flags are:\
  139. \
  140. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  141. \f1\fs20 \cf0 -arch ppc -arch i386\
  142. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  143. \f0\fs24 \cf0 \
  144. If you are building on OSX 10.4 PPC only, also add this:\
  145. \
  146. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  147. \f1\fs20 \cf0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk\
  148. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  149. \f0\fs24 \cf0 \
  150. Put it all together, for an Intel Mac on OSX 10.4 or any Mac on 10.5+:\
  151. \
  152. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  153. \f1\fs20 \cf0 export CFLAGS="-arch ppc -arch i386"\
  154. export CXXFLAGS="-arch ppc -arch i386"\
  155. export LDFLAGS="-arch ppc -arch i386"\
  156. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  157. \f0\fs24 \cf0 \
  158. Or for OSX 10.4 PPC:\
  159. \
  160. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  161. \f1\fs20 \cf0 export SDKROOT=/Developer/SDKs/MacOSX10.4u.sdk\
  162. export CFLAGS="-arch ppc -arch i386 -isysroot $SDKROOT"\
  163. export CXXFLAGS="-arch ppc -arch i386 -isysroot $SDKROOT"\
  164. export LDFLAGS="-arch ppc -arch i386 -isysroot $SDKROOT"\
  165. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  166. \f0\fs24 \cf0 \
  167. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  168. \cf0 \ul Optimization\ulnone \
  169. \
  170. By default, GRASS configures with debugging symbols turned on (the "-g" flag), and level 2 optimization ("-O2"). If you don't want debugging on (it greatly increases the binary size) or want to use a different optimization, just add an optimization flag to the above CFLAGS and CXXFLAGS exports. Specifying an optimization disables debugging. Some common optimizations are (see the gcc man page for complete details):\
  171. \
  172. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  173. \f1\fs20 \cf0 -O2
  174. \f0\fs24 most optimizations, a common default\
  175. \f1\fs20 -O3
  176. \f0\fs24 high\
  177. \f1\fs20 -Os
  178. \f0\fs24 optimize for speed, also keep the binary size small (the Apple standard)\
  179. \
  180. If you want debugging with a different optimization flag, use one of the above optimization flags plus "
  181. \f1\fs20 -g
  182. \f0\fs24 ".\
  183. \
  184. Remember to separate all flags with spaces.\
  185. \
  186. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  187. \cf0 \ul Configure Example\ulnone \
  188. \
  189. As an example, to build GRASS using my frameworks and Tcl/Tk as built in the build notes below, this should work
  190. \i (for a standard unix build, just remove the --prefix and --enable-macosx-app flags)
  191. \i0 :\
  192. \
  193. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  194. \f1\fs20 \cf0 ./configure --with-freetype --with-freetype-includes="/Library/Frameworks/FreeType.framework/unix/include/freetype2 /Library/Frameworks/FreeType.framework/unix/include" --with-freetype-libs=/Library/Frameworks/FreeType.framework/unix/lib --with-gdal=/Library/Frameworks/GDAL.framework/Programs/gdal-config --with-proj --with-proj-includes=/Library/Frameworks/PROJ.framework/unix/include --with-proj-libs=/Library/Frameworks/PROJ.framework/unix/lib --with-proj-share=/Library/Frameworks/PROJ.framework/Resources/proj --with-jpeg-includes=/Library/Frameworks/UnixImageIO.framework/unix/include --with-jpeg-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib --with-png-includes=/Library/Frameworks/UnixImageIO.framework/unix/include --with-png-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib --with-tiff-includes=/Library/Frameworks/UnixImageIO.framework/unix/include --with-tiff-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib --without-postgres --without-mysql --with-odbc --with-sqlite --with-sqlite-libs=/Library/Frameworks/SQLite3.framework/unix/lib --with-sqlite-includes=/Library/Frameworks/SQLite3.framework/unix/include --with-fftw-includes=/Library/Frameworks/FFTW3.framework/unix/include --with-fftw-libs=/Library/Frameworks/FFTW3.framework/unix/lib --with-cxx --with-tcltk-includes="/Library/Frameworks/Tcl.framework/Headers /Library/Frameworks/Tk.framework/Headers /Library/Frameworks/Tk.framework/PrivateHeaders" --with-tcltk-libs=/usr/local/lib --with-x --without-motif --without-glw --with-opengl=aqua --without-readline --prefix=/Applications --enable-macosx-app
  195. \f0\fs24 \
  196. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  197. \cf0 \
  198. That's a long line, but you have to be very explicit in the GRASS configure (and yes, the UnixImageIO framework is used multiple times).\
  199. \
  200. If you don't have the PROJ framework programs folder in your shell PATH, it will fail to find nad2bin. To correct this set NAD2BIN before running configure:\
  201. \
  202. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  203. \f1\fs20 \cf0 export NAD2BIN=/Library/Frameworks/PROJ.framework/Programs/nad2bin\
  204. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  205. \f0\fs24 \cf0 \
  206. Sometimes, for mysterious reasons so far, the automatic check for X11 fails. Depending on various conditions, you may immediately notice this because configure stops. If X11 isn't found automatically, add this to the configure line
  207. \i (this applies to both the unix build and app build)
  208. \i0 :\
  209. \
  210. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  211. \f1\fs20 \cf0 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib\
  212. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  213. \f0\fs24 \cf0 \
  214. To install the new Python GUI (see REQUIREMENTS.html and gui/wxpython/README, wxpython installer available at {\field{\*\fldinst{HYPERLINK "http://wxpython.org/"}}{\fldrslt wxpython.org}}), add this to configure (fill in the correct version at x.x.x.x for the wxpython you have installed):\
  215. \
  216. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  217. \f1\fs20 \cf0 --with-python\
  218. --with-wxwidgets=/usr/local/lib/wxPython-unicode-x.x.x.x/bin/wx-config\
  219. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  220. \f0\fs24 \cf0 \
  221. Note 1: as of wxpython 2.8.8.0 you can use an external wxpython with the system Python on Leopard.\
  222. \
  223. Note 2: DO NOT apply the gdi patch mentioned in the wxgui README.\
  224. \
  225. Note 3: for now, disable lib/nviz/render.c - either delete it, or add something to the filename
  226. \i after
  227. \i0 the .c. You will get an error in visualization/nviz2/cmd, but this does not work on OSX yet.\
  228. \
  229. If you want ffmpeg support (see build instructions below), add this:\
  230. \
  231. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  232. \f1\fs20 \cf0 --with-ffmpeg --with-ffmpeg-includes=/usr/local/include/ffmpeg --with-ffmpeg-libs=/usr/local/lib
  233. \f0\fs24 \
  234. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  235. \cf0 \
  236. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  237. \cf0 \ul Leopard Notes\
  238. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  239. \cf0 \ulnone \
  240. \'95 Linker Problem\
  241. \
  242. The linker in Leopard's GCC from Xcode 3.0 has a bit of a problem with some libraries, notably X11's libGL. When trying to link libGL (for example), it spits back an error:\
  243. \
  244. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  245. \f1\fs20 \cf0 ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib for architecture i386\
  246. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  247. \f0\fs24 \cf0 \
  248. Xcode 3.1 does not have this problem. In other words, make sure to install the latest Xcode.\
  249. \
  250. \'95 64bits\
  251. \
  252. Almost all of GRASS can be built 64bits. Use the above universal flags section and set the arch's to "
  253. \f1\fs20 ppc64
  254. \f0\fs24 " for PPC processors (I believe all are inherently 64bits), and "
  255. \f1\fs20 x86_64
  256. \f0\fs24 " for Intel processors (ie Core 2 Duo, but not Core Duo). You don't need to build universal, but can have only one arch flag if desired. The SDK flag is not needed.\
  257. \
  258. The wxPython parts(ie vdigit) cannot be built 64bits. This is due to Carbon not being 64bit, which wx depends on. Because gui/wxpython shares CXXFLAGS with the rest of GRASS, vdigit will fail unless the makefile it patched.\
  259. \
  260. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  261. \cf0 \ul Building an Installer Package\
  262. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  263. \cf0 \ulnone \
  264. After running make,
  265. \f1\fs20 make bindist
  266. \f0\fs24 will assemble an installer package. This will have the name "GRASS-[version].pkg" and will be found in the macosx folder in the GRASS source. On Tiger, there
  267. \b will be
  268. \b0 some
  269. \b non-fatal errors
  270. \b0 -
  271. \i this is normal
  272. \i0 and the installer package is still generated correctly.\
  273. \
  274. The installer takes care of binary installation, and creating the /Library/GRASS support folder and Help Viewer link.\
  275. \
  276. This installer currently does NOT do any verification of installed dependencies or system version.\
  277. \
  278. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  279. \cf0 \ul Bundling Libraries and Programs\
  280. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  281. \cf0 \ulnone \
  282. With the installer package build, additional dependent libraries and programs can be bundled with the application package to make a more portable and easily installed GRASS application. See
  283. \f1\fs20 macosx/pkg/bundle.make
  284. \f0\fs24 for details.\
  285. \
  286. GRASS uses
  287. \f1\fs20 DYLD_LIBRARY_PATH
  288. \f0\fs24 , which is set to the application's lib folder, so it will find any libraries that are there that are not found in their expected locations. It also adds the application bin folder to the
  289. \f1\fs20 PATH
  290. \f0\fs24 , so helper programs installed there will be found.\
  291. \
  292. There is NO need to bundle
  293. \i everything
  294. \i0 . Bundling readily available libraries and programs installed in standard locations is not necessary. Some things you might want to bundle include:\
  295. \
  296. - GPSBabel (CLI)\
  297. - NetPBM programs (just what is used in GRASS)\
  298. - ffmpeg libraries\
  299. - Postgres library (libpq)\
  300. \
  301. Things to leave out:\
  302. \
  303. - applications that duplicate the above items (ie GPSBabel.app)\
  304. - /Library/Frameworks stuff\
  305. \
  306. \
  307. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  308. \b\fs28 \cf0 Developer Notes\
  309. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  310. \b0\fs24 \cf0 \
  311. The applescript startup and grass.sh can be customized if desired, ie for a more complex startup that might give the user a dialog for startup options. They just provide the basic core to build upon.\
  312. \
  313. \
  314. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  315. \b\fs28 \cf0 Help Files\
  316. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  317. \b0\fs24 \cf0 \
  318. Help files are linked into the OSX help system. Independent of what browser you choose to open help files (
  319. \f1\fs20 GRASS_HTML_BROWSER
  320. \f0\fs24 ), you can open Help Viewer from almost any application's Help menu (it's best to use Mac Help from the Finder Help menu), and GRASS Help will be available in the Library menu.\
  321. \
  322. Since they are linked to the help system, if GRASS.app is moved or renamed, the link will be broken. This may change in the future.\
  323. \
  324. \
  325. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  326. \b\fs28 \cf0 Addon Modules\
  327. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  328. \b0\fs24 \cf0 \
  329. Do not use GEM (at this time) for building and installing addon modules. It installs in the app dir, which is not the right thing to do in OSX. It is still installed - the gem executable is in
  330. \f1\fs20 Contents/MacOS
  331. \f0\fs24 - and may work, but it's untested.\
  332. \
  333. GRASS.app is setup to find addon modules in
  334. \f1\fs20 /Library/GRASS/$VERSION/Modules
  335. \f0\fs24 and
  336. \f1\fs20 ~/Library/GRASS/$VERSION/Modules
  337. \f0\fs24 . The version is the Major.minor version of GRASS. /Library modules are globally available to all users, but require admin privileges to install. Home/Library modules are only available to the user that installed them.\
  338. \
  339. When GRASS is started, grass.sh adds these to the
  340. \f1\fs20 GRASS_ADDON_PATH
  341. \f0\fs24 ,
  342. \f1\fs20 GRASS_ADDON_ETC
  343. \f0\fs24 and
  344. \f1\fs20 DYLD_LIBRARY_PATH
  345. \f0\fs24 . It also rebuilds the html help index, and GUI menu file.\
  346. \
  347. GRASS_ADDON_ETC is fairly new, and many addon modules may not make use of it yet. Instead of accessing it's etc/ support files from $GISBASE/etc, the function G_find_etc("file") should be used to locate the file wherever it may be in any of the folders listed in GRASS_ADDON_ETC. $GISBASE/etc is searched last and does not need to be included in GRASS_ADDON_ETC.\
  348. \
  349. Help indexes and GUI menus for both global and user modules are maintained in the user's Library/GRASS folder, so the user doesn't need admin privs to write to the global folder.\
  350. \
  351. The
  352. \b modbuild
  353. \b0 target creates a GEM-like build skeleton that can be used to build modules from the Terminal. It does not require any special setup of the module source. It does not install, or rather I haven't tested that, but it uses standard GRASS make files so it should be able to.\
  354. \
  355. \
  356. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  357. \b\fs28 \cf0 Universal Aqua Tcl/Tk\
  358. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  359. \b0\fs24 \cf0 \
  360. The simplest way to install Tcl/Tk Aqua is to download {\field{\*\fldinst{HYPERLINK "http://www.activestate.com/Products/activetcl/"}}{\fldrslt ActiveTcl}} from ActiveState. This will give you a universal 32bit Tcl/Tk Aqua. \ul Make sure to run the
  361. \i convenience
  362. \i0 commands below.\ulnone \
  363. \
  364. To make it easier to configure for GRASS (and other software), run these commands in a Terminal:\
  365. \
  366. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  367. \f1\fs20 \cf0 sudo ln -sf /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl /usr/local/lib/libtcl.dylib\
  368. sudo ln -sf /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl /usr/local/lib/libtcl8.5.dylib\
  369. sudo ln -sf /Library/Frameworks/Tcl.framework/Versions/8.5/libtclstub8.5.a /usr/local/lib/libtclstub8.5.a\
  370. sudo ln -sf /Library/Frameworks/Tk.framework/Versions/8.5/Tk /usr/local/lib/libtk.dylib\
  371. sudo ln -sf /Library/Frameworks/Tk.framework/Versions/8.5/Tk /usr/local/lib/libtk8.5.dylib\
  372. sudo ln -sf /Library/Frameworks/Tk.framework/Versions/8.5/libtkstub8.5.a /usr/local/lib/libtkstub8.5.a\
  373. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  374. \f0\fs24 \cf0 \
  375. \
  376. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  377. \b\fs28 \cf0 Universal GPSBabel\
  378. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  379. \b0\fs24 \cf0 \
  380. A universal GPSBabel is also possible to build without too much fuss. First, you need the GPSBabel source from {\field{\*\fldinst{HYPERLINK "http://www.gpsbabel.org/"}}{\fldrslt www.gpsbabel.org}}. If you need support for USB GPS units, get the libusb 0.1 source from {\field{\*\fldinst{HYPERLINK "http://libusb.sourceforge.net/"}}{\fldrslt libusb.sourceforge.net}}. It needs X11 for libexpat. Do not get the new libusb 1.0 beta, that has a completely API and GPSBabel doesn't support it yet, as far as I can make out.\
  381. \
  382. For libusb, unzip the source and cd to the source folder in a Terminal. Then:\
  383. \
  384. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  385. \f1\fs20 \cf0 export MACOSX_DEPLOYMENT_TARGET=10.4\
  386. ./configure --disable-shared --disable-dependency-tracking CXXFLAGS="-Os -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" CFLAGS="-Os -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" LDFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"\
  387. make\
  388. sudo make install\
  389. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  390. \f0\fs24 \cf0 \
  391. Libusb will be installed in /usr/local. GPSBabel uses the static library, so the shared libusb is not needed, and you might have problems building libusb as shared.\
  392. \
  393. For GPSBabel, unzip the source and cd to the source folder in a Terminal. Then:\
  394. \
  395. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  396. \f1\fs20 \cf0 export MACOSX_DEPLOYMENT_TARGET=10.4\
  397. ./configure --disable-dependency-tracking --with-zlib=system --with-expathdr=/usr/X11R6/include --with-libexpat=/usr/X11R6/lib CFLAGS="-Os -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" LDFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"\
  398. make\
  399. sudo make install\
  400. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  401. \f0\fs24 \cf0 \
  402. If you installed libusb, it will be found and built into gpsbabel. The gpsbabel program will be installed in /usr/local/bin.\
  403. \
  404. \
  405. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  406. \b\fs28 \cf0 Universal NetPBM\
  407. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  408. \b0\fs24 \cf0 \
  409. NetPBM is not too hard to build, it's just weird. These instructions use my UnixImageIO framework for the tiff, jpeg, png and jasper libraries.\
  410. \
  411. First, grab the {\field{\*\fldinst{HYPERLINK "http://netpbm.sourceforge.net/"}}{\fldrslt NetPBM}} source and unzip it. Now it gets strange - it's an interactive configuration, and the various stages don't communicate with each other. Cd to the source folder in a Terminal and:\
  412. \
  413. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  414. \f1\fs20 \cf0 ./configure\
  415. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  416. \f0\fs24 \cf0 \
  417. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  418. \b \cf0 <enter>
  419. \b0 to begin\
  420. \
  421. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  422. \f1\fs20 \cf0 Platform [darwin] ==>
  423. \f0\b\fs24 <enter>
  424. \b0 \
  425. \
  426. \f1\fs20 Netpbm shared library directory [default] ==>
  427. \f0\b\fs24 /usr/local
  428. \b0 \
  429. \
  430. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li360\ql\qnatural\pardirnatural
  431. \i \cf0 choose where you will install it\
  432. default is NOT /usr/local or any location at all, so you MUST set this\
  433. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  434. \i0 \cf0 \
  435. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  436. \f1\fs20 \cf0 regular or merge [regular] ==>
  437. \f0\b\fs24 <enter>
  438. \b0 \
  439. \
  440. \f1\fs20 static or shared [shared] ==>
  441. \f0\b\fs24 <enter>
  442. \b0 \
  443. \
  444. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li360\ql\qnatural\pardirnatural
  445. \i \cf0 could use static, since GRASS only needs a few of the progs\
  446. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  447. \i0 \cf0 \
  448. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  449. \f1\fs20 \cf0 '#include' argument or NONE [<inttypes.h>] ==>
  450. \f0\b\fs24 <enter>
  451. \b0 \
  452. \
  453. \f1\fs20 What is your JPEG (graphics format) library?\
  454. library filename or 'none' [libjpeg.so] ==>
  455. \f0\b\fs24 /Library/Frameworks/UnixImageIO.framework/unix/lib/libjpeg.dylib
  456. \b0 \
  457. \
  458. \f1\fs20 JPEG header directory [default] ==>
  459. \f0\b\fs24 /Library/Frameworks/UnixImageIO.framework/Headers
  460. \b0 \
  461. \
  462. \f1\fs20 What is your TIFF (graphics format) library?\
  463. library filename or 'none' [libtiff.so] ==>
  464. \f0\b\fs24 /Library/Frameworks/UnixImageIO.framework/unix/lib/libtiff.dylib
  465. \b0 \
  466. \
  467. \f1\fs20 TIFF header directory [default] ==>
  468. \f0\b\fs24 /Library/Frameworks/UnixImageIO.framework/Headers
  469. \b0 \
  470. \
  471. \f1\fs20 What is your PNG (graphics format) library?\
  472. library filename or 'none' [libpng.so] ==>
  473. \f0\b\fs24 /Library/Frameworks/UnixImageIO.framework/unix/lib/libpng.dylib
  474. \b0 \
  475. \
  476. \f1\fs20 PNG header directory [default] ==>
  477. \f0\b\fs24 /Library/Frameworks/UnixImageIO.framework/Headers
  478. \b0 \
  479. \
  480. \f1\fs20 What is your Z (compression) library?\
  481. library filename or 'none' [libz.so] ==>
  482. \f0\b\fs24 -lz
  483. \b0 \
  484. \
  485. \f1\fs20 Z header directory [default] ==>
  486. \f0\b\fs24 <enter>
  487. \b0 \
  488. \
  489. \f1\fs20 Documentation URL [http://netpbm.sourceforge.net/doc/] ==>
  490. \f0\b\fs24 <enter>
  491. \b0 \
  492. \
  493. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li360\ql\qnatural\pardirnatural
  494. \i \cf0 ignore warning about libz\
  495. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  496. \i0 \cf0 \
  497. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  498. \f1\fs20 \cf0 echo "JASPERLIB = /Library/Frameworks/UnixImageIO.framework/unix/lib/libjasper.dylib" >> Makefile.config\
  499. echo "JASPERHDR_DIR = /Library/Frameworks/UnixImageIO.framework/Headers" >> Makefile.config\
  500. echo "CC = /usr/bin/gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" >> Makefile.config\
  501. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  502. \cf0 \
  503. make\
  504. make package pkgdir=/path/to/some/temp/dir\
  505. \
  506. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li360\ql\qnatural\pardirnatural
  507. \f0\i\fs24 \cf0 it will create the folder and copy all binaries there\
  508. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  509. \f1\i0\fs20 \cf0 \
  510. sudo ./installnetpbm\
  511. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  512. \f0\fs24 \cf0 \
  513. then answer some more questions:\
  514. \
  515. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  516. \f1\fs20 \cf0 Where is the install package you created with 'make package'?\
  517. package directory (/tmp/netpbm) ==>
  518. \f0\b\fs24 /path/to/some/temp/dir\
  519. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  520. \b0 \cf0 \
  521. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li360\ql\qnatural\pardirnatural
  522. \i \cf0 same location as specified in the make package step (lack of inter-communication!)\
  523. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  524. \i0 \cf0 \
  525. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  526. \f1\fs20 \cf0 install prefix (/usr/local/netpbm) ==>
  527. \f0\b\fs24 /usr/local\
  528. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  529. \b0 \cf0 \
  530. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li360\ql\qnatural\pardirnatural
  531. \i \cf0 same location used for the Netpbm shared library directory (again, lack of inter-communication!)\
  532. (it may ask you if you want to create the dir)\
  533. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  534. \i0 \cf0 \
  535. It'll ask for subfolders for bin, lib, data, headers, man\
  536. \
  537. For data, type:
  538. \b /usr/local/share/netpbm
  539. \b0 \
  540. \
  541. For man, type:
  542. \b /usr/local/share/man
  543. \b0 \
  544. \
  545. For the rest, use the defaults\
  546. \
  547. don't create the manweb.conf file\
  548. \
  549. And that's it.\
  550. \
  551. \
  552. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  553. \b\fs28 \cf0 Universal FFMPEG
  554. \b0\fs24 \
  555. \
  556. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  557. \cf0 \ul revision: 10837\ulnone \
  558. \
  559. FFMPEG is constantly changing, there is no released version, it's all in SVN. These instructions are work on the SVN revision listed above, so if a current SVN version doesn't work, try checking out that revision. You need
  560. \b SVN
  561. \b0 installed to download the FFMPEG source.\
  562. \
  563. This will build a basic FFMPEG as static libraries for use with GRASS. No extra formats are included, such as mp3lame and xvid. Note that by default debug symbols are included, so you will get a large binary out of this. Stripping the libraries doesn't seem to work.\
  564. \
  565. First, create a folder for your ffmpeg source and cd into it. Now:\
  566. \
  567. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  568. \f1\fs20 \cf0 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg\
  569. cd ffmpeg\
  570. mkdir build-ppc\
  571. mkdir build-i386\
  572. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  573. \f0\fs24 \cf0 \
  574. For a specific revision, use this instead for the checkout command:\
  575. \
  576. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  577. \f1\fs20 \cf0 svn checkout -r \ul revision#\ulnone svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg\
  578. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  579. \f0\fs24 \cf0 \
  580. It's a two-step build, 1 for each architecture, and I'm being explicit for each arch. The -fno-common extra cflag is needed or there will be link errors in GRASS, and OSX Intel has MMX issues, so it is disabled. For the Intel build:\
  581. \
  582. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  583. \f1\fs20 \cf0 cd build-i386\
  584. ../configure --disable-ffserver --enable-gpl --enable-pthreads --disable-ffplay --disable-mmx --disable-vhook --arch=i386 --extra-cflags="-fno-common -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" --extra-ldflags="-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"\
  585. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  586. \f0\fs24 \cf0 \
  587. If you want to remove the debug symbols, edit config.mak at this point and remove "-g" from OPTFLAGS.\
  588. \
  589. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  590. \f1\fs20 \cf0 make\
  591. sudo make install\
  592. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  593. \f0\fs24 \cf0 \
  594. Install at this point installs all the headers. We don't care about the installed libraries at this point.\
  595. \
  596. Now, the PPC build:\
  597. \
  598. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  599. \f1\fs20 \cf0 cd ../build-ppc\
  600. ../configure --disable-ffserver --enable-gpl --enable-pthreads --disable-ffplay --enable-altivec --disable-vhook --arch=ppc --extra-cflags="-fno-common -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" --extra-ldflags="-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk"\
  601. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  602. \f0\fs24 \cf0 \
  603. Again, if you want to remove the debug symbols, edit config.mak at this point and remove "-g" from OPTFLAGS.\
  604. \
  605. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  606. \f1\fs20 \cf0 make\
  607. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  608. \f0\fs24 \cf0 \
  609. Don't install this one, there is no need. Now use lipo to merge them together:\
  610. \
  611. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  612. \f1\fs20 \cf0 cd ..\
  613. sudo lipo -create build-ppc/libavcodec/libavcodec.a build-i386/libavcodec/libavcodec.a -output /usr/local/lib/libavcodec.a\
  614. sudo lipo -create build-ppc/libavformat/libavformat.a build-i386/libavformat/libavformat.a -output /usr/local/lib/libavformat.a\
  615. sudo lipo -create build-ppc/libavutil/libavutil.a build-i386/libavutil/libavutil.a -output /usr/local/lib/libavutil.a\
  616. sudo ranlib /usr/local/lib/libavcodec.a\
  617. sudo ranlib /usr/local/lib/libavformat.a\
  618. sudo ranlib /usr/local/lib/libavutil.a\
  619. sudo lipo -create build-ppc/ffmpeg build-i386/ffmpeg -output /usr/local/bin/ffmpeg\
  620. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  621. \f0\fs24 \cf0 \
  622. Done.\
  623. \
  624. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
  625. \fs28 \cf0 \
  626. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
  627. \fs24 \cf0 \'a9 2006-2008 by the GRASS Development Team\
  628. This program is free software under the GNU General Public License (>=v2).\
  629. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
  630. \fs28 \cf0 \
  631. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  632. \fs24 \cf0 \
  633. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
  634. \cf0 - William Kyngesburye\
  635. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
  636. {\field{\*\fldinst{HYPERLINK "mailto:kyngchaos@kyngchaos.com"}}{\fldrslt \cf0 kyngchaos@kyngchaos.com}}
  637. \fs20 \
  638. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
  639. {\field{\*\fldinst{HYPERLINK "http://www.kyngchaos.com"}}{\fldrslt
  640. \fs24 \cf0 http://www.kyngchaos.com/}}
  641. \fs24 \
  642. }