2010-12-15 10:31:42 +01:00
|
|
|
Hacking
|
|
|
|
|
=======
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
This is a guide about how to start hacking on *LibrePlan* project.
|
|
|
|
|
If you want more information about *LibrePlan* development you should visit the wiki
|
2019-11-02 12:18:02 +01:00
|
|
|
available at: https://wiki.libreplan.dev/.
|
2010-12-15 10:31:42 +01:00
|
|
|
|
2011-06-15 10:43:40 +02:00
|
|
|
.. contents::
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compilation requirements
|
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
|
|
* *Git* - Version Control System
|
|
|
|
|
|
|
|
|
|
Needed to clone source code repository
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
* *Maven 3* - Java software project management and comprehension tool
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
Needed to build and compile the project
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
* *JDK 8* - Java Development Kit
|
2011-06-15 10:43:40 +02:00
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
Project depends on Java 8 and JDK is needed in order to compile it
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* *PostgreSQL* - Object-relational SQL database
|
|
|
|
|
|
|
|
|
|
Database server
|
|
|
|
|
|
2016-05-06 13:01:38 +03:00
|
|
|
* *MySQL* - Relational SQL database
|
|
|
|
|
|
|
|
|
|
Alternative database server
|
|
|
|
|
|
2011-06-15 10:43:40 +02:00
|
|
|
* *Python Docutils* - Utilities for the documentation of Python modules
|
|
|
|
|
|
|
|
|
|
Used to generate HTMLs help files from RST files (reStructuredText)
|
|
|
|
|
|
|
|
|
|
* *Make* - An utility for Directing compilation
|
|
|
|
|
|
|
|
|
|
Needed to compile the help
|
|
|
|
|
|
|
|
|
|
* *gettext* - GNU Internationalization utilities
|
|
|
|
|
|
|
|
|
|
Used for i18n support in the project
|
|
|
|
|
|
|
|
|
|
* *CutyCapt* - Utility to capture WebKit's rendering of a web page
|
|
|
|
|
|
|
|
|
|
Required for printing
|
|
|
|
|
|
|
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
LibrePlan compilation
|
2011-06-15 10:43:40 +02:00
|
|
|
---------------------
|
|
|
|
|
|
|
|
|
|
Debian/Ubuntu
|
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
* Install requirements::
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
# apt-get install git-core maven openjdk-8-jdk postgresql postgresql-client python-docutils make gettext cutycapt
|
2011-06-15 10:43:40 +02:00
|
|
|
|
2021-09-28 23:54:46 +02:00
|
|
|
* Set default OpenJDK version (required for Ubuntu 18.04, 20.04 and newer)::
|
|
|
|
|
|
|
|
|
|
# update-java-alternatives -s java-1.8.0-openjdk-amd64
|
|
|
|
|
|
2011-06-15 10:43:40 +02:00
|
|
|
* Connect to database::
|
|
|
|
|
|
|
|
|
|
# su postgres -c psql
|
|
|
|
|
|
|
|
|
|
* Use SQL sentences::
|
|
|
|
|
|
2011-11-25 10:40:34 +01:00
|
|
|
CREATE DATABASE libreplandev;
|
|
|
|
|
CREATE DATABASE libreplandevtest;
|
|
|
|
|
CREATE USER libreplan WITH PASSWORD 'libreplan';
|
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE libreplandev TO libreplan;
|
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE libreplandevtest TO libreplan;
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Download source code::
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
$ git clone git://github.com/LibrePlan/libreplan.git
|
2011-06-15 10:43:40 +02:00
|
|
|
|
2021-09-28 23:54:46 +02:00
|
|
|
* Compile project while skipping tests (since they currently do not work at least on Ubuntu 18.04, 20.04 and newer)::
|
2011-06-15 10:43:40 +02:00
|
|
|
|
2011-12-22 22:05:02 +01:00
|
|
|
$ cd libreplan/
|
2021-09-28 23:54:46 +02:00
|
|
|
$ mvn -DskipTests clean install
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Launch application::
|
|
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
$ cd libreplan-webapp/
|
2011-06-15 10:43:40 +02:00
|
|
|
$ mvn jetty:run
|
|
|
|
|
|
2021-09-28 23:54:46 +02:00
|
|
|
* Alternatively start application as systemd service::
|
|
|
|
|
|
|
|
|
|
$ nano /lib/systemd/system/libreplan.service
|
|
|
|
|
[Unit]
|
|
|
|
|
Description=libreplan
|
|
|
|
|
After=network.target
|
|
|
|
|
Wants=network.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=simple
|
|
|
|
|
WorkingDirectory=/root/libreplan/libreplan-webapp
|
|
|
|
|
ExecStart=/usr/bin/mvn jetty:run
|
|
|
|
|
Restart=always
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
|
|
|
|
|
$ systemctl daemon-reload
|
|
|
|
|
$ systemctl enable libreplan.service
|
|
|
|
|
$ systemctl start libreplan.service
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
* Go to http://localhost:8080/
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
Fedora
|
|
|
|
|
~~~~~~
|
|
|
|
|
|
|
|
|
|
* Install requirements::
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
# yum install git maven java-1.8.0-openjdk-devel postgresql postgresql-server python-docutils make gettext gnu-free-fonts-compat
|
2012-11-08 13:17:55 +01:00
|
|
|
|
|
|
|
|
.. WARNING:: Use the following command in Fedora 16 or below::
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
# yum install git maven java-1.8.0-openjdk postgresql postgresql-server python-docutils make gettext gnu-free-fonts-compat
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Start database service::
|
|
|
|
|
|
2012-11-08 13:17:55 +01:00
|
|
|
# su - postgres -c "PGDATA=/var/lib/pgsql/data initdb"
|
|
|
|
|
# systemctl start postgresql.service
|
|
|
|
|
|
|
|
|
|
.. WARNING:: Use the following commands in Fedora 16 or below::
|
|
|
|
|
|
|
|
|
|
# service postgresql initdb
|
|
|
|
|
# service postgresql start
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Connect to database::
|
|
|
|
|
|
|
|
|
|
# su postgres -c psql
|
|
|
|
|
|
|
|
|
|
* Use SQL sentences::
|
|
|
|
|
|
2011-11-25 10:40:34 +01:00
|
|
|
CREATE DATABASE libreplandev;
|
|
|
|
|
CREATE DATABASE libreplandevtest;
|
|
|
|
|
CREATE USER libreplan WITH PASSWORD 'libreplan';
|
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE libreplandev TO libreplan;
|
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE libreplandevtest TO libreplan;
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Set ``postgres`` user password::
|
|
|
|
|
|
|
|
|
|
ALTER USER postgres WITH PASSWORD 'postgres';
|
|
|
|
|
|
2012-11-08 13:17:55 +01:00
|
|
|
.. WARNING:: These steps are only for Fedora 16 and below:
|
|
|
|
|
|
|
|
|
|
* Edit ``/var/lib/pgsql/data/pg_hba.conf`` and replace ``ident`` by ``md5``
|
2011-06-15 10:43:40 +02:00
|
|
|
|
2012-11-08 13:17:55 +01:00
|
|
|
* Reload database configuration::
|
2011-06-15 10:43:40 +02:00
|
|
|
|
2012-11-08 13:17:55 +01:00
|
|
|
# service postgresql reload
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Download source code::
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
$ git clone git://github.com/LibrePlan/libreplan.git
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Compile project::
|
|
|
|
|
|
2011-12-22 22:05:02 +01:00
|
|
|
$ cd libreplan/
|
2011-06-15 10:43:40 +02:00
|
|
|
$ mvn clean install
|
|
|
|
|
|
|
|
|
|
* Launch application::
|
|
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
$ cd libreplan-webapp/
|
2011-06-15 10:43:40 +02:00
|
|
|
$ mvn jetty:run
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
* Go to http://localhost:8080/
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
openSUSE
|
|
|
|
|
~~~~~~~~
|
|
|
|
|
|
|
|
|
|
* Install requirements::
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
# zypper install git-core java-1_8_0-openjdk-devel postgresql-server postgresql docutils make gettext-tools
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Install Maven::
|
|
|
|
|
|
|
|
|
|
# cd /opt/
|
2016-11-15 11:13:21 +02:00
|
|
|
# wget http://www.apache.org/dist//maven/binaries/apache-maven-3.0.5-bin.tar.gz
|
|
|
|
|
# tar -xzvf apache-maven-3.0.5-bin.tar.gz
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
Edit ``/etc/bash.bashrc.local`` and add the following lines::
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
export M2_HOME=/opt/apache-maven-3.0.5
|
|
|
|
|
export MVN=$M2_HOME/bin
|
|
|
|
|
export PATH=$MVN:$PATH
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Start database service::
|
|
|
|
|
|
|
|
|
|
# /etc/init.d/postgresql start
|
|
|
|
|
|
|
|
|
|
* Connect to database::
|
|
|
|
|
|
|
|
|
|
# su postgres -c psql
|
|
|
|
|
|
|
|
|
|
* Use SQL sentences::
|
|
|
|
|
|
2011-11-25 10:40:34 +01:00
|
|
|
CREATE DATABASE libreplandev;
|
|
|
|
|
CREATE DATABASE libreplandevtest;
|
|
|
|
|
CREATE USER libreplan WITH PASSWORD 'libreplan';
|
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE libreplandev TO libreplan;
|
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE libreplandevtest TO libreplan;
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Set ``postgres`` user password::
|
|
|
|
|
|
|
|
|
|
ALTER USER postgres WITH PASSWORD 'postgres';
|
|
|
|
|
|
|
|
|
|
* Edit ``/var/lib/pgsql/data/pg_hba.conf`` and replace ``ident`` by ``md5``
|
|
|
|
|
|
|
|
|
|
* Restart database service::
|
|
|
|
|
|
|
|
|
|
# /etc/init.d/postgresql restart
|
|
|
|
|
|
|
|
|
|
* Download source code::
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
$ git clone git://github.com/LibrePlan/libreplan.git
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Compile project::
|
|
|
|
|
|
2011-12-22 22:05:02 +01:00
|
|
|
$ cd libreplan/
|
2011-06-15 10:43:40 +02:00
|
|
|
$ mvn clean install
|
|
|
|
|
|
|
|
|
|
* Launch application::
|
|
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
$ cd libreplan-webapp/
|
2011-06-15 10:43:40 +02:00
|
|
|
$ mvn jetty:run
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
* Go to http://localhost:8080/
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
|
2015-10-10 10:23:12 +02:00
|
|
|
Microsoft Windows
|
2016-11-15 11:13:21 +02:00
|
|
|
~~~~~~~~~~~~~~~~~
|
2015-10-10 10:23:12 +02:00
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
* Download and install latest Java Development Kit 8uXX (JDK8uXX)::
|
2015-10-10 10:23:12 +02:00
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
# http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
|
2015-10-10 10:23:12 +02:00
|
|
|
|
2016-12-16 16:56:21 +02:00
|
|
|
* Download and install latest Gettext runtime::
|
|
|
|
|
|
|
|
|
|
# https://mlocati.github.io/articles/gettext-iconv-windows.html
|
|
|
|
|
|
|
|
|
|
* Add Gettext_installed_directory\bin (for example ``C:\Program Files\gettext-iconv\bin``) to ``Path`` variable
|
|
|
|
|
|
2015-10-10 10:23:12 +02:00
|
|
|
* Download and install latest PostgreSQL database::
|
|
|
|
|
|
|
|
|
|
# http://www.enterprisedb.com/products-services-training/pgdownload#windows
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
* Download and install Apache Tomcat 8::
|
2015-10-10 10:23:12 +02:00
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
# http://tomcat.apache.org/download-80.cgi
|
2015-10-10 10:23:12 +02:00
|
|
|
# Note: in JDK folder there is JRE folder
|
|
|
|
|
|
|
|
|
|
* Set up JDBC41 PostgreSQL Driver::
|
|
|
|
|
|
|
|
|
|
# Download latest driver: https://jdbc.postgresql.org/download.html
|
2016-11-15 11:13:21 +02:00
|
|
|
# Copy downloaded *.jar file to JRE location: (e.g. C:\Program Files\Java\jre8\lib\ext)
|
|
|
|
|
# Copy downloaded *.jar file to JAVA_HOME location: (e.g. C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext)
|
|
|
|
|
# Put downloaded *.jar file to Tomcat lib location: (e.g. C:\Program Files\Apache Software Foundation\Tomcat 8.0\lib)
|
2015-10-10 10:23:12 +02:00
|
|
|
|
|
|
|
|
* Create database::
|
|
|
|
|
|
|
|
|
|
CREATE DATABASE libreplan;
|
|
|
|
|
|
|
|
|
|
* Use SQL sentences::
|
|
|
|
|
|
|
|
|
|
CREATE USER libreplan WITH PASSWORD 'libreplan';
|
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE libreplan TO libreplan;
|
2015-10-06 18:00:43 +03:00
|
|
|
* Download and install Git
|
|
|
|
|
|
|
|
|
|
# https://git-scm.com/download/win
|
|
|
|
|
|
|
|
|
|
* Download Maven
|
|
|
|
|
|
|
|
|
|
# https://maven.apache.org/download.cgi
|
|
|
|
|
|
|
|
|
|
.. WARNING::
|
|
|
|
|
|
|
|
|
|
Check if latest Maven version is compatible with your JDK
|
|
|
|
|
|
|
|
|
|
* Connect to database::
|
2015-10-10 10:23:12 +02:00
|
|
|
|
2015-10-06 18:00:43 +03:00
|
|
|
# Go to PostgreSQL bin folder and command window from here
|
|
|
|
|
# psql -U postgres
|
|
|
|
|
|
|
|
|
|
* Use SQL sentences::
|
|
|
|
|
|
|
|
|
|
CREATE DATABASE libreplandev;
|
|
|
|
|
CREATE DATABASE libreplandevtest;
|
|
|
|
|
|
|
|
|
|
CREATE USER libreplan WITH PASSWORD 'libreplan';
|
|
|
|
|
|
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE libreplan TO libreplan;
|
2015-10-10 10:23:12 +02:00
|
|
|
|
|
|
|
|
* Create an Environment Variable JAVA_HOME
|
|
|
|
|
|
|
|
|
|
# You need to set it to your JDK installed directory
|
|
|
|
|
|
|
|
|
|
* Configure Apache Tomcat Server
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
* Go to (e.g. C:/Program Files/Apache Software Foundation/Tomcat 8.0/conf/Catalina/localhost/)
|
2016-04-01 15:52:19 +03:00
|
|
|
and create there libreplan.xml file with this lines of code::
|
2015-10-10 10:23:12 +02:00
|
|
|
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
|
|
<Context antiJARLocking="true" path="">
|
|
|
|
|
<Resource name="jdbc/libreplan-ds" auth="Container"
|
|
|
|
|
type="javax.sql.DataSource"
|
|
|
|
|
maxActive="100" maxIdle="30" maxWait="10000"
|
|
|
|
|
username="libreplan" password="libreplan"
|
|
|
|
|
driverClassName="org.postgresql.Driver"
|
|
|
|
|
url="jdbc:postgresql://localhost/libreplan" />
|
|
|
|
|
</Context>
|
|
|
|
|
|
2015-12-01 11:45:19 +01:00
|
|
|
=======
|
2015-10-06 18:00:43 +03:00
|
|
|
|
|
|
|
|
* Download source code::
|
|
|
|
|
|
|
|
|
|
# Open GitBash
|
|
|
|
|
# git clone https://github.com/LibrePlan/libreplan.git
|
|
|
|
|
|
|
|
|
|
* Set JAVA_HOME environment variable::
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
# You need to set it to your JDK installed directory (e.g. C:\Program Files\Java\jdk1.8.0_111)
|
2015-10-06 18:00:43 +03:00
|
|
|
|
2016-04-01 15:52:19 +03:00
|
|
|
* Add path of unpacked distributions bin directory of Maven to 'Path' environment variable
|
2015-10-06 18:00:43 +03:00
|
|
|
|
2016-04-01 15:52:19 +03:00
|
|
|
# (e.g. C:/Program Files/apache-maven-3.3.3/bin)
|
2015-10-06 18:00:43 +03:00
|
|
|
|
|
|
|
|
* Compile project::
|
|
|
|
|
|
|
|
|
|
# cd libreplan
|
|
|
|
|
# mvn clean install
|
|
|
|
|
|
|
|
|
|
* Launch application::
|
|
|
|
|
|
2015-12-22 17:51:39 +02:00
|
|
|
* Get *.war file from project folder (e.g ../libreplan/libreplan-webapp/target/libreplan-webapp.war)
|
|
|
|
|
* Rename it to libreplan.war
|
2016-11-15 11:13:21 +02:00
|
|
|
* Put your libreplan.war file to Apache Tomcat webapps folder (e.g. C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\)
|
2015-12-22 17:51:39 +02:00
|
|
|
* Start Apache Tomcat server
|
|
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
# Possible location: C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin\Tomcat8.exe
|
2015-10-06 18:00:43 +03:00
|
|
|
|
2016-11-15 11:13:21 +02:00
|
|
|
* Go to http://localhost:8080/
|
2015-10-10 10:23:12 +02:00
|
|
|
|
|
|
|
|
|
2011-06-15 10:43:40 +02:00
|
|
|
CutyCapt compilation
|
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
|
|
Like *CutyCapt* is not packaged for all distributions here are the instructions.
|
|
|
|
|
|
|
|
|
|
Ubuntu/Debian
|
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
* Install requirements::
|
|
|
|
|
|
|
|
|
|
# apt-get install subversion libqt4-dev libqtwebkit-dev qt4-qmake g++ make
|
|
|
|
|
|
|
|
|
|
In Ubuntu Lucid 10.04 remove ``libqtwebkit-dev`` package.
|
|
|
|
|
|
2016-10-07 11:33:24 +03:00
|
|
|
* Install::
|
|
|
|
|
|
|
|
|
|
# apt-get install cutycapt
|
|
|
|
|
|
|
|
|
|
If it doesn't work. Try to do it:
|
|
|
|
|
|
2011-06-15 10:43:40 +02:00
|
|
|
* Download source code::
|
|
|
|
|
|
|
|
|
|
$ svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt cutycapt
|
|
|
|
|
|
|
|
|
|
* Compile::
|
|
|
|
|
|
|
|
|
|
$ cd CutyCapt
|
|
|
|
|
$ qmake CutyCapt.pro
|
|
|
|
|
$ make
|
|
|
|
|
|
|
|
|
|
* Install::
|
|
|
|
|
|
2011-06-30 08:01:20 +02:00
|
|
|
# cp CutyCapt /user/bin/cutycapt
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
Fedora
|
|
|
|
|
~~~~~~
|
|
|
|
|
|
|
|
|
|
* Install requirements::
|
|
|
|
|
|
|
|
|
|
# yum install subversion qt-devel qt-webkit-devel gcc-c++ make
|
|
|
|
|
|
|
|
|
|
* Download source code::
|
|
|
|
|
|
|
|
|
|
$ svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt cutycapt
|
|
|
|
|
|
|
|
|
|
* Compile::
|
|
|
|
|
|
|
|
|
|
$ cd cutycapt/CutyCapt
|
|
|
|
|
$ qmake-qt4 CutyCapt.pro
|
|
|
|
|
$ make
|
|
|
|
|
|
|
|
|
|
* Install::
|
|
|
|
|
|
2011-06-30 08:01:20 +02:00
|
|
|
# cp CutyCapt /user/bin/cutycapt
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
openSUSE
|
|
|
|
|
~~~~~~~~
|
|
|
|
|
|
|
|
|
|
* Install requirements::
|
|
|
|
|
|
|
|
|
|
# zypper install subversion libqt4-devel libQtWebKit-devel gcc-c++ make
|
|
|
|
|
|
|
|
|
|
* Download source code::
|
|
|
|
|
|
|
|
|
|
$ svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt cutycapt
|
|
|
|
|
|
|
|
|
|
* Compile::
|
|
|
|
|
|
|
|
|
|
$ cd cutycapt/CutyCapt
|
|
|
|
|
$ qmake-qt4 CutyCapt.pro
|
|
|
|
|
$ make
|
|
|
|
|
|
|
|
|
|
* Install::
|
|
|
|
|
|
2011-06-30 08:01:20 +02:00
|
|
|
# cp CutyCapt /user/bin/cutycapt
|
2011-06-15 10:43:40 +02:00
|
|
|
|
2013-11-27 19:14:20 +01:00
|
|
|
LibrePlan documentation generation
|
|
|
|
|
----------------------------------
|
|
|
|
|
|
|
|
|
|
In the doc/src folder you'll find several types of documentation
|
2016-11-15 11:13:21 +02:00
|
|
|
available: technical documentation, user manual, some training documentation and training exercises.
|
|
|
|
|
This documentation is available in several languages.
|
2013-11-27 19:14:20 +01:00
|
|
|
|
|
|
|
|
The supported outputs are HTML and PDF.
|
|
|
|
|
|
|
|
|
|
Debian/Ubuntu
|
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
* Install requirements if generating HTML::
|
|
|
|
|
|
|
|
|
|
# apt-get install make python-docutils
|
|
|
|
|
|
|
|
|
|
* Install requirements if generating PDF::
|
|
|
|
|
|
|
|
|
|
# apt-get install make python-docutils texlive-latex-base texlive-latex-recommended texlive-latex-extra textlive-fonts-recommended
|
|
|
|
|
|
2016-10-07 11:33:24 +03:00
|
|
|
* Go to the directory where the documentation you want to generate is.
|
|
|
|
|
For example, if you want to generate the user manual in English::
|
2013-11-27 19:14:20 +01:00
|
|
|
|
|
|
|
|
# cd doc/src/user/en
|
|
|
|
|
|
|
|
|
|
* Generate HTML::
|
|
|
|
|
|
|
|
|
|
# make html
|
|
|
|
|
|
|
|
|
|
* Generate PDF::
|
|
|
|
|
|
|
|
|
|
# make pdf
|
|
|
|
|
|
|
|
|
|
* Generate both formats::
|
|
|
|
|
|
|
|
|
|
# make
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
Compilation profiles
|
|
|
|
|
--------------------
|
|
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
There are different compilation profiles in *LibrePlan*. Check ``<profiles>``
|
2011-06-15 10:43:40 +02:00
|
|
|
section in root ``pom.xml`` to see the different profiles (there are also some
|
|
|
|
|
profiles defined in ``pom.xml`` of business and webapp modules).
|
|
|
|
|
|
|
|
|
|
* *dev* - Development environment (default)
|
|
|
|
|
|
2011-11-25 10:40:34 +01:00
|
|
|
It uses databases ``libreplandev`` and ``libreplandevtest``.
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* *prod* - Production environment
|
|
|
|
|
|
2011-11-25 10:40:34 +01:00
|
|
|
Unlike *dev* it uses database ``libreplanprod`` and `libreplanprodtest``.
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
It is needed to use it in combination with *postgresql* or *mysql* profiles.
|
|
|
|
|
|
|
|
|
|
This is usually used while testing the stable branch in the repository. This
|
|
|
|
|
allows developers to easily manage 2 different databases one for last
|
|
|
|
|
development in master branch and another for bugfixing over stable branch.
|
|
|
|
|
|
|
|
|
|
* *postgresql* - PostgreSQL database (default)
|
|
|
|
|
|
|
|
|
|
It uses PostgreSQL database server getting database names from *dev* or *prod*
|
|
|
|
|
profiles.
|
|
|
|
|
|
|
|
|
|
* *mysql* - MySQL database
|
|
|
|
|
|
|
|
|
|
It uses MySQL database server getting database names from *dev* or *prod*
|
|
|
|
|
profiles.
|
|
|
|
|
|
|
|
|
|
* *reports* - JasperReports (default)
|
|
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
If it is active *LibrePlan* reports are compiled.
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
It is useful to disable this profile to save compilation time during
|
|
|
|
|
development.
|
|
|
|
|
|
|
|
|
|
* *userguide* - User documentation (default)
|
|
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
If it is active *LibrePlan* help is compiled and HTML files are generated.
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
User documentation is written in *reStructuredText* and it is generated
|
|
|
|
|
automatically thanks to this profile.
|
|
|
|
|
|
|
|
|
|
Like for *reports*, it is useful deactivate this profile during development
|
|
|
|
|
to save compilation time.
|
|
|
|
|
|
|
|
|
|
* *liquibase-update* - Liquibase update (default)
|
|
|
|
|
|
|
|
|
|
If it is active Liquibase changes are applied in the database.
|
|
|
|
|
|
|
|
|
|
* *liquibase-updatesql* - Liquibase update SQL
|
|
|
|
|
|
|
|
|
|
If it is active it is generated a file with SQL sentences for Liquibase
|
|
|
|
|
changes needed to apply on database.
|
|
|
|
|
|
|
|
|
|
This is used to generate upgrade files in releases.
|
|
|
|
|
|
2012-03-14 17:21:23 +01:00
|
|
|
* *i18n* - Internationalization (default)
|
|
|
|
|
|
|
|
|
|
It uses gettext to process language files in order to be used in *LibrePlan*.
|
|
|
|
|
|
|
|
|
|
Like for *reports* and *userguide*, it is useful deactivate this profile
|
|
|
|
|
during development to save compilation time.
|
|
|
|
|
|
2011-06-15 10:43:40 +02:00
|
|
|
How to use profiles
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
Profiles active by default are used always if not deactivated. In order to
|
|
|
|
|
activate or deactivate a profile you should use parameter ``-P`` for Maven
|
|
|
|
|
command. For example:
|
|
|
|
|
|
2012-03-14 17:21:23 +01:00
|
|
|
* Deactivate *reports*, *userguide* and *i18n* to save compilation time::
|
2011-06-15 10:43:40 +02:00
|
|
|
|
2012-03-14 17:21:23 +01:00
|
|
|
mvn -P-reports,-userguide,-i18n clean install
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Use production environment::
|
|
|
|
|
|
|
|
|
|
mvn -Pprod,postgresql clean install
|
|
|
|
|
|
|
|
|
|
|
2012-04-13 16:17:14 +02:00
|
|
|
Compilation options
|
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
|
|
In LibrePlan there are two custom Maven properties, which allow you to configure
|
|
|
|
|
some small bits in the project.
|
|
|
|
|
|
|
|
|
|
* *default.passwordsControl* - Warning about default passwords (``true`` by
|
|
|
|
|
default)
|
|
|
|
|
|
|
|
|
|
If this option is enabled, a warning is show in LibrePlan footer to
|
|
|
|
|
application administrators in order to change the default password (which
|
|
|
|
|
matches with user login) for the users created by default: admin, user,
|
|
|
|
|
wsreader and wswriter.
|
|
|
|
|
|
|
|
|
|
* *default.exampleUsersDisabled* - Disable default users (``true`` by default)
|
|
|
|
|
|
|
|
|
|
If true, example default users such as user, wsreader and wswriter are
|
|
|
|
|
disabled. This is a good option for production environments.
|
|
|
|
|
|
|
|
|
|
This option is set to ``false`` if you are using the development profile (the
|
|
|
|
|
default one).
|
|
|
|
|
|
|
|
|
|
How to set compilation options
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
Maven properties have a default value, but you can change it using the parameter
|
|
|
|
|
``-D`` for Maven command to set the value of each option you want to modify. For
|
|
|
|
|
example:
|
|
|
|
|
|
|
|
|
|
* Set *default.passwordsControl* to ``false``::
|
|
|
|
|
|
|
|
|
|
mvn -Ddefault.passwordsControl=false clean install
|
|
|
|
|
|
|
|
|
|
* Set *default.passwordsControl* and *default.exampleUsersDisabled* to false::
|
|
|
|
|
|
|
|
|
|
mvn -Ddefault.passwordsControl=false -Ddefault.exampleUsersDisabled=false clean install
|
|
|
|
|
|
2015-11-11 15:45:24 +02:00
|
|
|
* Set *default.emailSendingEnabled* to false::
|
2015-11-10 11:56:42 +02:00
|
|
|
|
2015-11-11 15:45:24 +02:00
|
|
|
mvn -Ddefault.emailSendingEnabled=false clean install
|
2012-04-13 16:17:14 +02:00
|
|
|
|
2011-06-15 10:43:40 +02:00
|
|
|
Tests
|
|
|
|
|
-----
|
|
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
*LibrePlan* has a lot of JUnit test that by default are passed when you compile
|
2011-06-15 10:43:40 +02:00
|
|
|
the project with Maven. You can use ``-DskipTests`` to avoid tests are passed
|
|
|
|
|
always. Anyway, you should check that tests are not broken before sending or
|
|
|
|
|
pushing a patch.
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
mvn -DskipTests clean install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MySQL
|
|
|
|
|
-----
|
2016-05-06 13:01:38 +03:00
|
|
|
Strongly preferred to use 5.6+ version
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
For MySQL users here are specific instructions.
|
|
|
|
|
|
|
|
|
|
* SQL sentences to create database::
|
|
|
|
|
|
2011-11-25 10:40:34 +01:00
|
|
|
CREATE DATABASE libreplandev;
|
|
|
|
|
CREATE DATABASE libreplandevtest;
|
2016-05-06 13:01:38 +03:00
|
|
|
CREATE USER 'libreplan'@'localhost' IDENTIFIED BY 'libreplan';
|
|
|
|
|
GRANT ALL PRIVILEGES ON libreplandev.* TO 'libreplan'@'localhost' WITH GRANT OPTION;
|
|
|
|
|
GRANT ALL PRIVILEGES ON libreplandevtest.* TO 'libreplan'@'localhost' WITH GRANT OPTION;
|
2011-06-15 10:43:40 +02:00
|
|
|
|
|
|
|
|
* Compile project::
|
|
|
|
|
|
|
|
|
|
$ mvn -Pdev,mysql clean install
|
|
|
|
|
|
|
|
|
|
* Launch application::
|
|
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
$ cd libreplan-webapp/
|
2011-06-15 10:43:40 +02:00
|
|
|
$ mvn -Pdev,mysql jetty:run
|
2018-04-03 12:04:30 +03:00
|
|
|
|
|
|
|
|
* Go to http://localhost:8080/libreplan-webapp/
|