Difference between revisions of "Devel:Installation"

From GeopsyWiki
Jump to navigation Jump to search
Line 8: Line 8:
  
 
== Initialization ==
 
== Initialization ==
 +
 +
=== admin directory ===
  
 
The list of packages is saved in a git repository called '''geopsyprojects'''. Configure it by editing ''option.sub''.
 
The list of packages is saved in a git repository called '''geopsyprojects'''. Configure it by editing ''option.sub''.
Line 19: Line 21:
 
  cd admin
 
  cd admin
  
Switch to branch "testing".
+
Switch to the desired branch ("devel" in this example).
  
  git checkout testing
+
  git checkout devel
  
Configure destination and installation paths
+
Configure destination and installation paths. Destination path is the directory where executables and libraries first go after compilation. Installation path points to the directory where files are copied during a 'make install'. Destination directory is written during any compilation ('make'), hence user permissions are required. For development, installation and destination path are usually identical and 'make install' is never run. It avoids multiple copies of the same include files and confusions while editing them (e.g. editing installed files instead of source files).
  
 
  cp options.sub.example options.sub
 
  cp options.sub.example options.sub
 
  vi options.sub
 
  vi options.sub
 +
 +
PREFIX is set be default to '/usr/local/Geopsy.org'. If this is fine, make sure that you have enough permissions. To create a new user writable directory:
 +
 +
sudo mkdir /usr/local/Geopsy.org
 +
sudo chown yourusername /usr/local/Geopsy.org
  
 
Configure the list of package to build by default.
 
Configure the list of package to build by default.
Line 33: Line 40:
 
  vi projects.default
 
  vi projects.default
 
  cd ..
 
  cd ..
 +
 +
projects.* files simply set PROJECTS environment variable. It contains a list of paths to projects (relative to the development root directory, geopsy-dev in this example). List 'user' contains the most popular applications and libraries of geopsy packages. Comment all other lists because you might not have sufficient permissions to access their git repository). List 'scripts' contains 'devpro' which bootstrap is explained here below.
 +
 +
=== devpro scripts ===
  
 
A package of multi-purpose scripts to ease coding experience. Bootstrap is a little tricky...
 
A package of multi-purpose scripts to ease coding experience. Bootstrap is a little tricky...
Line 39: Line 50:
 
  cd devpro
 
  cd devpro
  
Switch to branch "testing".
+
Switch to the same branch as above (e.g. "devel").
  
   git checkout testing
+
   git checkout devel
  
 
Bootstrap of devpro project
 
Bootstrap of devpro project
  
 
  mkdir ~/.devpro
 
  mkdir ~/.devpro
  echo "REF_QT_VERSION=4.6.3" >> ~/.devpro/info
+
  echo "REF_QT_VERSION=4.7.2" >> ~/.devpro/info
 
  $(pwd)/src/dpconfigure
 
  $(pwd)/src/dpconfigure
 
  source ../admin/options.sub
 
  source ../admin/options.sub
Line 55: Line 66:
 
Define path to geopsy-dev/bin (or other DEST_DIR if configured differently in admin/options.sub) in your PATH (e.g. ~/.bashrc).
 
Define path to geopsy-dev/bin (or other DEST_DIR if configured differently in admin/options.sub) in your PATH (e.g. ~/.bashrc).
  
  export PATH=/path/to/geopsy-dev/bin:$PATH
+
  export PATH=/usr/local/Geopsy.org/bin:$PATH
  
 
== Download all packages for a specific branch ==
 
== Download all packages for a specific branch ==

Revision as of 08:25, 6 June 2011

Development is preferably achieved under Linux. Other platforms are not documented.

Necessary 3rd party tools

A recent version of g++, gfortran, and Qt are first required. For code edition, we recommend using Qt Creator which is provided in Qt sdk.

Some packages may require additional 3rd party libraries. Refer to the usual installation instructions for details.

Initialization

admin directory

The list of packages is saved in a git repository called geopsyprojects. Configure it by editing option.sub.

There are three main branches: "devel", "testing", and "stable". Change the argument of git fetch and git checkout to select another branch. Switching to another branch afterward is possible.

mkdir geopsy-dev
cd geopsy-dev
git clone git://download.geopsy.org/geopsyprojects
mv geopsyprojects admin
cd admin

Switch to the desired branch ("devel" in this example).

git checkout devel

Configure destination and installation paths. Destination path is the directory where executables and libraries first go after compilation. Installation path points to the directory where files are copied during a 'make install'. Destination directory is written during any compilation ('make'), hence user permissions are required. For development, installation and destination path are usually identical and 'make install' is never run. It avoids multiple copies of the same include files and confusions while editing them (e.g. editing installed files instead of source files).

cp options.sub.example options.sub
vi options.sub

PREFIX is set be default to '/usr/local/Geopsy.org'. If this is fine, make sure that you have enough permissions. To create a new user writable directory:

sudo mkdir /usr/local/Geopsy.org
sudo chown yourusername /usr/local/Geopsy.org

Configure the list of package to build by default.

cp projects.default.example projects.default
vi projects.default
cd ..

projects.* files simply set PROJECTS environment variable. It contains a list of paths to projects (relative to the development root directory, geopsy-dev in this example). List 'user' contains the most popular applications and libraries of geopsy packages. Comment all other lists because you might not have sufficient permissions to access their git repository). List 'scripts' contains 'devpro' which bootstrap is explained here below.

devpro scripts

A package of multi-purpose scripts to ease coding experience. Bootstrap is a little tricky...

git clone git://download.geopsy.org/devpro
cd devpro

Switch to the same branch as above (e.g. "devel").

 git checkout devel

Bootstrap of devpro project

mkdir ~/.devpro
echo "REF_QT_VERSION=4.7.2" >> ~/.devpro/info
$(pwd)/src/dpconfigure
source ../admin/options.sub
./configure $CONFIGURE_OPTIONS
make
cd ..

Define path to geopsy-dev/bin (or other DEST_DIR if configured differently in admin/options.sub) in your PATH (e.g. ~/.bashrc).

export PATH=/usr/local/Geopsy.org/bin:$PATH

Download all packages for a specific branch

cd geopsy-dev
dpsubdo dpcheckout testing

Configure and compile

Configure packages forcing the options from admin/options.sub (option '-f').

cd geopsy-dev
dpsubconfig -f

Build the general Makefile

dpsubpro
qmake

Compile...

make debug

Qt Creator

Qt Creator does not like 3rd party and script projects included in the package list, so remove them from the global Makefile once these projects are successfully compiled.

dpsubpro -l qtpro
qmake

Start Qt creator and open geopsy-dev.pro file located in geopsy-dev.