The ECharts SDK is supported on Solaris, Mac OS X, Linux, Windows and Eclipse. A number of additional open source software packages are required to build and use ECharts. We enumerate these packages here and provide instructions on how to configure your platform to use ECharts with these packages.
The required software for building and using the ECharts SDK are Python 2.2 or greater and the Java 2 Platform, Standard Edition (JDK 1.4.2 or greater) and a suitable build tool. Python is bundled with the Linux and Mac OS X platforms. On Solaris and Windows a separate download is required from http://python.org. Java is bundled only with Mac OS X. Other platforms require a separate download from http://java.sun.com.
There are three possible build tools for building the ECharts SDK: the Eclipse SDK 3.1.2 or greater, Apache Ant 1.6.3 or greater, or GNU Make and the GNU BASH shell. Eclipse is available from http://www.eclipse.org for all platforms. Apache Ant is available from http://ant.apache.org for all platforms. GNU Make and BASH are bundled with Linux and Mac OS X (GNU Make is included with the Mac OS X Xcode Developer Tools). A separate download is required for Solaris from http://gnu.org. We do not recommend using Make or BASH on Windows since we have not tested them with the ECharts build. Instead, we recommend the use of Eclipse or Ant.
For generating machine diagrams or machine documentation (see Sections 6 and 7), Graphviz version 1.13 or greater is required. This is available as a separate download from http://graphviz.org for all platforms.
The top-level build builds the ECharts language parser and the ECharts Java runtime library echarts.jar. This is a pre-requisite to translating ECharts machines, as described in Appendix A.3.
Before kicking off the build, ensure your platform’s PATH environment variable references the Python executable directory. When building with Apache Ant, simply execute ant all in the ECharts top-level directory. When using Eclipse, select the ‘all’ target of the top-level build.xml file by invoking the file’s ‘Run As -> Ant Build...’ contextual menu option. Note that Eclipse should be configured to use the external Java 2 JDK, not Ant’s internal Java compiler. This is accomplished via the ‘Java -> Installed JREs’ node of the Eclipse ‘Preferences’ panel. When building with GNU Make, the value of the JDK_HOME environment variable must be set to the location of your JDK installation prior to invoking Make. One way to do this is from the BASH shell is as follows. Here we assume the JDK is installed in /usr/java/j2sdk1.4.2_10.
Once the top-level build has been performed (see Appendix A.2) you are ready to start using the ECharts SDK to translate ECharts machines. The ECharts translators (e.g. ech2java) and associated programs (e.g. javadocpp) are Python scripts. They can be invoked either directly or indirectly.
On Unix platforms (Mac OS X, Solaris and Linux), the ECharts translators and programs can be invoked from the command line. To invoke a translator or program without having to prefix it with its path, the path to the translator executables can be added to the system path as follows. Here we assume the path to the ECharts SDK is ECHARTS_HOME, and that we are using the BASH shell.
On Windows, you can invoke the ECharts translators and programs from the Windows Cmd.exe command line shell. However, invocations must be prefixed with an explicit invocation of Python. Here’s an example of invoking ech2java where we assume the path to the ECharts SDK is ECHARTS_HOME.
Translators and programs may also be invoked indirectly via Apache Ant on all platforms, or via GNU Make on Unix platforms (Mac OS X, Solaris and Linux). See the Ant and Make build files located in runtime/java/src/examples of the ECharts SDK for an example of invoking ech2java. Also see the Make and Ant build files located in runtime/java/doc in the ECharts SDK for an example of invoking ech2javadoc and javadocpp.