1 | Compiling CSP
|
---|
2 | -------------
|
---|
3 |
|
---|
4 | The proxy is pure java and can be compiled on any platform that has a java sdk available.
|
---|
5 |
|
---|
6 | You'll need the following:
|
---|
7 | - The Java SE sdk and compiler (jdk) 1.6 or later: http://java.sun.com/javase/downloads/widget/jdk6.jsp
|
---|
8 | NOTE: As of 0.8.10 java 1.6 is required to compile everything, but 1.4 is still enough to run the proxy.
|
---|
9 | Sun only provides downloads for linux/win/solaris, osx users look to apple: http://developer.apple.com/java/download/
|
---|
10 | - Apache ant (xml makefile system) 1.6 or later: http://ant.apache.org/bindownload.cgi
|
---|
11 | - If you're on windows, you should consider using cygwin to get a proper bash shell: http://www.cygwin.com
|
---|
12 | - If you plan to change or fix something, a basic understanding of java concepts will help:
|
---|
13 | http://java.sun.com/docs/books/tutorial/
|
---|
14 |
|
---|
15 | The proxy comes with project files for Intellij IDEA 9, but you don't need this to compile (its a commercial product):
|
---|
16 | http://www.jetbrains.com/idea/index.html
|
---|
17 | NOTE: There is now a open source community version as well, which works perfectly with the csp project files.
|
---|
18 |
|
---|
19 | To make sure ant uses the correct java compiler, set your JAVA_HOME so that it points to your sun j2sdk install dir, e.g:
|
---|
20 | $ export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.15/
|
---|
21 |
|
---|
22 | Once j2sdk + ant is installed (and their respective /bin directories added to PATH) you can build the proxy using the
|
---|
23 | following procedure:
|
---|
24 |
|
---|
25 | $ tar xvzf cardservproxy-0.9.0-src.tar.gz
|
---|
26 | $ cd cardservproxy-src
|
---|
27 | $ ant
|
---|
28 |
|
---|
29 | This runs the default build target "build" in the build.xml file. This target compiles all classes and creates
|
---|
30 | the jar/war files. Each output file ends up in ./dist
|
---|
31 |
|
---|
32 | NOTE: By default this will attempt to build the example plugins (which may have dependencies that aren't included).
|
---|
33 | If you don't want these then run ant with: -Dskip-plugins=true
|
---|
34 |
|
---|
35 | To build the distribution tar do:
|
---|
36 | $ ant tar-app
|
---|
37 |
|
---|
38 |
|
---|
39 | --------------------------------------------------------------------------------------------------------------------
|
---|
40 |
|
---|
41 | The source distribution is arranged as follows:
|
---|
42 |
|
---|
43 | build - Temp directory for the installation distribution (dir structure for cardservproxy.tar.gz).
|
---|
44 | classes - Temp directory for compiled .class files.
|
---|
45 | config - Example configs and reference.
|
---|
46 | dist - Temp directory for generated distribution files.
|
---|
47 | lib - Dependency jars needed to compile (but not to run, you'll need to copy the jars from dist to lib to do that).
|
---|
48 | NOTE: Source for these dependencies is available on request (go find bowman on efnet or bow on freenode).
|
---|
49 | etc - Misc resources.
|
---|
50 | src - Java source files and other resources that will end up in cardservproxy.jar.
|
---|
51 | trtest - Files needed for the executable fishenc.jar (manifest only, all classes are in cardservproxy.jar).
|
---|
52 | web - Files for the status web monitoring gui (see README.HttpXmlApi.txt for details). Ends up in cs-status.war.
|
---|
53 | plugins - project dirs for the example plugins (each one laid out roughly like the main dir for the proxy source).
|
---|
54 |
|
---|
55 | jsw-win32.zip - Template for a java-service-wrapper windows setup (running java and the proxy as windows service).
|
---|
56 | CardServProxy.ipr CardServProxy.iml - Intellij IDEA project and module files.
|
---|
57 | build.xml - Apache ant makefile.
|
---|
58 |
|
---|
59 | NOTE: While the java source may seem somewhat organized at first glance, it's really a mess. It's the result of years
|
---|
60 | of organic growth (with contributions from many people) with little or no testing or oversight. Don't assume anything
|
---|
61 | in there is well thought through, if something seems broken - it probably is.
|
---|