view 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 source
1 #+title: Setup jMonkeyEngine3
2 #+author: Robert McIntyre
3 #+email: rlm@mit.edu
4 #+description: Simulating senses for AI research using JMonkeyEngine3
5 #+SETUPFILE: ../../aurellem/org/setup.org
6 #+INCLUDE: ../../aurellem/org/level-0.org
7 #+babel: :mkdirp yes :noweb yes :exports both
9 * Setup
11 First, I checked out the source to jMonkeyEngine:
13 #+srcname: checkout
14 #+begin_src sh :results verbatim
15 svn checkout http://jmonkeyengine.googlecode.com/svn/trunk/engine jme3
16 #+end_src
18 #+results: checkout
19 : Checked out revision 7975.
22 Building jMonkeyEngine is easy enough:
24 #+srcname: build
25 #+begin_src sh :results verbatim
26 cd jme3
27 ant jar | tail -n 2
28 #+end_src
30 #+results: build
31 : BUILD SUCCESSFUL
32 : Total time: 15 seconds
35 Also build the javadoc:
37 #+srcname: javadoc
38 #+begin_src sh :results verbatim
39 cd jme3
40 ant javadoc | tail -n 2
41 #+end_src
43 #+results: javadoc
44 : BUILD SUCCESSFUL
45 : Total time: 12 seconds
47 Now, move the jars from the compilation into the project's lib folder.
49 #+srcname: move-jars
50 #+begin_src sh :results verbatim
51 mkdir -p lib
52 mkdir -p src
53 cp jme3/dist/jMonkeyEngine3.jar lib/
54 cp jme3/dist/lib/* lib/
55 ls lib
56 #+end_src
58 #+results: move-jars
59 #+begin_example
60 eventbus-1.4.jar
61 jbullet.jar
62 jheora-jst-debug-0.6.0.jar
63 jinput.jar
64 jME3-jbullet.jar
65 jME3-lwjgl-natives.jar
66 jME3-testdata.jar
67 jME3-test.jar
68 jMonkeyEngine3.jar
69 j-ogg-oggd.jar
70 j-ogg-vorbisd.jar
71 lwjgl.jar
72 nifty-1.3.jar
73 nifty-default-controls-1.3.jar
74 nifty-examples-1.3.jar
75 nifty-lwjgl-renderer-1.3.jar
76 nifty-openal-soundsystem-1.0.jar
77 nifty-style-black-1.3.jar
78 nifty-style-grey-1.0.jar
79 noise-0.0.1-SNAPSHOT.jar
80 stack-alloc.jar
81 vecmath.jar
82 xmlpull-xpp3-1.1.4c.jar
83 #+end_example
85 It's good to create a =assets= directory in the style that the
86 =AssetManager= will like.
88 #+srcname: create-assets
89 #+begin_src sh :results verbatim
90 mkdir -p assets
91 mkdir -p assets/Interface
92 mkdir -p assets/Materials
93 mkdir -p assets/MatDefs
94 mkdir -p assets/Models
95 mkdir -p assets/Scenes
96 mkdir -p assets/Shaders
97 mkdir -p assets/Sounds
98 mkdir -p assets/Textures
99 tree -L 1 assets
100 #+end_src
102 #+results: create-assets
103 #+begin_example
104 assets
105 |-- Interface
106 |-- MatDefs
107 |-- Materials
108 |-- Models
109 |-- Scenes
110 |-- Shaders
111 |-- Sounds
112 `-- Textures
114 8 directories, 0 files
115 #+end_example
118 The java classpath should have all the jars contained in the =lib=
119 directory as well as the src directory.
121 For example, here is the file I use to run my REPL for clojure.
123 #+include: "/home/r/bin/swank-all" src sh :exports code
125 The important thing here is that =cortex/lib/*=, =cortex/src=, and
126 =cortex/assets= appear on the classpath. (=cortex= is the base
127 directory of this project.)
129 #+srcname: pwd
130 #+begin_src sh
131 pwd
132 #+end_src
134 #+results: pwd
135 : /home/r/proj/cortex