Setup of Development Environment for Ubuntu: Difference between revisions
Joejoe2010 (talk | contribs) (→NAnt) |
Joejoe2010 (talk | contribs) (→NAnt) |
||
Line 19: | Line 19: | ||
** Problem: NAnt 0.91 Alpha that comes with Ubuntu Oneiric (11.10) has conflicts with finding elements in 2.0 and 4.0 System dlls. | ** Problem: NAnt 0.91 Alpha that comes with Ubuntu Oneiric (11.10) has conflicts with finding elements in 2.0 and 4.0 System dlls. | ||
** Solution: copy the latest final NAnt 0.91 release zip from sourceforge (http://downloads.sourceforge.net/project/nant/nant/0.91/nant-0.91-bin.tar.gz), unzip, and change /usr/bin/nant to point at the latest NAnt.exe | ** Solution: copy the latest final NAnt 0.91 release zip from sourceforge (http://downloads.sourceforge.net/project/nant/nant/0.91/nant-0.91-bin.tar.gz), unzip, and change /usr/bin/nant to point at the latest NAnt.exe | ||
** to avoid all the warnings "Could not load file or assembly" run: apt-get install libmono-microsoft-build2.0-cil | |||
** to avoid problems finding log4net etc, make sure the property NAntBin.dir in your OpenPetra.build.config is set correctly | |||
** 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 | |||
In order to use mono 4.0 you need to make some changes on your /usr/bin/nant and comment the line before it. Make it look like this (with the corresponding path on your system). | In order to use mono 4.0 you need to make some changes on your /usr/bin/nant and comment the line before it. Make it look like this (with the corresponding path on your system). |
Revision as of 13:54, 14 November 2011
Required software
Bazaar
apt-get install bzr
Mono 2.x
- This has been tested on Ubuntu Oneiric (11.10):
- apt-get install mono-runtime mono-xbuild mono-gmcs
- if you get this error: ICSharpCode.SharpZipLib.Tar.TarArchive does not contain a definition for Close
- solution: sudo gacutil -u ICSharpCode.SharpZipLib; sudo gacutil --install csharp/ThirdParty/ICSharpCode/ICSharpCode.SharpZipLib.dll
- If you want to install a certain mono-version (eg. 2.6.7) you can find them here
NAnt
- on Ubuntu/Debian: apt-get install nant
- Problem: NAnt 0.91 Alpha that comes with Ubuntu Oneiric (11.10) has conflicts with finding elements in 2.0 and 4.0 System dlls.
- Solution: copy the latest final NAnt 0.91 release zip from sourceforge (http://downloads.sourceforge.net/project/nant/nant/0.91/nant-0.91-bin.tar.gz), unzip, and change /usr/bin/nant to point at the latest NAnt.exe
- to avoid all the warnings "Could not load file or assembly" run: apt-get install libmono-microsoft-build2.0-cil
- to avoid problems finding log4net etc, make sure the property NAntBin.dir in your OpenPetra.build.config is set correctly
- 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
In order to use mono 4.0 you need to make some changes on your /usr/bin/nant and comment the line before it. Make it look like this (with the corresponding path on your system).
#!/bin/sh #exec /usr/bin/cli /usr/lib/NAnt/NAnt.exe "$@" mono --runtime=v4.0 /usr/local/nant-0.91/bin/NAnt.exe "$@"
In order to run both (2.0 and 4.0) please have a look here
SQLite or PostgreSQL or MySQL
- apt-get install sqlite3 (requires 3.6.1 or higher; might need to use another repository, eg testing)
- or apt-get install postgresql
- or apt-get install mysql-server
xgettext and msgfmt
- apt-get install gettext
dos2unix
- this is needed for building releases (nant buildRelease)
- apt-get install tofrodos
Get the source code
The source code is managed with Bazaar.
Follow the instructions at How to work with bazaar on the command line to get the source code.
Please have a look at the following page: Submitting patches and features!
Configuration of Development Environment
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.
This OpenPetra.build.config file is also the file where you set the database you want to use. If you want to switch the database system later, see Setup_of_Development_environment#Use_another_database_system.
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
If you want to switch from SQLite to PostgreSQL which we recommend for serious development, please follow the instructions at Setup_of_Development_environment#Use_another_database_system.