网站建议:179001057@qq.com

centos下mono monodevelop 的安装

技术2022-05-12  1

 

« New Software: Bzr Notification Plugin Sphinx Templates »

MonoDevelop 1.0 on CentOS 5 and Fedora: Compiling and Installing

Monday, March 24th, 2008 by Jason

Recently, I had to get MonoDevelop working on CentOS 5 for a project. Here is my blow-by-blow summary of how to get it working. The procedure is designed for CentOS 5, and it works on my Fedora 8 system as well. Since most of the activity is just compiling stuff from source, it should be pretty easy to follow on a different distribution. It’s just a matter of getting the correct packages installed in the preparation phase.

 

Contents

Objectives Preparation Enabling the Environment Mono 1.9 Libgdiplus GTK# Mono.Addins Monodoc Mono Tools Gtksourceview MonoDevelop Nant Finish

Objectives

MonoDevelop platform ready to use on CentOS 5 or Fedora 8 For minimal maintenance headache, use the base operating system to provide as much sofware as possible, with the obvious exception of Mono 1.9 and MonoDevelop 1.0 The install is isolated from the rest of the system. MonoDevelop and its dependencies should have no overlap or interference with the base operating system.

 

Preparation

 

Note: In this document, all source code will go in /usr/src/monodevelop-install. All installed packages will go in /usr/local/software. mkdir -p /usr/local/software/mono-1.9 sudo chown -R `whoami` /usr/local/software # (Be careful if you already have software here)

 

mkdir -p /usr/src/monodevelop-install

 

yum install glib2-devel pango-devel gtk2-devel glade2-devel libgnome-devel gnome-desktop-devel gnome-panel-devel libgnomeprintui22-devel gtksourceview-devel ruby ruby-rdoc gtkhtml38-devel wget # (maybe openssl-devel also) echo 'PATH="/usr/local/software/mono-1.9/bin:$PATH"' > /usr/local/software/mono-1.9/env.sh echo 'export PKG_CONFIG_PATH=/usr/local/software/mono-1.9/lib/pkgconfig' >> /usr/local/software/mono-1.9/env.sh echo 'export LD_LIBRARY_PATH=/usr/local/software/mono-1.9/lib' >> /usr/local/software/mono-1.9/env.sh

Enabling the Environment

Important: You must always run this command before using Monodevelop, and also before continuing on with this procedure.

source /usr/local/software/mono-1.9/env.sh

In this document, Monodevelop is not completely integrated into the GUI, menus, etc. for a couple of reasons:

Getting Monodevelop to show up in the menus is somewhat distro-specific. For RPM-based distros, look into setting the $XDG_DATA_DIRS variable in /etc/X11/xinit/xinitrc.d/, but you will also have to get the path working. For Debian-based distros, look into doing the same thing in /etc/X11/Xsession.d. And if you happen to be trying this on Solaris, look into /usr/dt/config/Xsession.d. Oh and by the way, the .desktop file that ships with Monodevelop is invalid for my Fedora 8 system! So you will have to manually edit it and (IIRC) remove the TryExec line. As you can see, this requires a bit of mucking with “standard” package-maintained config files, which I am hesitant to do because it violates the objective of isolation.

All this means you will always have to first source the small shell script which sets up the correct environment variables whenever you want to run Monodevelop.

Mono 1.9

cd /usr/src/monodevelop-install wget http://go-mono.com/sources/mono/mono-1.9.tar.bz2 tar xjf mono-1.9.tar.bz2 cd mono-1.9 ./configure—prefix=/usr/local/software/mono-1.9 Optionally, —with-ikvm-native=no—with-moonlight=no Optionally, —with-xen_opt=yes make && make install

Libgdiplus:

cd /usr/src/monodevelop-install wget http://go-mono.com/sources/libgdiplus/libgdiplus-1.9.tar.bz2 tar xjf libgdiplus-1.9.tar.bz2 cd libgdiplus-1.9 ./configure—prefix=/usr/local/software/mono-1.9 make && make install

 

GTK#

cd /usr/src/monodevelop-install wget http://go-mono.com/sources/gtk-sharp-2.0/gtk-sharp-2.8.4.tar.bz2 tar xjf gtk-sharp-2.8.4.tar.bz2 cd gtk-sharp-2.8.4 ./configure—prefix=/usr/local/software/mono-1.9 make && make install

 

Mono.Addins:

cd /usr/src/monodevelop-install wget http://go-mono.com/sources/mono-addins/mono-addins-0.3.1.tar.bz2 tar xjf mono-addins-0.3.1.tar.bz2 cd mono-addins-0.3.1 ./configure—prefix=/usr/local/software/mono-1.9 make && make install

 

Monodoc

cd /usr/src/monodevelop-install wget http://go-mono.com/sources/monodoc/monodoc-1.9.zip unzip monodoc-1.9.zip cd monodoc-1.9 ./configure—prefix=/usr/local/software/mono-1.9 make && make install

 

Mono Tools:

cd /usr/src/monodevelop-install wget http://go-mono.com/sources/mono-tools/mono-tools-1.9.tar.bz2 tar xjf mono-tools-1.9.tar.bz2 cd mono-tools-1.9 ./configure—prefix=/usr/local/software/mono-1.9 make && make install

 

Gtksourceview:

cd /usr/src/monodevelop-install wget http://go-mono.com/sources/gtksourceview-sharp-2.0/gtksourceview-sharp-2.0-0.10.tar.gz tar xzf gtksourceview-sharp-2.0-0.10.tar.gz cd gtksourceview-sharp-2.0-0.10 ./configure—prefix=/usr/local/software/mono-1.9 make && make install

 

Monodevelop:

cd /usr/src/monodevelop-install wget http://go-mono.com/sources/monodevelop/monodevelop-1.0.tar.bz2 tar xjf monodevelop-1.0.tar.bz2 cd monodevelop-1.0 ./configure—prefix=/usr/local/software/mono-1.9 make && make install

 

NAnt

This is optional, but many .NET applications build with it, so it might be worth throwing in there.

cd /usr/src/monodevelop-install wget http://downloads.sourceforge.net/nant/nant-0.85-bin.tar.gz tar xzf nant-0.85-bin.tar.gz -C /usr/local/software/mono-1.9 echo ’#!/bin/bash’ > /usr/local/software/mono-1.9/bin/nant echo ‘mono /usr/local/software/mono-1.9/nant-0.85/bin/NAnt.exe ”$@”’ >> /usr/local/software/mono-1.9/bin/nant chmod +x /usr/local/software/mono-1.9/bin/nant

Finished!

You’re done! Run it!

monodevelop

Feel free to contact me if you have any input to add. I will try to add another post for Debian/Ubuntu and possibly Solaris in the future.

Posted in Free Software Comments Off

Comments are closed.

 


Copyright © Proven Corporation Co., Ltd., Thailand. All rights reserved.

Free software and open source solutions and support in Thailand, Singapore, and Southeast Asia.

Feel free to contact us.


最新回复(0)