diff org/setup.org @ 22:157b416152ea

continuing splitting
author Robert McIntyre <rlm@mit.edu>
date Sun, 23 Oct 2011 23:35:04 -0700
parents
children 183744c179e6
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/org/setup.org	Sun Oct 23 23:35:04 2011 -0700
     1.3 @@ -0,0 +1,136 @@
     1.4 +#+title: Setup jMonkeyEngine3
     1.5 +#+author: Robert McIntyre
     1.6 +#+email: rlm@mit.edu
     1.7 +#+description: Simulating senses for AI research using JMonkeyEngine3
     1.8 +#+SETUPFILE: ../../aurellem/org/setup.org
     1.9 +#+INCLUDE: ../../aurellem/org/level-0.org
    1.10 +#+babel: :mkdirp yes :noweb yes :exports both
    1.11 +
    1.12 +* Setup
    1.13 +
    1.14 +First, I checked out the source to jMonkeyEngine:
    1.15 +
    1.16 +#+srcname: checkout 
    1.17 +#+begin_src sh :results verbatim
    1.18 +svn checkout http://jmonkeyengine.googlecode.com/svn/trunk/engine jme3
    1.19 +#+end_src
    1.20 +
    1.21 +#+results: checkout
    1.22 +: Checked out revision 7975.
    1.23 +
    1.24 +
    1.25 +Building jMonkeyEngine is easy enough:
    1.26 +
    1.27 +#+srcname: build
    1.28 +#+begin_src sh :results verbatim
    1.29 +cd jme3
    1.30 +ant jar | tail -n 2
    1.31 +#+end_src
    1.32 +
    1.33 +#+results: build
    1.34 +: BUILD SUCCESSFUL
    1.35 +: Total time: 15 seconds
    1.36 +
    1.37 +
    1.38 +Also build the javadoc:
    1.39 +
    1.40 +#+srcname: javadoc
    1.41 +#+begin_src sh :results verbatim
    1.42 +cd jme3
    1.43 +ant javadoc | tail -n 2
    1.44 +#+end_src
    1.45 +
    1.46 +#+results: javadoc
    1.47 +: BUILD SUCCESSFUL
    1.48 +: Total time: 12 seconds
    1.49 +
    1.50 +Now, move the jars from the compilation into the project's lib folder.
    1.51 +
    1.52 +#+srcname: move-jars
    1.53 +#+begin_src sh :results verbatim
    1.54 +mkdir -p lib 
    1.55 +mkdir -p src
    1.56 +cp jme3/dist/jMonkeyEngine3.jar lib/
    1.57 +cp jme3/dist/lib/* lib/
    1.58 +ls lib
    1.59 +#+end_src
    1.60 +
    1.61 +#+results: move-jars
    1.62 +#+begin_example
    1.63 +eventbus-1.4.jar
    1.64 +jbullet.jar
    1.65 +jheora-jst-debug-0.6.0.jar
    1.66 +jinput.jar
    1.67 +jME3-jbullet.jar
    1.68 +jME3-lwjgl-natives.jar
    1.69 +jME3-testdata.jar
    1.70 +jME3-test.jar
    1.71 +jMonkeyEngine3.jar
    1.72 +j-ogg-oggd.jar
    1.73 +j-ogg-vorbisd.jar
    1.74 +lwjgl.jar
    1.75 +nifty-1.3.jar
    1.76 +nifty-default-controls-1.3.jar
    1.77 +nifty-examples-1.3.jar
    1.78 +nifty-lwjgl-renderer-1.3.jar
    1.79 +nifty-openal-soundsystem-1.0.jar
    1.80 +nifty-style-black-1.3.jar
    1.81 +nifty-style-grey-1.0.jar
    1.82 +noise-0.0.1-SNAPSHOT.jar
    1.83 +stack-alloc.jar
    1.84 +vecmath.jar
    1.85 +xmlpull-xpp3-1.1.4c.jar
    1.86 +#+end_example
    1.87 +
    1.88 +It's good to create a =assets= directory in the style that the
    1.89 +=AssetManager= will like.
    1.90 +
    1.91 +#+srcname: create-assets
    1.92 +#+begin_src sh :results verbatim
    1.93 +mkdir -p assets
    1.94 +mkdir -p assets/Interface
    1.95 +mkdir -p assets/Materials
    1.96 +mkdir -p assets/MatDefs
    1.97 +mkdir -p assets/Models
    1.98 +mkdir -p assets/Scenes
    1.99 +mkdir -p assets/Shaders
   1.100 +mkdir -p assets/Sounds
   1.101 +mkdir -p assets/Textures
   1.102 +tree -L 1 assets
   1.103 +#+end_src
   1.104 +
   1.105 +#+results: create-assets
   1.106 +#+begin_example
   1.107 +assets
   1.108 +|-- Interface
   1.109 +|-- MatDefs
   1.110 +|-- Materials
   1.111 +|-- Models
   1.112 +|-- Scenes
   1.113 +|-- Shaders
   1.114 +|-- Sounds
   1.115 +`-- Textures
   1.116 +
   1.117 +8 directories, 0 files
   1.118 +#+end_example
   1.119 +
   1.120 +
   1.121 +The java classpath should have all the jars contained in the =lib=
   1.122 +directory as well as the src directory.
   1.123 +
   1.124 +For example, here is the file I use to run my REPL for clojure.
   1.125 +
   1.126 +#+include: "/home/r/bin/swank-all" src sh :exports code
   1.127 +
   1.128 +The important thing here is that =cortex/lib/*=, =cortex/src=, and
   1.129 +=cortex/assets= appear on the classpath. (=cortex= is the base
   1.130 +directory of this project.)
   1.131 +
   1.132 +#+srcname: pwd
   1.133 +#+begin_src sh 
   1.134 +pwd
   1.135 +#+end_src
   1.136 +
   1.137 +#+results: pwd
   1.138 +: /home/r/proj/cortex
   1.139 +