INSTALL 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. Panda3D Install
  2. This document describes how to compile and install Panda 3D on a
  3. system for the first time. Panda is a complex project and is not
  4. trivial to install, although it is not really very difficult. Please
  5. do take the time to read this document before starting.
  6. Panda is known to build successfully on Linux, SGI Irix, Windows NT
  7. and Windows 2000. It should also be easily portable to other
  8. Unix-based OpenGL systems with little or no changes (please let us
  9. know if you try this). When compiled by Windows NT or 2000, it will
  10. then run on a Windows 95 or 98 system, but we have found that Windows
  11. 98 is not itself stable enough to compile the codebase without
  12. crashing.
  13. Presently, Panda does not compile successfully with Microsoft Visual
  14. C++ version 6.0. You must install Visual C++ 7.0 (that is, Microsoft
  15. Visual Studio .NET) in order to compile Panda on Windows.
  16. Before you begin to compile Panda, there are a number of optional
  17. support libraries that you may wish to install. None of these are
  18. essential; Panda will build successfully without them, but possibly
  19. without some functionality.
  20. * Python. Panda is itself a C++ project, but it can generate a
  21. seamless Python interface layer to its C++ objects and function
  22. calls. Since Python is an interpreted language with a command
  23. prompt, this provides an excellent way to get interactive control
  24. over the 3-D environment. However, it is not necessary to use the
  25. Python interface; Panda is also perfectly useful without Python, as
  26. a C++ 3-D library.
  27. Other scripting language interfaces are possible, too, in theory.
  28. Panda can generate an interface layer for itself that should be
  29. accessible by any scripting language that can make C function calls
  30. to an external library. We have used this in the past, for
  31. instance, to interface Panda with Squeak, an implementation of
  32. Smalltalk. At the present, the Python interface is the only one we
  33. actively maintain. We use Python 2.2, but almost any version should
  34. work; you can get Python at http://www.python.org .
  35. * NSPR. This is the Netscape Portable Runtime library, an OS
  36. compatibility layer written by the folks at Mozilla for support of
  37. the Netscape browser on different platforms. Panda takes advantage
  38. of NSPR to implement threading and network communications. At the
  39. present, if you do not have NSPR available Panda will not be able to
  40. fork threads and will not provide a networking interface. Aside
  41. from that, the PStats analysis tools (which depend on networking)
  42. will not be built without NSPR. We have compiled Panda with NSPR
  43. version 3 and 4.0, although other versions should also work. You
  44. can download NSPR from http://www.mozilla.org .
  45. * VRPN, the "Virtual Reality Peripheral Network," a peripheral
  46. interface library designed by UNC. This is particularly useful for
  47. interfacing Panda with external devices like trackers and joysticks;
  48. without it, Panda can only interface with the keyboard and mouse.
  49. You can find out about it at http://www.cs.unc.edu/Research/vrpn .
  50. * libjpeg and libtiff. These free libraries provide support to Panda
  51. for reading and writing JPEG and TIFF image files, for instance for
  52. texture images. Even without these libraries, Panda has built-in
  53. support for pbm/pgm/ppm, SGI (rgb), TGA, BMP, and a few other
  54. assorted image types like Alias and SoftImage native formats. Most
  55. Linux systems come with libjpeg and libtiff already installed, and
  56. the version numbers of these libraries is not likely to be
  57. important. You can download libjpeg from the Independent JPEG group
  58. at http://www.ijg.org , and libtiff from SGI at
  59. ftp://ftp.sgi.com/graphics/tiff .
  60. * zlib. This very common free library provides basic
  61. compression/decompression routines, and is the basis for the Unix
  62. gzip tool (among many other things). If available, Panda uses it to
  63. enable storing compressed files within its native multifile format,
  64. as well as in a few other places here and there. It's far from
  65. essential. If you don't have it already, you can get it at
  66. http://www.gzip.org/zlib .
  67. * Fmod. This is a free sound library that our friends at CMU have
  68. recently integrated into Panda. It provides basic support for
  69. playing WAV files, MP3 files, and MIDI files within Panda. Get it
  70. at http://www.fmod.org .
  71. * Freetype. This free library provides support for loading TTF font
  72. files (as well as many other types of font files) directly for
  73. rendering text within Panda (using Panda's TextNode interface, as
  74. well as the whole suite of DirectGui 2-d widgets in direct). If you
  75. do not have this library, you can still render text in Panda, but
  76. you are limited to using fonts that have been pre-generated and
  77. stored in egg files. There are a handful of provided font files of
  78. this nature in the models directory (specifically, cmr12, cmss12,
  79. and cmtt12); these were generated from some of the free fonts
  80. supplied with TeX. This can be found at http://www.freetype.org ;
  81. you will need at least version 2.0.
  82. * OpenSSL. This free library provides an interface to secure SSL
  83. communications (as well as a normal, unsecured TCP/IP library). It
  84. is used to implement the HTTP client code in Panda for communicating
  85. with web servers and/or loading files directly from web servers, in
  86. both normal http and secure https modes. If you do not have any
  87. need to contact web servers with your Panda client, you do not need
  88. to install this library. Find it at http://www.openssl.org . We
  89. used version 0.9.6 or 0.9.7, but if there is a more recent version
  90. it should be fine.
  91. * FFTW, the "Fastest Fourier Transform in the West". This free
  92. whimsically-named library provides the mathematical support for
  93. compressing animation tables into Panda's binary bam format. If
  94. enabled, animation tables can be compressed in a lossy form similar
  95. to jpeg, which provides approximately a 5:1 compression ratio better
  96. than gzip alone even at the most conservative setting. If you don't
  97. need to have particularly small animation files, you don't need this
  98. library. Get it at http://www.fftw.org .
  99. * Gtk--. This is a C++ graphical toolkit library, and is only used
  100. for one application, the PStats viewer for graphical analysis of
  101. real-time performance, which is part of the pandatool package.
  102. Gtk-- only compiles on Unix, and primarily Linux; it is possible to
  103. compile it with considerable difficulty on Irix. We have used
  104. version 1.2.1. You can find it at http://www.gtkmm.org .
  105. PANDA'S BUILD PHILOSOPHY
  106. Panda is divided into a number of separate packages, each of which
  107. compiles separately, and each of which generally depends on the ones
  108. before it. The packages are, in order:
  109. dtool - this defines most of the build scripts and local
  110. configuration options for Panda. It also includes the program
  111. "interrogate," which is used to generate the Python interface, as
  112. well as some low-level libraries that are shared both by
  113. interrogate and Panda. It is a fairly small package.
  114. panda - this is the bulk of the C++ Panda code. It contains the 3-D
  115. engine itself, as well as supporting C++ interfaces like
  116. networking, audio, and device interfaces. Expect this package to
  117. take from one to two hours to build from scratch. You must build
  118. and install dtool before you can build panda.
  119. direct - this is the high-level Python interface to Panda. Although
  120. there is some additional C++ interface code here, most of the code
  121. in this package is Python; there is no reason to install this
  122. package if you are not planning on using the Python interface.
  123. DIRECT is an acronym, and has nothing to do with DirectX.
  124. You must build and install dtool and panda before you can build
  125. direct.
  126. pandatool - this is a suite of command-line utilities, written in
  127. C++ using the Panda libraries, that provide useful support
  128. functionality for Panda as a whole, like model-conversion
  129. utilities. You must build and install dtool and panda before you
  130. can build pandatool, although it does not depend on direct.
  131. pandaapp - this holds a few sample applications that link with panda
  132. (and pandatool), but are not generally useful enough to justify
  133. putting them in pandatool. Most of these are not actually
  134. graphical applications; they just take advantage of the various
  135. support libraries (like HTTPClient) that Panda provides. At the
  136. moment, most people probably won't find anything useful here, but
  137. you're welcome to browse; and we will probably add more
  138. applications later.
  139. In graphical form, here are the packages along with a few extras:
  140. +------------------------------+
  141. | Your Python Application Here |
  142. +------------------------------+
  143. |
  144. | +-----------+
  145. | | pandaapp |
  146. | +-----------+
  147. | |
  148. V V
  149. +--------+ +-----------+ +---------------------------+
  150. | direct | | pandatool | | Your C++ Application Here |
  151. +--------+ +-----------+ +---------------------------+
  152. | | |
  153. +-------------+-------------------/
  154. V
  155. +-------+
  156. | panda |
  157. +-------+
  158. |
  159. V
  160. +-------+
  161. | dtool |
  162. +-------+
  163. The arrows above show dependency.
  164. Usually, these packages will be installed as siblings of each other
  165. within the same directory; the build scripts expect this by default,
  166. although other installations are possible.
  167. In order to support multiplatform builds, we do not include makefiles
  168. or project files with the sources. Instead, all the compilation
  169. relationships are defined in a series of files distributed throughout
  170. the source trees, one per directory, called Sources.pp.
  171. A separate program, called ppremake ("Panda pre-make") reads the
  172. various Sources.pp files, as well as any local configuration
  173. definitions you have provided, and generates the actual makefiles that
  174. are appropriate for the current platform and configuration. It is
  175. somewhat akin to the idea of GNU autoconf ("configure"), although it
  176. is both less automatic and more general, and it supports non-Unix
  177. platforms easily.
  178. HOW TO CONFIGURE PANDA FOR YOUR ENVIRONMENT
  179. When you run ppremake within a Panda source tree, it reads in a number
  180. of configure variable definitions given in the file Config.pp in the
  181. root of the dtool package. Many of these variables will already have
  182. definitions that are sensible for you; some will not. You must
  183. customize these variables before you run ppremake.
  184. Normally, rather than modifying dtool/Config.pp directly, you would
  185. create your own, empty Config.pp file in a safe place (for instance,
  186. in your personal home directory) and define just the variables you
  187. need there. The definitions you give in your personal Config.pp file
  188. will override those in the source directory. You will need to set an
  189. environment variable PPREMAKE_CONFIG to the full filename path of your
  190. personal Config.pp (more on this in the platform-specific installation
  191. notes, below). It is also possible simply to modify dtool/Config.pp,
  192. but this is not recommended as it makes it difficult to install
  193. updated versions of Panda.
  194. The syntax of the Config.pp file is something like a cross between the
  195. C preprocessor and Makefile syntax. The full syntax of ppremake
  196. input scripts is described in more detail in another document, but the
  197. most common thing you will need to do is set the value of a variable
  198. using the #define statement. Look in dtool/Config.pp for numerous
  199. examples of this.
  200. Some of the variables you may define within the Config.pp file hold a
  201. true or a false value by nature. It is important to note that you
  202. indicate a variable is true by defining it to some nonempty string
  203. (e.g. "yes" or "1"), and false by defining it to nothing. For
  204. example:
  205. #define HAVE_DX 1
  206. Indicates you have the DirectX SDK installed, while
  207. #define HAVE_DX
  208. Indicates you do not. Do not be tempted to define HAVE_DX to "no" or
  209. "0"; since these are both nonempty strings, they are considered to
  210. represent "true"!
  211. The comments within dtool/Config.pp describe a more complete list of
  212. the variables you may define. The ones that you are most likely to
  213. find useful are:
  214. INSTALL_DIR - this is the prefix of the directory hierarchy into
  215. which Panda should be installed. By default, this is
  216. /usr/local/panda, a fine convention for Unix machines although a
  217. little questionable for Windows environments.
  218. OPTIMIZE - define this to 1, 2, 3, or 4. This is not the same thing
  219. as compiler optimization level; our four levels of OPTIMIZE define
  220. broad combinations of compiler optimizations and debug symbols:
  221. 1 - No compiler optimizations, full debug symbols
  222. 2 - Full compiler optimizations, full debug symbols
  223. (if the compiler supports this)
  224. 3 - Full compiler optimizations, no debug symbols, non-debug heap
  225. 4 - Full optimizations, no debug symbols, and asserts removed
  226. Usually OPTIMIZE 2 or 3 is the most appropriate choice for
  227. development work.
  228. PYTHON_IPATH / PYTHON_LPATH / PYTHON_LIBS - the full pathname to
  229. Python header files, if Python is installed on your system. As of
  230. Python version 2.0, compiling Python interfaces doesn't require
  231. linking with any special libraries, so normally PYTHON_LPATH and
  232. PYTHON_LIBS are left empty.
  233. NSPR_IPATH / NSPR_LPATH / NSPR_LIBS - the full pathname to NSPR
  234. header and library files, and the name of the NSPR library, if
  235. NSPR is installed on your system.
  236. VRPN_IPATH / VRPN_LPATH / VRPN_LIBS - the full pathname to VRPN
  237. header and library files, and the name of the VRPN libraries, if
  238. VRPN is installed on your system.
  239. DX_IPATH / DX_LPATH / DX_LIBS - the full pathname to the DirectX 8.1
  240. SDK header and library files, if you have installed this SDK.
  241. (You must currently install this SDK in order to build DirectX
  242. support for Panda.)
  243. GL_IPATH / GL_LPATH / GL_LIBS - You get the idea. (Normally, OpenGL
  244. is installed in the standard system directories, so you can leave
  245. GL_IPATH and GL_LPATH empty. But if they happen to be installed
  246. somewhere else on your machine, you can fill in the pathnames
  247. here.)
  248. HOW TO BUILD PANDA ON A UNIX SYSTEM
  249. First, make a subdirectory to hold the Panda sources. This can be
  250. anywhere you like; in these examples, we'll assume you build
  251. everything within a directory called "panda3d" in your home directory.
  252. mkdir ~/panda3d
  253. You must compile ppremake before you can begin to compile Panda
  254. itself. Generally, you do something like the following:
  255. cd ~/panda3d/ppremake
  256. ./configure
  257. make
  258. make install
  259. By default, ppremake will install itself in /usr/local/panda/bin, the
  260. same directory that the other Panda binaries will install themselves
  261. to. If you prefer, you can install it in another directory by doing
  262. something like this:
  263. ./configure --prefix=/my/install/directory
  264. If you do this, you will also want to redefine INSTALL_DIR in your
  265. Config.pp to be the same directory (see above). Wherever you install
  266. it, you should make sure the bin directory is included on your search
  267. path, and the corresponding lib directory (e.g. /usr/local/panda/lib)
  268. is on your LD_LIBRARY_PATH (the following example assumes you are
  269. using a csh derivative):
  270. set path=(/usr/local/panda/bin $path)
  271. setenv LD_LIBRARY_PATH /usr/local/panda/lib:$LD_LIBRARY_PATH
  272. If you have a Bourne-shell derivative, e.g. bash, the syntax is:
  273. PATH=/usr/local/panda/bin:$PATH
  274. LD_LIBRARY_PATH=/usr/local/panda/lib:$LD_LIBRARY_PATH
  275. export LD_LIBRARY_PATH
  276. Now you should create your personal Config.pp file, as described
  277. above, and customize whatever variables are appropriate. Be sure to
  278. set the PPREMAKE_CONFIG environment variable to point to it.
  279. setenv PPREMAKE_CONFIG ~/Config.pp
  280. In bash:
  281. PPREMAKE_CONFIG=~/Config.pp
  282. export PPREMAKE_CONFIG
  283. You may find it a good idea to make these environment settings in your
  284. .cshrc or .bashrc file so that they will remain set for future sessions.
  285. Now that you have ppremake, you can test the configuration settings in
  286. your Config.pp file.
  287. cd ~/panda3d/dtool
  288. ppremake
  289. When you run ppremake within the dtool directory, it will generate a
  290. file, dtool_config.h (as well as all of the Makefiles). This file
  291. will be included by all of the Panda3D sources, and reveals the
  292. settings of many of the options you have configured. You should
  293. examine this file to ensure that your settings have been made the way
  294. you expect.
  295. Now you can build the Panda3D sources. Begin with dtool (the current
  296. directory):
  297. make
  298. make install
  299. Once you have successfully built and installed dtool, you can then
  300. build and install panda:
  301. cd ~/panda3d/panda
  302. ppremake
  303. make
  304. make install
  305. After installing panda, you are almost ready to run the program
  306. "pview," which is a basic model viewer program that demonstrates some
  307. Panda functionality. Successfully running pview proves that Panda is
  308. now installed and configured correctly. However, you must set up a
  309. Configrc file to set your runtime configuration options before you can
  310. run Panda and open up a graphics window. See HOW TO RUN PANDA, below.
  311. If you wish, you may also build direct or pandatool:
  312. cd ~/panda3d/direct
  313. ppremake
  314. make
  315. make install
  316. cd ~/panda3d/pandatool
  317. ppremake
  318. make
  319. make install
  320. HOW TO BUILD PANDA ON A WINDOWS SYSTEM, USING CYGWIN
  321. Cygwin is a set of third-party libraries and tools that present a very
  322. Unix-like environment for Windows systems. If you prefer to use a
  323. Unix environment, Cygwin is the way to go. You can download a free
  324. version from http://www.cygwin.com which will have almost everything
  325. you might need, or you can purchase a CD which has some additional
  326. tools (including csh or bash) that you might find useful.
  327. Panda can build and run within a Cygwin environment, but it does not
  328. require it. Note that Cygwin is used strictly as a build environment;
  329. the Cygwin compiler is not used, so no dependency on Cygwin will be
  330. built into Panda. The Panda DLL's that you will generate within a
  331. Cygwin environment will be exactly the same as those you would
  332. generate in a non-Cygwin environment; once built, Panda will run
  333. correctly on any Win32 machine, with or without Cygwin installed.
  334. If you do not wish to install Cygwin for your build environment, see
  335. the instructions below.
  336. If you wish to use Cygwin, there is one important point to keep in
  337. mind. Panda internally uses a Unix-like filename convention; that is,
  338. forward slashes (instead of backslashes) separate directory
  339. components, and there is no leading drive letter on any filename.
  340. These Unix-like filenames are mapped to Windows filenames (with drive
  341. letters and backslashes) when system calls are made.
  342. Cygwin also uses a Unix-like filename convention, and uses a series of
  343. mount commands to control the mapping of Unix filenames to Windows
  344. filenames. Panda is not itself a Cygwin program, and does not read
  345. the Cygwin mount definitions.
  346. That's important enough it's worth repeating. Panda is not aware of
  347. the Cygwin mount points. So a Unix-like filename that makes sense to
  348. a Cygwin command may not be accessible by the same filename from
  349. within Panda.
  350. However, you can set things up so that most of the time, Cygwin and
  351. Panda agree, which is convenient. To do this, it is important to
  352. understand how Panda maps Unix-like filenames to Windows filenames.
  353. * Any relative pathname (that is, a pathname that does not begin
  354. with a leading slash) is left unchanged, except to reverse the
  355. slashes.
  356. * Any full pathname whose topmost directory component is *not* a
  357. single letter is prepended with the contents of the environment
  358. variable PANDA_ROOT.
  359. * Any full pathname whose topmost directory component *is* a single
  360. letter is turned into a drive letter and colon followed by the
  361. remainder of the path. For example, /c/windows/system is turned
  362. into C:\windows\system.
  363. The expectation is that most of the files you will want to access
  364. within Panda will all be within one directory structure, which you
  365. identify by setting the PANDA_ROOT variable. Generally, when you are
  366. using Cygwin, you will want to set this variable to be the same thing
  367. as the root of your Cygwin tree.
  368. For instance, typically Cygwin installs itself in C:\Cygwin. This
  369. means that when you reference the directory /usr/local/bin within
  370. Cygwin, you are actually referring to C:\Cygwin\usr\local\bin. You
  371. should therefore set PANDA_ROOT to C:\Cygwin, so that /usr/local/bin
  372. within Panda will also refer to C:\Cygwin\usr\local\bin.
  373. To sum up: to use Panda within a Cygwin environment,
  374. In tcsh:
  375. setenv PANDA_ROOT 'C:\Cygwin'
  376. or in bash:
  377. PANDA_ROOT='C:\Cygwin'
  378. Follow the instructions under HOW TO BUILD PANDA FOR A UNIX
  379. ENVIRONMENT, above.
  380. HOW TO BUILD PANDA ON A WINDOWS SYSTEM, WITHOUT CYGWIN
  381. Note: although Panda can be built without Cygwin, for the moment we
  382. have dropped support for the Microsoft nmake program (which is not
  383. really supported by Microsoft either). Thus, even though you do not
  384. need to have all of Cygwin installed, you will need to have at least
  385. GNU make. This program is available from Cygwin (make.exe); you can
  386. copy this program from someone who has installed Cygwin, or you can go
  387. to www.cygwin.com and try to install just this one program. You will
  388. also need the support DLL, cygwin1.dll.
  389. You will need a directory for holding the installed Panda. This can
  390. be anywhere you like; in this example we'll assume you use a directory
  391. called "panda3d" on the root of the C drive.
  392. md c:\panda3d
  393. You will first need to build a copy of ppremake.exe. There is a
  394. Microsoft project file in the ppremake directory that will build this.
  395. Once it is built, copy it to the Panda bin directory (which you will
  396. have to make yourself). This will be a directory called "bin" below
  397. the root of the installed directory you created above; for instance,
  398. c:\panda3d\bin.
  399. Make sure the Panda bin and lib directories are on your path, and set
  400. a few environment variables for building. We suggest creating a file
  401. called PandaEnv.bat to hold these commands; then you may invoke this
  402. batch file before every Panda session to set up your environment
  403. properly. Alternatively, you may make these definitions in the
  404. registry.
  405. path c:\panda3d\bin;c:\panda3d\lib;%PATH%
  406. set PANDA_ROOT=c:\
  407. set PPREMAKE_CONFIG=c:\panda3d\Config.pp
  408. Setting PANDA_ROOT specifies the default drive Panda will search for
  409. file references. (Panda internally uses a Unix-like filename
  410. convention, which does not use leading drive letters. See the bullet
  411. points in the Cygwin section, above, describing the rules Panda uses
  412. to map its Unix-like filenames to Windows filenames.)
  413. Now make a directory for building Panda. This may be different from
  414. the directory, above, that holds the installed Panda files; or it may
  415. be the same. In this example we assume you will be building in the
  416. same directory, c:\panda3d.
  417. Now set up your personal Config.pp file to control your local
  418. configuration settings, as described above. We suggest putting it in
  419. the root of the build directory.
  420. edit c:\panda3d\Config.pp
  421. Add at least the following line to your Config.pp file. (You may want
  422. to add additional lines, according to your needs. See HOW TO
  423. CONFIGURE PANDA FOR YOUR ENVIRONMENT, above.)
  424. #define INSTALL_DIR c:\panda3d
  425. Now you should be able to build dtool.
  426. c:
  427. cd \panda3d\dtool
  428. ppremake
  429. make
  430. make install
  431. And then build panda.
  432. c:
  433. cd \panda3d\panda
  434. ppremake
  435. make
  436. make install
  437. And (optionally) build direct.
  438. c:
  439. cd \panda3d\direct
  440. ppremake
  441. make
  442. make install
  443. And (optionally) build pandatool.
  444. c:
  445. cd \panda3d\pandatool
  446. ppremake
  447. make
  448. make install
  449. HOW TO RUN PANDA
  450. Once Panda has been successfully built and installed, you should be
  451. able to run pview to test that everything is working:
  452. pview
  453. The first time you run pview, if you have not yet created a Configrc
  454. file, you should see something like this:
  455. Known pipe types:
  456. No interactive pipe is available! Check your Configrc!
  457. If you get instead an error about some shared library or libraries not
  458. being found, check that your LD_LIBRARY_PATH setting (on Unix) or your
  459. PATH (on Windows) include the directory in which all of the Panda
  460. libraries have been installed (That is, $INSTALL_DIR/lib, or whatever
  461. you set INSTALL_DIR to followed by "lib". On Unix, this defaults to
  462. /usr/local/panda/lib).
  463. If you do get the above error message, you will need to create a
  464. Configrc file to indicate some run-time parameters. This is different
  465. from the Config.pp file you created above, which is only used by
  466. ppremake to define compile-time parameters; the Configrc file is read
  467. every time Panda is started and it defines parameters that control
  468. run-time behavior.
  469. Create a file called Configrc in your home directory (or wherever you
  470. find convenient). Note that this file must have no extension; in
  471. particular, it should not have the extension "txt". Notepad will add
  472. this extension by default, so if you use Notepad to create the file,
  473. you should then rename it so that it does not have the extension
  474. "txt".
  475. For now, add just the line:
  476. load-display pandagl
  477. Or, if you are on Windows and prefer to use DirectX instead of OpenGL,
  478. add instead the line:
  479. load-display pandadx8
  480. Later you may add additional lines here to control the default
  481. behavior of Panda in other ways.
  482. If you do not specify otherwise, Panda will look for the Configrc file
  483. in the current directory, so for now try to run pview from within the
  484. same directory as your Configrc file. If all goes well, it should
  485. open up a window with a blue triangle. You can use the mouse to move
  486. the triangle around. You can also pass the name of an egg file, if
  487. you have one (look in the models directory for some sample egg files),
  488. on the command line, and pview will load up and display the egg file.
  489. If you want to load the Configrc from other than the current
  490. directory, set the following two environment variables:
  491. CONFIG_CONFIG=:configpath=CFG_PATH
  492. CFG_PATH=/my/home/directory
  493. Where /my/home/directory is the name of your home directory (or
  494. wherever you put the Configrc file). Note that forward slashes should
  495. be used, according to the Panda convention. Also note that on
  496. Windows, the path you specify is relative to the directory named by
  497. PANDA_ROOT, unless it begins with a single-letter directory name (see
  498. the explanation of how Panda maps its internal filenames to Windows
  499. filenames, above.)