comparison org/setup.org @ 34:183744c179e6

MASSIVE cleanup, especially in the vision code
author Robert McIntyre <rlm@mit.edu>
date Thu, 03 Nov 2011 08:28:26 -0700
parents 157b416152ea
children 1381a6ebd08b
comparison
equal deleted inserted replaced
33:c377222528e6 34:183744c179e6
1 #+title: Setup jMonkeyEngine3 1 #+title: Setup jMonkeyEngine3
2 #+author: Robert McIntyre 2 #+author: Robert McIntyre
3 #+email: rlm@mit.edu 3 #+email: rlm@mit.edu
4 #+description: Simulating senses for AI research using JMonkeyEngine3 4 #+description: Simulating senses for AI research using JMonkeyEngine3
5 #+keywords: JMonkeyEngine3, clojure, java, setup
5 #+SETUPFILE: ../../aurellem/org/setup.org 6 #+SETUPFILE: ../../aurellem/org/setup.org
6 #+INCLUDE: ../../aurellem/org/level-0.org 7 #+INCLUDE: ../../aurellem/org/level-0.org
7 #+babel: :mkdirp yes :noweb yes :exports both 8 #+babel: :mkdirp yes :noweb yes :exports both
8 9
9 * Setup 10 * Setup
10 11
11 First, I checked out the source to jMonkeyEngine: 12 First, I checked out the source to jMonkeyEngine:
12 13
13 #+srcname: checkout 14 #+srcname: checkout
14 #+begin_src sh :results verbatim 15 #+begin_src sh :results verbatim
15 svn checkout http://jmonkeyengine.googlecode.com/svn/trunk/engine jme3 16 svn checkout http://jmonkeyengine.googlecode.com/svn/trunk/engine \
17 /home/r/proj/jMonkeyEngine3
16 #+end_src 18 #+end_src
17 19
18 #+results: checkout 20 #+results: checkout
19 : Checked out revision 7975. 21 : Checked out revision 7975.
20 22
21 23
22 Building jMonkeyEngine is easy enough: 24 Building jMonkeyEngine is easy enough:
23 25
24 #+srcname: build 26 #+srcname: build
25 #+begin_src sh :results verbatim 27 #+begin_src sh :results verbatim
26 cd jme3 28 cd /home/r/proj/jMonkeyEngine3
27 ant jar | tail -n 2 29 ant jar | tail -n 2
28 #+end_src 30 #+end_src
29 31
30 #+results: build 32 #+results: build
31 : BUILD SUCCESSFUL 33 : BUILD SUCCESSFUL
32 : Total time: 15 seconds 34 : Total time: 5 seconds
33 35
34 36
35 Also build the javadoc: 37 Also build the javadoc:
36 38
37 #+srcname: javadoc 39 #+srcname: javadoc
38 #+begin_src sh :results verbatim 40 #+begin_src sh :results verbatim
39 cd jme3 41 cd /home/r/proj/jMonkeyEngine3
40 ant javadoc | tail -n 2 42 ant javadoc | tail -n 2
41 #+end_src 43 #+end_src
42 44
43 #+results: javadoc 45 #+results: javadoc
44 : BUILD SUCCESSFUL 46 : BUILD SUCCESSFUL
45 : Total time: 12 seconds 47 : Total time: 10 seconds
46
47 Now, move the jars from the compilation into the project's lib folder.
48
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
57
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
84
85 It's good to create a =assets= directory in the style that the
86 =AssetManager= will like.
87
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
101
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
113
114 8 directories, 0 files
115 #+end_example
116 48
117 49
118 The java classpath should have all the jars contained in the =lib= 50 The java classpath should have all the jars from the jMonkeyEngine
119 directory as well as the src directory. 51 directory.
120 52
121 For example, here is the file I use to run my REPL for clojure. 53 For example, here is the file I use to run my REPL for clojure.
122 54
123 #+include: "/home/r/bin/swank-all" src sh :exports code 55 #+include: "/home/r/bin/swank-all" src sh :exports code
124 56
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.)
128 57
129 #+srcname: pwd
130 #+begin_src sh
131 pwd
132 #+end_src
133 58
134 #+results: pwd
135 : /home/r/proj/cortex
136