Quick Setup of Development environment: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
No edit summary
 
Line 1: Line 1:
== Update February 2018 ==
We have now a script at https://get.openpetra.org that helps with setting up a development environment on recent versions of CentOS, Fedora, Debian and Ubuntu. This script is also used for setting up the demo server, and to run all the nightly tests.


We now only have a development environment on CentOS7.
The requirement is one of the supported Linux systems, that is not used for anything else. The recommendation is to use a dedicated virtual machine or a container just for OpenPetra.


See instructions at https://github.com/SolidCharity/OpenPetraScripts/blob/master/Readme.md
You also need to have installed: bash, curl, sudo, tar


The following information needs to be updated...
to start the script, simply run as root:


== Difference to Full Setup of Development environment ==
curl https://get.openpetra.org | bash -s devenv
The full [[Setup of Development environment]] describes how to download the code from Launchpad, and how to setup an environment for someone that will get seriously involved in the development of OpenPetra.


This guide will show instead, how someone who wants to have a quick look at the project, or wants to fix that one little annoying bug, can get a basic environment with the latest code, and in a very short time.
After the installation has finished successfully, you can do this:


Quick Setup:
* Go and check your instance at https://localhost (it will display your specific url in the final output of the script).
* uses a nightly development build
* Login with user DEMO and password demo, or user SYSADMIN and password CHANGEME
* this build includes a compiled version of OpenPetra, and the project files
* See also the API at https://localhost/api/
* also comes with an sqlite database with demo data
* You find phpMyAdmin running at https://localhost/phpmyadmin
* Start developing in /home/op_dev as user op_dev, and use the following commands:


Full Setup:
cd openpetra
* requires to download the source code,
nant generateGlue
* and then generate the whole solution,
nant generateProjectFiles
* then generate a database, and so on
nant quickCompile -D:onlyonce=yes
nant compileProject -D:name=Ict.Common


== Youtube Tutorial (Screencast) ==
You can do a git pull, to get the latest version of branch test:
* see http://www.pokorra.de/2013/10/easy-start-for-openpetra-developers/ for a 6 minute screencast on how to get started the quick way!
cd openpetra
 
git pull
== Install required software ==
# rebuild OpenPetra with the latest updates
=== for Windows ===
nant quickClean generateSolution
You will need these software packages:
# to recreate the database, if there have been database updates
* Microsoft .Net 4.0/4.5 Runtime, and Windows SDK (recommended) (see [[Setup_of_Development_Environment_for_Windows#Microsoft_.NET_3.5]])
nant recreateDatabase resetDatabase
* [http://www.icsharpcode.net/opensource/sd/download/#SharpDevelop4x SharpDevelop 4.x], or Visual Studio (Express) 2010 or higher
* NAnt: download and install [http://sourceforge.net/projects/openpetraorg/files/openpetraorg/Tools/NAnt-Setup-0.92.exe/download NAnt-Setup-0.92.exe]
 
=== for Linux ===
You will need these software packages:
* Mono (at least version 4.0)
* NAnt
* MonoDevelop, or command line
 
At the moment, Fedora is the best supported Linux platform for OpenPetra development, since we got involved keeping the mono and nant packages uptodate in that distribution.
 
== download openpetra source and binary package ==
* download the latest developers build from [https://github.com/openpetra/openpetra-nightlydevzip/releases Github nightly development releases]
* unzip
* If you are using SharpDevelop, open the file \openpetra\delivery\projects\sharpdevelop4\OpenPetra.Server.sln;
** if you prefer Visual Studio, open the file \openpetra\delivery\projects\vs2010\OpenPetra.Server.sln
** for MonoDevelop, the file is called \openpetra\delivery\projects\monodevelop2\OpenPetra.Server.sln
* On Windows, you can start the Developers Assistant which is located in the root of the unzipped openpetra directory.
** this helps you to start OpenPetra server and client, and to do a full build, etc
* Alternatively, you can use nant from the command line

Latest revision as of 06:28, 26 March 2020

We have now a script at https://get.openpetra.org that helps with setting up a development environment on recent versions of CentOS, Fedora, Debian and Ubuntu. This script is also used for setting up the demo server, and to run all the nightly tests.

The requirement is one of the supported Linux systems, that is not used for anything else. The recommendation is to use a dedicated virtual machine or a container just for OpenPetra.

You also need to have installed: bash, curl, sudo, tar

to start the script, simply run as root:

curl https://get.openpetra.org | bash -s devenv

After the installation has finished successfully, you can do this:

  • Go and check your instance at https://localhost (it will display your specific url in the final output of the script).
  • Login with user DEMO and password demo, or user SYSADMIN and password CHANGEME
  • See also the API at https://localhost/api/
  • You find phpMyAdmin running at https://localhost/phpmyadmin
  • Start developing in /home/op_dev as user op_dev, and use the following commands:
cd openpetra
nant generateGlue
nant generateProjectFiles
nant quickCompile -D:onlyonce=yes
nant compileProject -D:name=Ict.Common

You can do a git pull, to get the latest version of branch test:

cd openpetra
git pull
# rebuild OpenPetra with the latest updates
nant quickClean generateSolution
# to recreate the database, if there have been database updates
nant recreateDatabase resetDatabase