Setup of Development Environment for Ubuntu: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
Line 10: Line 10:
** solution: sudo gacutil -u ICSharpCode.SharpZipLib; sudo gacutil --install csharp/ThirdParty/ICSharpCode/ICSharpCode.SharpZipLib.dll
** solution: sudo gacutil -u ICSharpCode.SharpZipLib; sudo gacutil --install csharp/ThirdParty/ICSharpCode/ICSharpCode.SharpZipLib.dll


* If you want to install a certain mono-version (2.6.7 fe.) then you first need to build it. Have a look at [https://github.com/firegrass/mono-installer-script this page] then.
* If you want to install a certain mono-version (2.6.7 fe.) you can find them [http://pkgs.org/download/mono-utils here]


== NAnt ==
== NAnt ==

Revision as of 10:46, 25 October 2011

Required software

Bazaar

  • TODO: how to install bazaar. does apt-get install bzr return a version that is compatible with bzr 2.2 on the server?

Mono 2.x

  • apt-get install mono-2.0-runtime mono-xbuild libmono-microsoft-build2.0-cil monodevelop
  • 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 (2.6.7 fe.) you can find them here

NAnt

  • on Ubuntu/Debian: apt-get install nant
    • Problem: NAnt 0.85 (Build 0.85.2478.0; release; 10/14/2006) does not seem to support the task "solution" on Linux? Invalid element <solution>. Unknown task or datatype.
    • Problem: exec spawn is not supported in 0.85
    • Solution: copy binary zip from sourceforge (http://nant.sourceforge.net/nightly/latest/nant-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

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.