Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
EVIADA Developer Notes Original version by Andrew Albrecht, 2009 — revised by Don Byrd, 2009–Feb. 2010 Eclipse and Subversion EVIADA uses the Eclipse IDE. The regular (non-EE) version of the Eclipse platform should be adequate. The source for EVIADA is located in an SVN (Subversion) repository. To access it, Eclipse must have the Subclipse plugin installed. (Instructions are in the DLP Wiki. Essentially, get it via Eclipse’s Help > Install New Software [in earlier versions, of Eclipse, Software Updates?]; Available Software Sites; check http://subclipse.tigris.org/update_1.2.x > Subclipse Plugin; etc. etc.) Checking out EVIADA into Eclipse To check out the EVIADA project, choose File/New/Project…; from the SVN section, choose Checkout Projects from SVN, then Create a new repository location?? . The Location URL for standard EVIADA code is “svn+ssh://svn.dlib.indiana.edu/SVN/EVIADA/EVIADA” (For the GTW project’s “AWB Plus” version, it’s “svn+ssh://svn.dlib.indiana.edu/SVN/EVIADA/EVIADA-GTW-BRANCH”.) In the Checkout from SVN > Select Folder window, select the top-level folder. In the Check Out As window, make sure that Check out as a project configured using the New Project Wizard is selected; then click Finish. In the New Project > Select a wizard window, choose the Java > Java Project wizard. In the New Java Project window, name your project, e.g., EVIA (in the rest of this document <Project Name> refers to the name you choose here); click Finish and an “SVN Checkout” window should appear, showing the files as they’re checked out. Once the source has been checked out, Eclipse must be configured to properly compile/debug/code complete/run/etc. 1. Open the build.xml file located in the project base directory. From the Outline window, right clink on the ant build target prepare.libs.for.ide and choose Run As/Ant Build. This extracts 3rd party libraries to subdirectories of <Project Name>/3rdparty. You must refresh the project after this step! In the Package Explorer, right click <Project Name> and choose refresh. If you don’t do this, the jars extracted by ANT will not be visible to Eclipse. 2. Update the Java Build Path. In the Package Explorer, right click on the EVIADA project and choose Properties On the left column, select Java Build Build Path On the Source tab, if the following folders aren’t present, add them: o <Project Name>/images o <Project Name>/java o <Project Name>/resources On the Libraries tab, add jars from the following directories: o All jars in <Project Name>/3rdparty o The awb-legacy-castor-classes.jar file in <Project Name>/3rdparty/generated o All jars in all subdirectories of <Project Name>/3rdparty/extracted/ 3. Eclipse will now compile the source code. At this point the debugger and auto complete are supported; however, the AWB itself is missing some important support files. The easiest way to get these is to run the ANT build target awb.run (from build.xml). This creates (and runs) a fully configured instance of the AWB in the location <Project Name>/build/awb/installed/awb. Then copy the following directories to the project root directory (replacing them if they’re already present): <Project Name>/build/awb/installed/awb/conf <Project Name>/build/awb/installed/awb/data <Project Name>/build/awb/installed/awb/log 4. To run the AWB from Eclipse, application parameters must be specified, so it’s best to create a run configuration and use that to launch AWB. Open the menu to the right of the Eclipse “Run” button (green circle with triangle) and select Run Configurations [or Open Run Dialog??]. a) Double click Java Application to create a new launch configuration ??OR Under Java Application, choose New_configuration b) Name the configuration c) Set the main class to edu.indiana.eviada.applications.annotator.AnnotatorsWorkbench d) On the Arguments tab, under Program arguments, add “-c conf/eviadaconfig.cfx”. This flag tells AWB to look for its config file in the project’s root directory under the conf/ directory; in turn, the config file declares other file locations relative to the install directory (in this case, the project directory). e) Click Apply, then Close. You’re done. Building and running AWB To create both Windows and OS X runnable standalone versions of AWB, in Eclipse, run the Ant task package-releases (in workbench.xml); the runnable versions go into <Project Name>/build/awb/installed , and in .zip form in <Project Name>/build/awb/dist . In the OS X version (only), you may then need to correct the permissions for one file: chmod 755 Annotator's Workbench.app/Contents/MacOS/JavaApplicationStub Why must this be done manually? It’d be difficult or impossible to make Ant give it the correct permissions automatically, since Ant knows nothing about OS platforms, and chmod doesn’t even exist in Windows, etc. ??But it seems to get those permissions on my machine automatically now – since about Sept. 2009, which is when I upgraded the OS from 10.4 to 10.5! ??CHECK! UPDATE! Important Runtime Files for AWB Most AWB runtime files, if not all, are XML. Most have the extension .xml, but AWB project files have .awx. The primary configuration file is eviadaconfig.cfx, and AWB expects to find it in a conf directory; here’s where it looks for that directory. How run Configuration file location Eclipse “run” buttons <Project Name>/conf the standard Ant task run [default] <Project Name>/build/awb/installed/awb/conf Built application OS X: <app>/Working/conf; Windows: ?? Building AWB via the standard Ant task package-releases creates a default conf directory by copying it from, normally, the <Project Name>/distributions/awb/eviada directory. (The build.properties file contains all the ant environment variable bindings, including that path.) The main purpose of eviadaconfig.cfx is to give the locations of other important files, including the layout files for the top-level AWB modes. These are normally in the same directory, and with their “layoutName”s, they are: editing.xml: “EVIADA: Default Editing Layout” preview.xml: “EVIADA: Default Preview Layout” standby.xml: “EVIADA: Standby Layout” eviadaconfig.cfx also gives the paths to files with controlled vocabulary and category information; <mediaLocations>, a list of possible paths to video files (really, places the video files have been found in the past); and optionally an <unsavedFile> and a list of <recentlyOpenedFile>s. It can also specify things other than file locations, for example, font names and sizes.