To build sewelis, here are the instructions:
1. clone the Git repository in some directory,
and its dependency (ocaml-lib) as a sub-directory
NOTE: we recommend to clone the last stable version, on branch 'master'.
% git clone https://bitbucket.org/sebferre/sewelis.git
% cd sewelis
% git clone https://bitbucket.org/sebferre/ocaml-lib.git
2. Compiling the project.
This assumes you have installed the OCaml compilers version 4.x (see http://caml.inria.fr/ocaml/release-prev.en.html), ocamlfind, and the following OCaml libraries:
- Core: xmlm, xml-light
- Desktop: lablgtk2
- Web server: ocamlnet, csv, cryptokit
- Web client: lwt, js_of_ocaml
We recommend to use OPAM for an easy install of all those dependencies.
2.a. Desktop version
% make sewelis
When you pull a new version, we recommend to first clean the repository
% make clean-all
% make sewelis
2.b. Client/Server version
% make server
% make client
The URL address of the server is hard-coded at the beginning of 'js-client/sewelis_api.ml'.
Change it according to where you run the server before compiling the client.
3. Running Sewelis.
3.a. Desktop version.
The main argument of 'sewelis' is the basename of the persistency files.
The default basename is 'default'.
% ./sewelis [ <basename> ]
There are three persistency files:
- <basename>.log: a text file that keeps track of all updates
- <basename>.db: a binary file that enables a quick reload
- <basename>.nt: a text file in N-Triples format for use in other semantic tools
<basename>.log is modified at each update, while other files are only modified when
the 'Save' function is activated. When reloading a Sewelis base, <basename>.db is
used for quick reload, unless it is deprecated (e.g., created by an earlier version
of Sewelis). In the latter case, <basename>.log is used to replay the whole history
of updates. The advantage of <basename>.log is that in case of mishap, it can be
corrected by hand, and reloaded from scratch.
3.b. Client/Server version.
You can run the server by specifying the port, the directory where to put data, and the base URI.
% ./sewelis-xml-server.exe -port <port> -storedir <directory-where-stores-and-users-are-recorded> -base <base-URI-for-created-entities>
4. Java dependencies.
Geometry computations are provided by the JTS Java library.
In order to make them available, it is necessary:
- to compile and run a Java-enabling version of Sewelis
% make sewelis-java
% ./sewelis-java ...
% make server-java
% ./sewelis-java-xml-server.exe ...
- to define the CLASSPATH as follows, before launching Sewelis.
% setenv CLASSPATH "camljava.jar:jts-1.8.jar"
It has no impact on the Web client.