source: trunk/README.Compiling.txt

Last change on this file was 133, checked in by bowman, 12 years ago

Various minor missing commits.

File size: 3.5 KB
Line 
1Compiling CSP
2-------------
3
4The proxy is pure java and can be compiled on any platform that has a java sdk available.
5
6You'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
8NOTE: As of 0.8.10 java 1.6 is required to compile everything, but 1.4 is still enough to run the proxy.
9Sun 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:
13http://java.sun.com/docs/books/tutorial/
14
15The proxy comes with project files for Intellij IDEA 9, but you don't need this to compile (its a commercial product):
16http://www.jetbrains.com/idea/index.html
17NOTE: There is now a open source community version as well, which works perfectly with the csp project files.
18
19To 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
22Once j2sdk + ant is installed (and their respective /bin directories added to PATH) you can build the proxy using the
23following procedure:
24
25$ tar xvzf cardservproxy-0.9.0-src.tar.gz
26$ cd cardservproxy-src
27$ ant
28
29This runs the default build target "build" in the build.xml file. This target compiles all classes and creates
30the jar/war files. Each output file ends up in ./dist
31
32NOTE: By default this will attempt to build the example plugins (which may have dependencies that aren't included).
33If you don't want these then run ant with: -Dskip-plugins=true
34
35To build the distribution tar do:
36$ ant tar-app
37
38
39--------------------------------------------------------------------------------------------------------------------
40
41The source distribution is arranged as follows:
42
43build - Temp directory for the installation distribution (dir structure for cardservproxy.tar.gz).
44classes - Temp directory for compiled .class files.
45config - Example configs and reference.
46dist - Temp directory for generated distribution files.
47lib - 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).
49etc - Misc resources.
50src - Java source files and other resources that will end up in cardservproxy.jar.
51trtest - Files needed for the executable fishenc.jar (manifest only, all classes are in cardservproxy.jar).
52web - Files for the status web monitoring gui (see README.HttpXmlApi.txt for details). Ends up in cs-status.war.
53plugins - project dirs for the example plugins (each one laid out roughly like the main dir for the proxy source).
54
55jsw-win32.zip - Template for a java-service-wrapper windows setup (running java and the proxy as windows service).
56CardServProxy.ipr CardServProxy.iml - Intellij IDEA project and module files.
57build.xml - Apache ant makefile.
58
59NOTE: While the java source may seem somewhat organized at first glance, it's really a mess. It's the result of years
60of organic growth (with contributions from many people) with little or no testing or oversight. Don't assume anything
61in there is well thought through, if something seems broken - it probably is.
Note: See TracBrowser for help on using the repository browser.