2
0

INSTALL-MK 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. ///////////////////////////////////////////////////////////////////////
  2. // Caution: there are two separate, independent build systems:
  3. // 'makepanda', and 'ppremake'. Use one or the other, do not attempt
  4. // to use both. This file is part of the 'makepanda' system.
  5. ///////////////////////////////////////////////////////////////////////
  6. Panda3D Install --- using the 'makepanda' system.
  7. NOTE: As the makepanda build system changes more frequently
  8. than this document, some of the information is outdated.
  9. MAKE SURE YOU HAVE ALL OF THE SOURCE CODE
  10. The easiest way to download the source for panda is to download the
  11. "source package" from the panda3d website. If you downloaded a file
  12. labeled "source package", then you have everything you need. Skip to
  13. the next section.
  14. Alternately, it is possible to download the source in pieces. There
  15. are three pieces:
  16. 1. Source code from Github.
  17. 2. Third-party tools (not strictly necessary for Unix)
  18. You will need both to use makepanda. You can find the
  19. pieces on the panda website. Look for the files labeled "Panda3D
  20. source". You can also obtain the first piece
  21. directly from the github:
  22. Over https:
  23. https://github.com/panda3d/panda3d.git
  24. Over SSH:
  25. [email protected]:panda3d/panda3d.git
  26. Make sure you have both pieces. If you do, then your panda
  27. directory will contain the following subdirectories:
  28. direct - piece 1, source code from github
  29. dmodels - piece 1, source code from github
  30. doc - piece 1, source code from github
  31. dtool - piece 1, source code from github
  32. makepanda - piece 1, source code from github
  33. models - piece 1, source code from github
  34. panda - piece 1, source code from github
  35. pandatool - piece 1, source code from github
  36. ppremake - piece 1, source code from github
  37. contrib - piece 1, source code from github
  38. samples - piece 1, sample programs
  39. thirdparty - piece 2, third party tools
  40. If you have all of these, you're ready to go. If not, then you
  41. must have missed a piece.
  42. Linux/FreeBSD users may omit the "thirdparty" tree, but this means
  43. they will need to have the thirdparty software installed on the system.
  44. INVOKING MAKEPANDA
  45. Makepanda is a script that builds panda, all the way through. To
  46. invoke it under windows, change directory to the root of the panda
  47. source tree and type this:
  48. makepanda\makepanda.bat
  49. To invoke it under Linux or OSX, change directory to the root of
  50. the panda source tree and type this:
  51. makepanda/makepanda.py
  52. From this point forward, I will not be including the directory name or
  53. the extension in my examples. I will simply assume that you know to
  54. add the correct extension as demanded by your operating system.
  55. BUILDING PANDA: QUICK START
  56. The easy way to build panda is to type:
  57. makepanda --everything
  58. This will compile panda with all the features. It can take several
  59. hours, depending on the speed of your machine.
  60. You may wish to add the --verbose option to the makepanda
  61. command to get more verbose output information. This is
  62. especially useful when you run into a compiler error.
  63. The resulting copy of panda will be found in a subdirectory 'built'
  64. inside the source tree. (Given that you did not override this
  65. with the --outputdir option)
  66. INSTALLING PANDA
  67. If you are using Windows, OSX or a Linux distribution that supports DEB or
  68. RPM packages, the recommended way to install Panda3D is to run makepanda
  69. with the --installer option and then install the resulting .exe, .deb, .rpm
  70. or .dmg package. This is a safe solution that makes sure all the files are
  71. installed in the correct places and all the paths are configured correctly.
  72. More information can be found below.
  73. Linux and FreeBSD users can install Panda3D manually, however, using the
  74. following sequence of commands (execute as root):
  75. python makepanda/installpanda.py --prefix /usr/local
  76. ldconfig
  77. MAKEPANDA COMMAND-LINE OPTIONS
  78. The default invocation of makepanda is a good way to test panda on
  79. your machine. However, it compiles several features that you probably
  80. don't need. To disable the extra features, you need to specify
  81. command-line options to makepanda. If you invoke:
  82. makepanda --help
  83. it will show you the available command-line options:
  84. --help (print the help message you're reading now)
  85. --verbose (print out more information)
  86. --runtime (build a runtime build instead of an SDK build)
  87. --installer (build an installer)
  88. --optimize X (optimization level can be 1,2,3,4)
  89. --version X (set the panda version number)
  90. --lzma (use lzma compression when building Windows installer)
  91. --distributor X (short string identifying the distributor of the build)
  92. --outputdir X (use the specified directory instead of 'built')
  93. --host URL (set the host url (runtime build only))
  94. --threads N (use the multithreaded build system. see manual)
  95. --osxtarget N (the OSX version number to build for (OSX only))
  96. --universal (build universal binaries (OSX only))
  97. --override "O=V" (override dtool_config/prc option value)
  98. --static (builds libraries for static linking)
  99. --target X (experimental cross-compilation (android only))
  100. --arch X (target architecture for cross-compilation)
  101. --use-python --no-python (enable/disable use of PYTHON)
  102. --use-direct --no-direct (enable/disable use of DIRECT)
  103. --use-gl --no-gl (enable/disable use of GL)
  104. --use-gles --no-gles (enable/disable use of GLES)
  105. --use-gles2 --no-gles2 (enable/disable use of GLES2)
  106. --use-dx9 --no-dx9 (enable/disable use of DX9)
  107. --use-tinydisplay --no-tinydisplay (enable/disable use of TINYDISPLAY)
  108. --use-nvidiacg --no-nvidiacg (enable/disable use of NVIDIACG)
  109. --use-egl --no-egl (enable/disable use of EGL)
  110. --use-eigen --no-eigen (enable/disable use of EIGEN)
  111. --use-openal --no-openal (enable/disable use of OPENAL)
  112. --use-fmodex --no-fmodex (enable/disable use of FMODEX)
  113. --use-vorbis --no-vorbis (enable/disable use of VORBIS)
  114. --use-ffmpeg --no-ffmpeg (enable/disable use of FFMPEG)
  115. --use-swscale --no-swscale (enable/disable use of SWSCALE)
  116. --use-swresample --no-swresample (enable/disable use of SWRESAMPLE)
  117. --use-ode --no-ode (enable/disable use of ODE)
  118. --use-physx --no-physx (enable/disable use of PHYSX)
  119. --use-bullet --no-bullet (enable/disable use of BULLET)
  120. --use-pandaphysics --no-pandaphysics (enable/disable use of PANDAPHYSICS)
  121. --use-speedtree --no-speedtree (enable/disable use of SPEEDTREE)
  122. --use-zlib --no-zlib (enable/disable use of ZLIB)
  123. --use-png --no-png (enable/disable use of PNG)
  124. --use-jpeg --no-jpeg (enable/disable use of JPEG)
  125. --use-tiff --no-tiff (enable/disable use of TIFF)
  126. --use-squish --no-squish (enable/disable use of SQUISH)
  127. --use-freetype --no-freetype (enable/disable use of FREETYPE)
  128. --use-maya6 --no-maya6 (enable/disable use of MAYA6)
  129. --use-maya65 --no-maya65 (enable/disable use of MAYA65)
  130. --use-maya7 --no-maya7 (enable/disable use of MAYA7)
  131. --use-maya8 --no-maya8 (enable/disable use of MAYA8)
  132. --use-maya85 --no-maya85 (enable/disable use of MAYA85)
  133. --use-maya2008 --no-maya2008 (enable/disable use of MAYA2008)
  134. --use-maya2009 --no-maya2009 (enable/disable use of MAYA2009)
  135. --use-maya2010 --no-maya2010 (enable/disable use of MAYA2010)
  136. --use-maya2011 --no-maya2011 (enable/disable use of MAYA2011)
  137. --use-maya2012 --no-maya2012 (enable/disable use of MAYA2012)
  138. --use-maya2013 --no-maya2013 (enable/disable use of MAYA2013)
  139. --use-maya20135 --no-maya20135 (enable/disable use of MAYA20135)
  140. --use-maya2014 --no-maya2014 (enable/disable use of MAYA2014)
  141. --use-maya2015 --no-maya2015 (enable/disable use of MAYA2015)
  142. --use-max6 --no-max6 (enable/disable use of MAX6)
  143. --use-max7 --no-max7 (enable/disable use of MAX7)
  144. --use-max8 --no-max8 (enable/disable use of MAX8)
  145. --use-max9 --no-max9 (enable/disable use of MAX9)
  146. --use-max2009 --no-max2009 (enable/disable use of MAX2009)
  147. --use-max2010 --no-max2010 (enable/disable use of MAX2010)
  148. --use-max2011 --no-max2011 (enable/disable use of MAX2011)
  149. --use-max2012 --no-max2012 (enable/disable use of MAX2012)
  150. --use-max2013 --no-max2013 (enable/disable use of MAX2013)
  151. --use-max2014 --no-max2014 (enable/disable use of MAX2014)
  152. --use-fcollada --no-fcollada (enable/disable use of FCOLLADA)
  153. --use-vrpn --no-vrpn (enable/disable use of VRPN)
  154. --use-openssl --no-openssl (enable/disable use of OPENSSL)
  155. --use-fftw --no-fftw (enable/disable use of FFTW)
  156. --use-artoolkit --no-artoolkit (enable/disable use of ARTOOLKIT)
  157. --use-opencv --no-opencv (enable/disable use of OPENCV)
  158. --use-directcam --no-directcam (enable/disable use of DIRECTCAM)
  159. --use-vision --no-vision (enable/disable use of VISION)
  160. --use-gtk2 --no-gtk2 (enable/disable use of GTK2)
  161. --use-npapi --no-npapi (enable/disable use of NPAPI)
  162. --use-mfc --no-mfc (enable/disable use of MFC)
  163. --use-wx --no-wx (enable/disable use of WX)
  164. --use-fltk --no-fltk (enable/disable use of FLTK)
  165. --use-rocket --no-rocket (enable/disable use of ROCKET)
  166. --use-awesomium --no-awesomium (enable/disable use of AWESOMIUM)
  167. --use-carbon --no-carbon (enable/disable use of CARBON)
  168. --use-cocoa --no-cocoa (enable/disable use of COCOA)
  169. --use-x11 --no-x11 (enable/disable use of X11)
  170. --use-xf86dga --no-xf86dga (enable/disable use of XF86DGA)
  171. --use-xrandr --no-xrandr (enable/disable use of XRANDR)
  172. --use-xcursor --no-xcursor (enable/disable use of XCURSOR)
  173. --use-pandatool --no-pandatool (enable/disable use of PANDATOOL)
  174. --use-pview --no-pview (enable/disable use of PVIEW)
  175. --use-deploytools --no-deploytools (enable/disable use of DEPLOYTOOLS)
  176. --use-skel --no-skel (enable/disable use of SKEL)
  177. --use-pandafx --no-pandafx (enable/disable use of PANDAFX)
  178. --use-pandaparticlesystem --no-pandaparticlesystem (enable/disable use of PA
  179. NDAPARTICLESYSTEM)
  180. --use-contrib --no-contrib (enable/disable use of CONTRIB)
  181. --use-sse2 --no-sse2 (enable/disable use of SSE2)
  182. --use-neon --no-neon (enable/disable use of NEON)
  183. --use-touchinput --no-touchinput (enable/disable use of TOUCHINPUT)
  184. --nothing (disable every third-party lib)
  185. --everything (enable every third-party lib)
  186. --directx-sdk=X (specify version of DX9 SDK to use: jun2010, aug2009, mar200
  187. 9, aug2006)
  188. --platform-sdk=X (specify MSPlatSdk to use: win71, win61, win60A, winserver20
  189. 03r2)
  190. --use-icl (experimental setting to use an intel compiler instead of MS
  191. VC on Windows)
  192. Makepanda shows you all the available options, not all of which may be
  193. relevant to your operating system. For example, makepanda can build a
  194. plugin for 3D Studio Max. However, there is no 3D Studio Max for
  195. Linux, so the options --use-max# are irrelevant under Linux.
  196. SELECTING PANDA FEATURES
  197. Panda contains a large number of optional features. For example, if
  198. panda is compiled with PNG support, then panda will be able to load
  199. textures from PNG image files.
  200. Some of these features require the use of bulky third-party libraries.
  201. For example, 'helix' is a streaming video library from real networks.
  202. If you do not plan on using streaming video in your 3D world, then
  203. you may be interested in compiling panda without helix. This will
  204. shave several megabytes off of the panda libraries.
  205. To select panda features, you need to specify one of two different
  206. command-line options:
  207. makepanda --everything
  208. makepanda --nothing
  209. You can follow either of these with a list of specific exceptions.
  210. For example, you can say:
  211. makepanda --everything --no-helix --no-openssl
  212. makepanda --nothing --use-zlib --use-png
  213. If a certain package could not be found, it is automatically
  214. omitted and a warning message is shown when running makepanda.
  215. Please note that if you abort makepanda, and invoke it again, it
  216. will continue where it left off the last time you ran it. However,
  217. if you change the combination of selected features, the compilation
  218. process may start from scratch the next time you invoke makepanda.
  219. USING YOUR OWN LIBRARIES
  220. Panda3D uses a number of third-party libraries: libpng, libjpeg,
  221. openssl, etc. If you are using a Unix variant, many of these
  222. libraries come with the operating system. Panda3D will use these
  223. OS-supplied libraries where possible, so if your OS comes with a copy
  224. of libpng, Panda3D uses that.
  225. For convenience, the panda source distribution includes precompiled
  226. copies of many of the third-party libraries. You will find these
  227. libraries in a subdirectory labeled 'thirdparty'. If you are happy
  228. with the versions we have provided, then you don't need to do anything
  229. special.
  230. If you are not satisfied with the versions of the libraries we have
  231. provided, you may supply your own versions. To do so, duplicate the
  232. 'thirdparty' tree, substitute your own libraries, and then use
  233. the --thirdparty option to point makepanda to your libraries.
  234. THE EDIT-COMPILE-DEBUG CYCLE
  235. A small caution: if you invoke 'makepanda' with one set of options,
  236. and then invoke 'makepanda' using the exact same set of options, the
  237. second time will be fast. It will see that everything has already
  238. been built, and it will do no actual compilation. As a result,
  239. makepanda can be used as part of an edit-compile-debug cycle.
  240. However, if you invoke makepanda with a *different* set of options,
  241. makepanda may need to recompile and relink a lot of files. This is
  242. because several of those options change the values of '#define'
  243. headers, so changing the options requires a recompilation.
  244. It is all too easy to accidentally invoke 'makepanda' with the wrong
  245. options, thereby triggering an hour-long recompilation. To avoid this
  246. situation, we recommend that you write a short script containing the
  247. options you intend to use regularly. For example, I regularly compile
  248. panda without eigen. I have a very short Windows BAT file called
  249. "mkp.bat" that looks like this:
  250. @echo off
  251. makepanda --everything --no-eigen
  252. This helps me avoid accidentally typing makepanda with the wrong
  253. options.
  254. BUILDING A WINDOWS INSTALLER
  255. Under Windows, makepanda can create an executable installer. All you
  256. need to do is pass the --installer option to makepanda. The makepanda
  257. option --lzma will cause the installer to be compressed with LZMA
  258. compression, which is better, but it takes a long time to do the
  259. compression.
  260. BUILDING A LINUX DEB OR RPM PACKAGE
  261. Under Linux, passing the --installer option to makepanda will
  262. cause makepanda to try to build a deb or rpm package. For this to
  263. work, you have to be using a Linux distribution that includes either
  264. the dpkg-deb or rpmbuild binary.
  265. BUILDING A MACOSX DMG PACKAGE
  266. Under Mac OSX, you can also use the --installer option, which will
  267. generate a .dmg archive containing the Panda3D installation, which
  268. needs to be placed in your /Applications/ directory.
  269. The .dmg also contains a shell script that automatically sets up the
  270. library and python search paths in your .bash_profile file so you don't
  271. have to do that yourself every time you want to use Panda3D.