Setup of Development environment: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
== Required software ==
== Windows Development environment ==
=== Windows Development environment ===
=== Required software ===
* Git (see also some [[Notes about Git]])
* Git (see also some [[Notes about Git]]); recommended: TortoiseGit
* Microsoft .Net 3.5 Redistributable and SDK (we only use .Net 2.0 for OpenPetra, but SharpDevelop requires .Net 3.5)
* Microsoft .Net 3.5 Redistributable and SDK (we only use .Net 2.0 for OpenPetra, but SharpDevelop requires .Net 3.5)
* SharpDevelop 3.0
* SharpDevelop 3.0
Line 13: Line 13:
* Inno Setup 5 for building setup files
* Inno Setup 5 for building setup files


=== Linux Development environment ===
== Linux Development environment ==
=== Install required software ===
Please add information for other distributions that you are working with!
Please add information for other distributions that you are working with!
==== Git ====
==== Git ====
Line 35: Line 36:
* the latest release should also provide a download of the source files, see [https://sourceforge.net/project/showfiles.php?group_id=260632&package_id=320122 Download section]
* the latest release should also provide a download of the source files, see [https://sourceforge.net/project/showfiles.php?group_id=260632&package_id=320122 Download section]


=== Git with write permission ===
* See the extra page for [[Git with write permission]]
Please understand that we will provide write permissions only to the core members of the development team, just to keep the project on one track. We very much need your contributions though, and we will aim to quickly deal with submitted patches and code via the forum. This still has to be worked out how this works best to submit code that way.


Create an empty repository like this, and create a disk drive on that directory (this is useful if you want exactly the same setup as everybody else; you can choose the part of c:\OpenPetra yourself, but U:\ will always be the same; alternatively see below how to change the OpenPetra.build file)
=== Configuration of Windows Development Environment ===
  mkdir c:\OpenPetra
The recommended way of installing OpenPetra.org for development is to somewhere map a network drive, using the DOS command <code> subst</code>
  subst u: c:\OpenPetra


Make a local copy of the git repository (these are the commands for Git Bash; TortoiseGit also works fine for me):
For example:
cd u:
mkdir c:\development
  mkdir OpenPetra
subst u: c:\development
  cd OpenPetra
download the git repository into u:\OpenPetra (it contains the .git directory, and the OpenPetra.build: U:\OpenPetra\OpenPetra.build, etc)
  git clone ssh://USERNAME@openpetraorg.git.sourceforge.net/gitroot/openpetraorg
 
  git config user.name "YOUR NAME"
* you need to make a copy of the file OpenPetra.build-sample-windows.config and call it OpenPetra.build.config
  git config user.email "USERNAME@users.sourceforge.net"
  copy OpenPetra.build-sample-windows.config OpenPetra.build.config
 
=== Configuration of Linux Development Environment ===
  cd ~
  git clone git://openpetraorg.git.sourceforge.net/gitroot/openpetraorg
  cd openpetraorg
  cp OpenPetra.build-sample-linux.config OpenPetra.build.config


== Build the code ==
== NAnt ==
* there is a central NAnt script that is able to generate a lot of code and is able to do all automated tasks in the OpenPetra project.
There is a central NAnt script that is able to generate a lot of code and is able to do all automated tasks in the OpenPetra project.
* you need to make a copy of the file OpenPetra.build-sample.config and call it OpenPetra.build.config
copy OpenPetra.build-sample.config OpenPetra.build.config
** you might need to either change the directory paths, or alternatively you can create a virtual U: drive on the command line:
subst u: "c:\my files\unzippedOpenPetra"


=== get help ===
=== get help ===
Line 89: Line 90:
  nant stopPetraServer
  nant stopPetraServer


=== todo ===
Generate the translation files:
* generate files for translation (gettext, Poedit)
nant translation

Revision as of 16:30, 18 June 2009

Windows Development environment

Required software

  • Git (see also some Notes about Git); recommended: TortoiseGit
  • Microsoft .Net 3.5 Redistributable and SDK (we only use .Net 2.0 for OpenPetra, but SharpDevelop requires .Net 3.5)
  • SharpDevelop 3.0
  • NAnt (see also some Notes about NAnt)
  • one of the following Database Management systems:
  • Poedit (for translation) (see also Notes about I18N)
  • Mono (for translation)
  • Inno Setup 5 for building setup files

Linux Development environment

Install required software

Please add information for other distributions that you are working with!

Git

  • on Ubuntu/Debian: apt-get install git-core

MonoDevelop 2.x

  • on Ubuntu/Debian: apt-get install mono-2.0-runtime monodevelop

NAnt

  • on Ubuntu/Debian: apt-get install nant
    • Problem: NAnt 0.85 (Build 0.85.2478.0; release; 10/14/2006) does not seem to support the task "solution" on Linux? Invalid element <solution>. Unknown task or datatype.
    • Solution: copy binary zip from sourceforge, unzip, and change /usr/bin/nant to point at the latest NAnt.exe
    • Also you need to make a symbolic link:
ln -s /usr/lib/mono/2.0/Microsoft.CSharp.targets /usr/lib/mono/2.0/Microsoft.CSharp.Targets

SQLite or PostgreSQL

  • on Ubuntu/Debian: apt-get install sqlite3; or apt-get install postgresql

Get the source code

The source code is managed with Git. You can get the source code in several ways:

Configuration of Windows Development Environment

The recommended way of installing OpenPetra.org for development is to somewhere map a network drive, using the DOS command subst

For example:

mkdir c:\development
subst u: c:\development
download the git repository into u:\OpenPetra (it contains the .git directory, and the OpenPetra.build: U:\OpenPetra\OpenPetra.build, etc)
  • you need to make a copy of the file OpenPetra.build-sample-windows.config and call it OpenPetra.build.config
copy OpenPetra.build-sample-windows.config OpenPetra.build.config

Configuration of Linux Development Environment

cd ~
git clone git://openpetraorg.git.sourceforge.net/gitroot/openpetraorg
cd openpetraorg
cp OpenPetra.build-sample-linux.config OpenPetra.build.config

NAnt

There is a central NAnt script that is able to generate a lot of code and is able to do all automated tasks in the OpenPetra project.

get help

To see the available commands, just run on the command line:

cd OpenPetra
nant help

initial steps

First you need to compile the PetraTools which is a set of programs for creating databases and more:

nant compileCommon
nant compilePetraTools

Now you need to create a database. If you don't change the config file, the SQLite database system will be used.

nant recreateDatabase

Then you want to load the database with base data:

nant resetDatabase

You should compile OpenPetra.org this way:

nant compilePetra

Start the OpenPetra.org Server:

nant startPetraServer

Start the OpenPetra.org client:

nant startPetraClient

With the base database, there is the user demo with password demo that you can use to login to your installation of OpenPetra.org.

See Preview: Current functionality for information what is actually working already.

Stop the OpenPetra.org Server:

nant stopPetraServer

Generate the translation files:

nant translation