Setup of Development Environment for Windows: Difference between revisions
No edit summary |
|||
Line 2: | Line 2: | ||
== Microsoft .Net == | == Microsoft .Net == | ||
Download the Microsoft .Net dependencies. They allow execution of and development for .NET applications (such as openPETRA). | |||
* | * Microsoft .Net 3.5 Redistributable '''and''' the SDK are both needed (we only use .Net 2.0 for OpenPetra, but SharpDevelop requires .Net 3.5) | ||
* Free download from Microsoft: | |||
** Redistributable: http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE52-4E35-B531-508D977D32A6 | ** Redistributable: http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE52-4E35-B531-508D977D32A6 | ||
** SDK: http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505 | ** SDK: http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505 | ||
== SharpDevelop 3.x == | == SharpDevelop 3.x == | ||
* | SharpDevelop is the IDE (Integrated Development Environment) we use for developing openPETRA. | ||
* | |||
* We currently use the latest SharpDevelop 3.2 build (Build 5777). (We ''don't'' recommend using the Beta version of SharpDevelop 4!) | |||
* Free download: http://www.icsharpcode.net/OpenSource/SD/Download/ | |||
== TortoiseGit == | == TortoiseGit == | ||
TortoiseGit is the Windows client for the Git Code Versioning System. Git is a distributed code versioning system (as opposed to central versioning systems such as CVS and SVN). | |||
We use Git for the maintenance of the openPETRA source code repository. | |||
This works fine on Windows, although it is still work in progress... | * Free download: http://code.google.com/p/tortoisegit/ | ||
** This works fine on Windows, although it is still work in progress... | |||
** Please install "Git on Windows" ''before'' installing TortoiseGit (see below)! | |||
** We recommend to use plink.exe from PuTTY, not OpenSSH. You have that choice in the TortoiseGit installer. | |||
TortoiseGit requires "Git on Windows" http://code.google.com/p/msysgit/; be careful: use the official git installer from that site, eg. [http://msysgit.googlecode.com/files/Git-1.6.3.2-preview20090608.exe Git-1.6.3.2-preview20090608.exe], not the fullinstaller or other packages. | |||
You also might want to have a look at [http://code.google.com/p/gitextensions Git Extensions] which is also a fully functional git GUI for Windows. | You also might want to have a look at [http://code.google.com/p/gitextensions Git Extensions] which is also a fully functional git GUI for Windows. | ||
Line 26: | Line 32: | ||
== NAnt == | == NAnt == | ||
NAnt is our build system. It is used for ongoing compilation, for creation of Builds/Releases of openPETRA, and for the automation of quite a few tasks in the development lifecycle of openPETRA - including auto-generation of source code and Forms. | |||
* see also http://nant.sourceforge.net/release/0.86-beta1/help/introduction/installation.html | * see also http://nant.sourceforge.net/release/0.86-beta1/help/introduction/installation.html | ||
Line 39: | Line 47: | ||
== Database systems == | == Database systems == | ||
* one of the following Database Management systems: | openPETRA works with a number of Database Management systems. | ||
** no installation effort at all is required | |||
** PostgreSQL (recommended) | * Choose one (or more) of the following Database Management systems: | ||
** '''SQLite''': no installation effort at all is required! See [[Notes about SQLite]] | |||
** '''PostgreSQL ''(recommended)'''''. See [[Notes about PostgreSQL]] | |||
*** get the latest version from http://www.postgresql.org/download/windows. The one click installer works fine for me. | *** get the latest version from http://www.postgresql.org/download/windows. The one click installer works fine for me. | ||
** MySQL | ** '''MySQL'''. See [[Notes about MySQL]] | ||
*** get the latest Windows version from http://dev.mysql.com/downloads/mysql/. It is called MySQL Community Server. The MSI essential package works fine for me. | *** get the latest Windows version from http://dev.mysql.com/downloads/mysql/. It is called MySQL Community Server. The MSI essential package works fine for me. | ||
= Optional Software = | = Optional Software = | ||
* For the editing YAML files we use Notepad++, which has syntax highlighting. | * For the editing of YAML files (which we use for defining the layout of screens, the main menu entries, and code hierarchy) we use Notepad++, which has syntax highlighting support for YAML files. | ||
** [http://notepad-plus-plus.org/download Download Notepad++] | ** [http://notepad-plus-plus.org/download Download Notepad++] | ||
** Once the software is installed, it needs to be set up once to accept our file extension, '.yaml', in addition to the one is built in, '.yml' for the syntax highlighting to work: | ** Once the software is installed, it needs to be set up once to accept our file extension, '.yaml', in addition to the one is built in, '.yml' for the syntax highlighting to work: | ||
Line 80: | Line 91: | ||
mkdir c:\development | mkdir c:\development | ||
subst u: c:\development | subst u: c:\development | ||
Download the Git repository into u:\openpetraorg (it contains the .git directory, and the OpenPetra.build: U:\openpetraorg\OpenPetra.build, etc) | |||
URL of the git repository: | URL of the git repository: | ||
anonymous access: git://openpetraorg.git.sourceforge.net/gitroot/openpetraorg/openpetraorg | anonymous access: git://openpetraorg.git.sourceforge.net/gitroot/openpetraorg/openpetraorg | ||
Line 86: | Line 99: | ||
make sure that you set your username and email address in your git client | make sure that you set your username and email address in your git client | ||
* | * 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 | copy OpenPetra.build-sample-windows.config OpenPetra.build.config | ||
Revision as of 14:38, 7 July 2010
Required software
Microsoft .Net
Download the Microsoft .Net dependencies. They allow execution of and development for .NET applications (such as openPETRA).
- Microsoft .Net 3.5 Redistributable and the SDK are both needed (we only use .Net 2.0 for OpenPetra, but SharpDevelop requires .Net 3.5)
- Free download from Microsoft:
SharpDevelop 3.x
SharpDevelop is the IDE (Integrated Development Environment) we use for developing openPETRA.
- We currently use the latest SharpDevelop 3.2 build (Build 5777). (We don't recommend using the Beta version of SharpDevelop 4!)
- Free download: http://www.icsharpcode.net/OpenSource/SD/Download/
TortoiseGit
TortoiseGit is the Windows client for the Git Code Versioning System. Git is a distributed code versioning system (as opposed to central versioning systems such as CVS and SVN). We use Git for the maintenance of the openPETRA source code repository.
- Free download: http://code.google.com/p/tortoisegit/
- This works fine on Windows, although it is still work in progress...
- Please install "Git on Windows" before installing TortoiseGit (see below)!
- We recommend to use plink.exe from PuTTY, not OpenSSH. You have that choice in the TortoiseGit installer.
TortoiseGit requires "Git on Windows" http://code.google.com/p/msysgit/; be careful: use the official git installer from that site, eg. Git-1.6.3.2-preview20090608.exe, not the fullinstaller or other packages.
You also might want to have a look at Git Extensions which is also a fully functional git GUI for Windows.
See also some Notes about Git
NAnt
NAnt is our build system. It is used for ongoing compilation, for creation of Builds/Releases of openPETRA, and for the automation of quite a few tasks in the development lifecycle of openPETRA - including auto-generation of source code and Forms.
- download NAnt nant-0.86-nightly-2009-05-05
- the beta version does not work for me (0.86-beta1); message: Property 'sdkInstallRoot' has not been set.
- unzip the files to eg. c:\program files\nant
- create file c:\windows\nant.bat with content:
@echo off "C:\Program Files\NAnt\bin\NAnt.exe" %* -t:net-2.0
See also some Notes about NAnt
Database systems
openPETRA works with a number of Database Management systems.
- Choose one (or more) of the following Database Management systems:
- SQLite: no installation effort at all is required! See Notes about SQLite
- PostgreSQL (recommended). See Notes about PostgreSQL
- get the latest version from http://www.postgresql.org/download/windows. The one click installer works fine for me.
- MySQL. See Notes about MySQL
- get the latest Windows version from http://dev.mysql.com/downloads/mysql/. It is called MySQL Community Server. The MSI essential package works fine for me.
Optional Software
- For the editing of YAML files (which we use for defining the layout of screens, the main menu entries, and code hierarchy) we use Notepad++, which has syntax highlighting support for YAML files.
- Download Notepad++
- Once the software is installed, it needs to be set up once to accept our file extension, '.yaml', in addition to the one is built in, '.yml' for the syntax highlighting to work:
- Menu 'Settings' -> 'Style Configurator'. Select 'YAML' in the 'Language' list and enter 'yaml' in the 'User ext.' field. Choose 'Save & Close'. (You might need to close and re-open any .yaml file that you already have open to get the syntax highlighting working.)
- The following pieces of software are only required when you want to build releases of OpenPetra:
- Poedit (for translation, generating the .mo file from the .po file): http://www.poedit.net/download.php
- Inno Setup 5 for building setup files: http://www.jrsoftware.org/isdl.php
Get the source code
The source code is managed with Git.
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.
You can get the source code in several ways:
- see the Git instructions at Sourceforge
- that page describes how you can download anonymously from Git
- you can also browse the Git repository online, and you can download a tar.gz snapshot of each version there
- for developers: more detailed instructions how to create the ssh key and where to upload it to Sourceforge: https://sourceforge.net/apps/trac/sourceforge/wiki/SSH%20keys
for anonymous access, you can use this URL to clone the repository with TortoiseGit:
git://openpetraorg.git.sourceforge.net/gitroot/openpetraorg/openpetraorg
for developer access (with write permissions), use this URL to clone the repository with TortoiseGit:
ssh://USERNAME@openpetraorg.git.sourceforge.net/gitroot/openpetraorg/openpetraorg
For development, I recommend you create a local branch, and switch to it. Then you pull updates from the server ("master") into your local branch, and push your updates up to the server in the master branch. Otherwise you get all sorts of problems with pushing and pulling, so don't commit to master at all. see also Notes about Git
Configuration of 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:\openpetraorg (it contains the .git directory, and the OpenPetra.build: U:\openpetraorg\OpenPetra.build, etc)
URL of the git repository: anonymous access: git://openpetraorg.git.sourceforge.net/gitroot/openpetraorg/openpetraorg developer access: ssh://USERNAME@openpetraorg.git.sourceforge.net/gitroot/openpetraorg/openpetraorg make sure that you set your username and email address in your git client
- 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
Please check your OpenPetra.build.config file and make sure the paths are all adjusted to your system and the version numbers in the paths are correct.
NAnt script
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.
Please see OpenPetra NAnt script for details