Quick Setup of Development environment: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Difference to Full Setup of Development environment ==
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 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.
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.


Quick Setup:
You also need to have installed: bash, curl, sudo, tar
* uses a nightly development build
* this build includes a compiled version of OpenPetra, and the project files
* also comes with an sqlite database with demo data


Full Setup:
to start the script, simply run as root:
* requires to download the source code,  
* and then generate the whole solution,
* then generate a database, and so on


== Youtube Tutorial (Screencast) ==
curl https://get.openpetra.org | bash -s devenv
* 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!


== Install required software ==
After the installation has finished successfully, you can do this:
=== for Windows ===
You will need these software packages:
* Microsoft .Net 4.0/4.5 Runtime, and Windows SDK (recommended) (see [[Setup_of_Development_Environment_for_Windows#Microsoft_.NET_3.5]])
* [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 ===
* Go and check your instance at https://localhost (it will display your specific url in the final output of the script).
You will need these software packages:
* Login with user DEMO and password demo, or user SYSADMIN and password CHANGEME
* Mono
* See also the API at https://localhost/api/
** best to use mono-openpetra packages (for CentOS, Debian/Ubuntu), from https://build.opensuse.org/project/show?project=home%3Atpokorra%3Aopenpetra
* You find phpMyAdmin running at https://localhost/phpmyadmin
** that includes the latest version of NAnt as well
* Start developing in /home/op_dev as user op_dev, and use the following commands:
* MonoDevelop, or command line


== download openpetra source and binary package ==
cd openpetra
* download the latest developers build from [https://github.com/openpetra/openpetra-nightlydevzip/releases Github nightly development releases]
nant generateGlue
* unzip
nant generateProjectFiles
* If you are using SharpDevelop, open the file \openpetra\delivery\projects\sharpdevelop4\OpenPetra.Server.sln;
nant quickCompile -D:onlyonce=yes
** if you prefer Visual Studio, open the file \openpetra\delivery\projects\vs2010\OpenPetra.Server.sln
nant compileProject -D:name=Ict.Common
** 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.
You can do a git pull, to get the latest version of branch test:
** this helps you to start OpenPetra server and client, and to do a full build, etc
cd openpetra
* Alternatively, you can use nant from the command line
git pull
# rebuild OpenPetra with the latest updates
nant quickClean generateSolution
# to recreate the database, if there have been database updates
nant recreateDatabase resetDatabase

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