-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathINSTALL
99 lines (65 loc) · 2.56 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Building JSqsh
-=-=-=-=-=-=-=-=-=-=-=-=-
Compiling
=========
As an end-user I'm hoping that you won't need to read this section, as
I will try to keep pre-compiled distributions available at:
http://sourceforge.net/project/showfiles.php?group_id=205193
However, I will need help maintaining current builds for various
platforms, so please feel free to donate builds.
Requirements
------------
To build jsqsh you'll need the following:
1. Sun Java >= 1.5 JDK (http://java.sun.com)
2. Maven 3.x
The following are required if you wish to build sqsh's JNI layer. For
the windows platforms the dll's are packaged in the dist/win32 and dist/win64
directories, so there is not need to build them unless you make changes.
Unix
1. gcc >= 3.x
2. gnu make >= 3.x
Windows
1. cmake
2. Visual Studio 2005 or later
Build Targets and Configurations
--------------------------------
The jsqsh build uses maven, so follows the basic maven development lifecycle:
mvn compile # compiles the code
mvn package # produces a package. By default this a .jar file in target/
mvn clean # cleans up after a build
The build comes with the shared libraries already built for the following
platforms:
* Windows x86 32bit
* Windows x86 64bit
* Linux x86 32bit
* Linux x86 64bit
These libraries are located in src/main/resources/org/sqsh/jni/<platform>-<arch>.
If you want to compile your own, or your platform is not one of the ones listed
above, you can include your platform by compiling jsqsh with:
mvn -Djni=true compile
or
mvn -Djni=true package
Finally, you can adjust which kind of package is produce by the build with:
mvn -P [rpm|deb|tgz] package
When done in the above manner, you'll get files like:
target/**/jsqsh-<version>-noarch.<type>
however, if you include JNI compilation, like so:
mvn -P [rpm|deb|tgz] -Djni=true package
You'll wind up with something like
target/**/jsqsh-<version>-<arch>.<type>
JNI Code
--------
On all UNIX/POSIX platforms compiling the JNI layer _should_ be as easy
as doing:
$ cd src/jni
$ ./configure
$ ./make
after this process completes you should find the resulting shared library
in src/jni/.libs/libjsqsh.so.
For Windows, you need to have cmake installed on your system. Once installed
you should be able to do:
C:\jsqsh> cd src\jni
C:\jsqsh\src\jni> cmake -G "NMake Makefiles"
C:\jsqsh\src\jni> nmake
Note that cmake is also capable of producing a visual studio project file
if you would rather. Refer to the cmake documentation.