Setup of Development environment: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
m (1 revision)
 
Line 13: Line 13:


== Get the source code ==
== Get the source code ==
* TODO: get nightly archive
The source code is managed with Git. You can get the source code in several ways:
* TODO: anonymous git pull
* see the [https://sourceforge.net/scm/?type=git&group_id=260632 Git instructions at Sourceforge]
** that page describes how you can download anonymously from Git
* you can also browse the [http://openpetraorg.git.sourceforge.net/git/gitweb.cgi?p=openpetraorg Git repository online], and you can download a tar.gz snapshot there
* 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 ===
=== Git with write permission ===
Line 21: Line 24:
   subst u: c:\OpenPetra
   subst u: c:\OpenPetra


Make a local copy of the git repository (these are the commands for Git Bash):
Make a local copy of the git repository (these are the commands for Git Bash; TortoiseGit also works fine for me):
  cd u:
  cd u:
  TODO: git clone ssh://USERNAME@git.openpetra.org/home/openpetra/previewPetra
  mkdir OpenPetra
cd OpenPetra
git clone ssh://USERNAME@openpetraorg.git.sourceforge.net/gitroot/openpetraorg
  git config user.name "YOUR NAME"
  git config user.name "YOUR NAME"
  git config user.email "USERNAME@openpetra.org"
  git config user.email "USERNAME@users.sourceforge.net"


== Build the code ==
== Build the code ==

Revision as of 06:03, 31 May 2009

Required software

Get the source code

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

Git with write permission

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)

 mkdir c:\OpenPetra
 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):

cd u:
mkdir OpenPetra
cd OpenPetra
git clone ssh://USERNAME@openpetraorg.git.sourceforge.net/gitroot/openpetraorg
git config user.name "YOUR NAME"
git config user.email "USERNAME@users.sourceforge.net"

Build the code

  • 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
    • 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

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

todo

  • generate files for translation (gettext, Poedit)