| 1 | ABC Installation Instructions
|
|---|
| 2 |
|
|---|
| 3 | ======================= Installation from source =======================
|
|---|
| 4 |
|
|---|
| 5 | 1. Install a Java 8 SDK if you have not already. Go to
|
|---|
| 6 | http://www.oracle.com/technetwork/java/javase/downloads/ for the
|
|---|
| 7 | latest from Oracle. On linux, you can optionally sudo apt-get install
|
|---|
| 8 | openjdk-8-jdk.
|
|---|
| 9 |
|
|---|
| 10 | 2. Install Apache ant, if you don't already have it
|
|---|
| 11 | (http://ant.apache.org).
|
|---|
| 12 |
|
|---|
| 13 | 3. Download the tgz archive of VSL dependencies from
|
|---|
| 14 | http://vsl.cis.udel.edu/lib/tools/vsl_depend,
|
|---|
| 15 | choosing the right .tgz according to your platform:
|
|---|
| 16 |
|
|---|
| 17 | vsl_linux32-1.0.tgz - 32-bit linux
|
|---|
| 18 | vsl_linux64-1.0.tgz - 64-bit linux
|
|---|
| 19 | vsl_osx64-1.0.tgz - 64-bit osx
|
|---|
| 20 |
|
|---|
| 21 | Unzip the .tgz file and you will have the folder vsl.
|
|---|
| 22 | Move vsl to /opt (you might need to use sudo for this.
|
|---|
| 23 | Also, if you don't already have a directory called /opt,
|
|---|
| 24 | you will have to create it with mkdir /opt).
|
|---|
| 25 |
|
|---|
| 26 | Suppose that you put the .tgz file (or .tar file if your browser
|
|---|
| 27 | unzipped it automatically to a .tar file) in the directory $Download.
|
|---|
| 28 | You can use the following commands:
|
|---|
| 29 |
|
|---|
| 30 | $ cd $Download
|
|---|
| 31 | $ tar xzf YourTgzOrTarFile vsl
|
|---|
| 32 | $ sudo mv vsl /opt
|
|---|
| 33 |
|
|---|
| 34 | Now you can type "ls /opt/vsl", and the output should be
|
|---|
| 35 |
|
|---|
| 36 | README.txt lib licenses src
|
|---|
| 37 |
|
|---|
| 38 | 4. svn checkout svn://vsl.cis.udel.edu/abc/trunk abc
|
|---|
| 39 |
|
|---|
| 40 | 5. cd abc
|
|---|
| 41 |
|
|---|
| 42 | 6. Look at build_default.properties and see if the paths
|
|---|
| 43 | are correct for your system. If they are not, you will have
|
|---|
| 44 | to create a file called build.properties (in the same directory),
|
|---|
| 45 | copying the content of build_default.properties, but correcting
|
|---|
| 46 | values as necessary. For example, if your VSL dependencies path
|
|---|
| 47 | is not in /opt/vsl, then you need to do this,
|
|---|
| 48 | modifying the value of entry "root" to be the path to your
|
|---|
| 49 | VSL dependencies folder. Similarly, if the location of sarl.jar
|
|---|
| 50 | is not as specified in build_default.properties (the assumption
|
|---|
| 51 | is it will be found in directory
|
|---|
| 52 | Users/${user.name}/Documents/workspace) then you will
|
|---|
| 53 | have to do this, correcting the value of workspace or sarl.jar.
|
|---|
| 54 |
|
|---|
| 55 | 7. Type "ant" and everything should build without warnings or errors
|
|---|
| 56 | and produce abc.jar. Type "ant test" to run a JUnit test suite. All
|
|---|
| 57 | tests should pass.
|
|---|
| 58 |
|
|---|
| 59 | If there are any problems, email siegel at udel dot edu.
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 | ============== Installation from source using Eclipse ==================
|
|---|
| 63 |
|
|---|
| 64 | 1. Start with Eclipse IDE for Java/EE developers, available at
|
|---|
| 65 | http://www.eclipse.org/downloads/
|
|---|
| 66 |
|
|---|
| 67 | 2. Do steps 1-3 from above if you have not already.
|
|---|
| 68 |
|
|---|
| 69 | 3. Install an SVN plugin in Eclipse (such as Subversive) if you have
|
|---|
| 70 | not already.
|
|---|
| 71 |
|
|---|
| 72 | 4. Install the symbolic algebra and reasoning library SARL.
|
|---|
| 73 | In Eclipse, select New Project...from SVN, use the archive
|
|---|
| 74 | svn://vsl.cis.udel.edu/sarl. After entering that, open it
|
|---|
| 75 | up and select the "trunk". After checking out trunk, name
|
|---|
| 76 | the project "SARL". Then follow the instructions in the INSTALL
|
|---|
| 77 | file for Eclipse installation. Build the sarl.jar from within
|
|---|
| 78 | Eclipse by right-clicking (or ctrl-clicking) on the build.xml
|
|---|
| 79 | file and selecting Run As->Ant Build.
|
|---|
| 80 |
|
|---|
| 81 | 5. From within Eclipse, select New Project...from SVN. The archive is
|
|---|
| 82 | svn://vsl.cis.udel.edu/abc. After entering that, open it up and
|
|---|
| 83 | select the "trunk". (It is simplest to just check out the trunk for
|
|---|
| 84 | the Eclipse project.)
|
|---|
| 85 |
|
|---|
| 86 | 6. Check out the trunk, and create the project using the New Java
|
|---|
| 87 | Project Wizard as usual, naming it "ABC". The .project, .classpath,
|
|---|
| 88 | and other Eclipse meta-data are already in the SVN archive, saving you
|
|---|
| 89 | a bunch of work.
|
|---|
| 90 |
|
|---|
| 91 | 7. Navigate to Preferences -> Java -> Build Path -> ClassPath
|
|---|
| 92 | Variables, and then select New to create a classpath variable VSL,
|
|---|
| 93 | and specify its value to be /opt/vsl. Navigate to Preferences ->
|
|---|
| 94 | Run/Debug -> String Substitution -> New, and then define an entry
|
|---|
| 95 | vsl_lib and set its value to be /opt/vsl/lib.
|
|---|
| 96 |
|
|---|
| 97 | 8. Perform Step 6 from the "Installation from Source"
|
|---|
| 98 | instructions above.
|
|---|
| 99 |
|
|---|
| 100 | 9. Right click (or ctrl-click on Mac) on build.xml and select
|
|---|
| 101 | Run As->Ant Build. This runs the ant script, which invokes ANTLR
|
|---|
| 102 | to build the Java source files from the grammar files. It also
|
|---|
| 103 | compiles all the Java source files and builds the jar. (The jar
|
|---|
| 104 | is not used from within Eclipse, but is used when packaging
|
|---|
| 105 | and releasing ABC.) You may have to "Refresh" the entire project
|
|---|
| 106 | after this completes, and/or "Clean" the project.
|
|---|
| 107 |
|
|---|
| 108 | This step only has to be done once, unless the grammar files change,
|
|---|
| 109 | or you want to create an up-to-date jar. Otherwise, Eclipse
|
|---|
| 110 | automatically compiles the Java source whenever it changes.
|
|---|
| 111 |
|
|---|
| 112 | 10. To run the JUnit tests through Eclipse: Select Run->Run Configurations...
|
|---|
| 113 | Create a new JUnit configuration called "ABC Tests". Select
|
|---|
| 114 | "Run all tests in the selected project..." and navigate to the "test"
|
|---|
| 115 | folder in the ABC project. Under the Arguments tab, type "-ea"
|
|---|
| 116 | (without the quotes) into the VM arguments field, to enable assertion
|
|---|
| 117 | checking. Under the Environment tab, create an entry DYLD_LIBRARY_PATH (OS X)
|
|---|
| 118 | or LD_LIBRARY_PATH (linux), specify its value by clicking Variables and choose
|
|---|
| 119 | vsl_lib from the list, or you may type ${vsl_lib} in the value entry.
|
|---|
| 120 | Click "Run" to run the tests.
|
|---|