Mercurial > hg > jslab
view INSTALL @ 5:b67a33c44de7
Remove some crap, etc
author | samer |
---|---|
date | Fri, 05 Apr 2019 21:34:25 +0100 |
parents | bf79fb79ee13 |
children |
line wrap: on
line source
I'm afraid the build and install process is not very automated as there are a lot of external dependencies, and the details will depend on how your machine is set up. In everything that follows, ~ denotes the directory created when you unpack the source distribution. It should contain several directories including src/ scheme/ and examples/ Building -------- There should be a prebuilt samer.jar in ~/lib. Currently using Ant to manage the build process. If you use Ant, make sure you set the ANT_HOME and JAVA_HOME environment variables correctly. Also, note that the build file build.xml uses JIKES and not JAVAC as the compiler as its about a million times faster. If you don't have JIKES I suggest you get it. Otherwise, you will have to comment out that line in build.xml. anyway, do ant compile to complile everything ant docs to compile javadocs ant dist to make a jar file of all the classes If you don't want to (or can't) use Ant, then you will have to devise some other way of getting all the java compiled. You might want to import it into whatever IDE you like to use. Dependencies ------------ You need these these packages on your system to be able to compile and run everything: JScheme - A Scheme interpreter in Java (essential) JAMA - A matrix package (essential) Java3D - For 3D graphics (to compile/use samer.j3d package) libreadline-java - much better command line for JScheme (unix only) tritonus - For writing wave files (samer.core.FileSink) and for reading encoding audio like MP3, OGG. May also need javalayer/jogg/jorbis packages too. This is a summary of jars and what they are needed for -- minimal to build everything jama.jar -- to build samer.j3d.* package j3daudio.jar j3dcore.jar j3dutils.jar vecmath.jar -- to build samer.silk.* package jscheme.jar libreadline-java.jar -- to build samer.audio.FileSink class tritonus_aos.jar tritonus_share.jar -- extra required to read encoded audio at run time javalayer.jar jogg-0.0.5.jar jorbis-0.0.12.jar tritonus_dsp.jar tritonus_jorbis.jar tritonus_mp3.jar tritonus_remaining.jar tritonus_vorbis.jar These jars or links to these jars need to be in ~/lib if you use the supplied build.xml with Ant. They can be anywhere if you are prepared to hack around and set up your own classpath. Note that libreadline-java needs a supporting native library which you will have to install if you want to use it. Installing ---------- This is where the fun starts. The first order of business is to decide what the CLASSPATH will be. You need the jars as described above, and you also need to include either the ~/build directory that is populated when everything is compiled 'ant compile', or the ~/dist/lib/samer-xxxxxx.jar that is produced if you 'ant dist'. Or the ~/lib/samer.jar that comes with the distribution. Then you need to go and look in the ~/local directory. There are two executable scripts called silk and swing in there (silk.bat and swing.bat for those of you using Windows. There are also two scheme scripts called silkrc.scm and swingrc.scm. The 'silk' script needs to set up the class path and invoke JScheme on the 'silkrc.scm' script. You fix up the paths. Then link or copy silk to wherever you want to keep it. When you run it, you should get a nice Scheme interpreter but not much else. The swingrc.scm script sets up a working environment for using the rest of the library, including creating a samer.core.shells.SwingShell. You can also decide on various things like what Look-and-feel to use, and whether you want antialiased graphics. Other properties are loaded from ~/local/user.props, but in order to find this file, you need to make sure the variable jhome is correctly set in silkrc.scm _____________________________________________________ Note for windows users: Unix file names go like this: ~/something or /usr/local/something/else Paths are colon separated, eg ~/java/lib:/usr/local/java/lib under windows, change / to \ and : to ; eg c:\this\is\a\path;c:\this\is\another Useful References ----------------- JScheme (formerly SILK) Current project page: jscheme.sourceforge.net Old version: www.norvig.com/jscheme.html JAMA: Jama Matrix library http://math.nist.gov/javanumerics/jama/ Java Readline Javasound Tritonus (Java sound implementation) Java3D Java graphics http://java.sun.com/products/jfc/tsc/articles/painting/index.html Ant: A build tool (replacement for make)