注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

淡忘邻人

二十七,始发愤

 
 
 

日志

 
 
 
 

Mono 2.6+MonoDevelop2.4===VS  

2010-08-27 20:49:14|  分类: Ubuntu |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Mono+MonoDevelop最新下载网址:

http://ftp.novell.com/pub/mono/sources-stable/

我们知道,在 2009-10-29 发布的 Ubuntu 9.10 操作系统中已经内置 mono 2.4.2.3 版本了。到了 2009-12-08,mono 2.4.3 版本发布了。随后,在 2009-12-14 日,又发布了 mono 2.6 版本。而 Patric 又在 2009-11-29 日发表了 Mono 2.6 parallel environment on Ubuntu 9.10 ,如下所示:

Mono 2.6 parallel environment on Ubuntu 9.10

This is a simple work in progress to make the process a bit easier. There are many good reasons not to follow various scripts on the internet that install mono over the top of your packaged distribution install.The fact the Mono 2.6 isn’t released yet is an overriding one because any application depending on mono might stop working, Banshee, Tomboy,F-Spot, etc

At the moment this scripts only supports Mono 2.6 + Ubuntu 9.10, see the TODOs! It will install mono into /opt/mono-2.6 and checkout & build in ~/mono-src/mono-2.6. Run it again to update your working copy and rebuild/install.

Please let me know if you like/hate/improve the script :)

Download script here http://patrick.qmtech.net/downloads/mono_parallel.sh

You will need these packages installed: build-essential automake libtool mono-complete gendarme subversion libpng-dev libtiff-dev libgif-dev libjpeg-dev libxul-dev libexif-dev autoconf automake bison flex libcairo-dev libpango-dev

在上述文章最后提到了软件包中,automake 出现了两次,只需要保留一次。libpango-dev 应该用 libpango1.0-dev 代替。而 libxul-dev 会和 firefox 冲突,我决定不安装 libxul-dev 。于是,就执行以下命令来安装 mono-2.6:

sudo apt-get install build-essential automake libtool mono-complete gendarme subversion libpng-dev libtiff-dev libgif-dev libjpeg-dev libexif-dev autoconf bison flex libcairo-dev libpango1.0-dev

# wget http://patrick.qmtech.net/downloads/mono_parallel.sh

# sh mono_parallel.sh

经过漫长的等待,终于安装好了 mono 2.6:

ben@ben-m4000t:~$ cat /usr/local/bin/mono-2.6
#!/bin/bash
MONO_PREFIX=/opt/mono-2.6
GNOME_PREFIX=/opt/gnome
export DYLD_LIBRARY_PATH=/opt/mono-2.6/lib:
export LD_LIBRARY_PATH=/opt/mono-2.6/lib:
export C_INCLUDE_PATH=/opt/mono-2.6/include:/include
export ACLOCAL_PATH=/opt/mono-2.6/share/aclocal
export PKG_CONFIG_PATH=/opt/mono-2.6/lib/pkgconfig:/lib/pkgconfig
PATH=/opt/mono-2.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

exec "$@"
ben@ben-m4000t:~$
ben@ben-m4000t:~$ mono-2.6 mono --version
Mono JIT compiler version 2.6.1 (/branches/mono-2-6/mono r148738 2009年 12月 18日 星期五 09:50:50 CST)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC and Parallel Mark)
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
ben@ben-m4000t:~$
ben@ben-m4000t:~$ du -hs mono-src /opt/mono-2.6
1.4G mono-src
134M /opt/mono-2.6
ben@ben-m4000t:~$

从上面可以看到,mono 2.6 的源程序占用 1.4GB 的磁盘空间,mono 2.6 目标程序占用 134MB 的磁盘空间。实际上,安装完成后,mono 2.6 的源程序就可以使用 rm -rf mono-src 命令删除了。

附上:mono_parallel.sh

#!/bin/bash
#
# Version 0.1
# This script is to install a parallel mono environment with ease
# It only checks out/installs mono 2.6 branch on Ubuntu 9.10 atm
#
# Copyright 2009 (c) QMTech Ltd (http://www.qmtech.net)
# Authors: Patrick McEvoy (firegrass) patrick@qmtech.net
# This is free script under GNU GPL version 3.

# config
# TODO: Allow opt or home install option (hence sudo/no sudo)
# TODO: Allow have 2.6 or trunk
VERSION=2.6
MONO_PREFIX=/opt/mono-$VERSION
#GNOME_PREFIX=/opt/gnome-2.6
WORKING_DIR=~/mono-src/mono-$VERSION
# TODO: webserver/server/workstation (+mod_mono,-gnome,-mono-tools/-gnome,-mono-tools/-mod_mono)
MODE=server
# TODO: Option to hide all output
DEBUG=
#1>&2

echo "MI: This script will download/checkout mono and install in a parallel environment."
echo "MI: Report bugs to patrick@qmtech.net, firegrass on twitter, carrier pidgeon etc"

#
if [ $MODE = "workstation" ] && [ "$(id -u)" = "0" ]; then
    echo "MI ERROR: This script should not be run as root" 1>&2
    exit 1
fi

echo "MI: Installing mono version $VERSION, building in $WORKING_DIR"
echo "MI: I need sudo access to install mono to /opt and mono-$VERSION in /usr/local/bin"
sudo echo "MI: If the sudo time limit is reached you will need to enter you password again."
# making a dir to work from
mkdir -p $WORKING_DIR
cd $WORKING_DIR

# svn checkouts
SVN_BASE=http://anonsvn.mono-project.com/source/branches/mono-2-6
# modules - hardcoded to branch 2.6

SVN_MODULES="libgdiplus mono mcs mono-tools mod_mono xsp"

for mod in $SVN_MODULES; do
    if [ -d $mod ]; then
        echo "MI: Updating $mod"
        svn up -q $mod || { echo "MI ERROR: Updating $mod failed"; exit 1; }
    else
        echo "MI: Checking out $mod ($SVN_BASE/$mod)"
        svn co -q $SVN_BASE/$mod || { echo "MI ERROR: Checking out $mod failed"; exit 1; }
    fi
done

# create enviroment files
cat > "mono-$VERSION-environment" <<EOF
#!/bin/bash
MONO_PREFIX=$MONO_PREFIX
GNOME_PREFIX=/opt/gnome
export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH
export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=$MONO_PREFIX/include:$GNOME_PREFIX/include
export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal
export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig:$GNOME_PREFIX/lib/pkgconfig
PATH=$MONO_PREFIX/bin:$PATH
PS1="[mono] \w @ "
EOF

cat > "mono-$VERSION" <<EOF
#!/bin/bash
MONO_PREFIX=$MONO_PREFIX
GNOME_PREFIX=/opt/gnome
export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH
export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=$MONO_PREFIX/include:$GNOME_PREFIX/include
export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal
export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig:$GNOME_PREFIX/lib/pkgconfig
PATH=$MONO_PREFIX/bin:$PATH

exec "\$@"
EOF

# install environemnt
chmod +x mono-$VERSION-environment mono-$VERSION
sudo mv mono-$VERSION-environment /usr/local/bin/mono-$VERSION-environment
sudo mv mono-$VERSION /usr/local/bin/mono-$VERSION

# using new environment
. mono-$VERSION-environment

# configure, make, install
for mod in $SVN_MODULES; do
    if [ $mod = "mcs" ]; then
        # Ignore mcs as built from mono
        echo "MI: Skiping mcs module"
    elif [ $MODE = "server" ] && [ $mod = "mono-tools" ]; then
        echo "MI: Skipping mono-tools (server install)"
    elif [ $MODE = "server" ] && [ $mod = "mod_mono" ]; then
        echo "MI: Skipping mono-tools (server install)"
    else
        echo "MI: Installing $mod"
        cd $mod
        ./autogen.sh --prefix=$MONO_PREFIX $DEBUG && \
        make $DEBUG && \
        sudo make install $DEBUG || { echo "MI ERROR: $mod failed"; exit 1; }
        cd ..
    fi
done

# Exit message
echo "Your parallel environment is installed"
echo "To start a mono-$VERSION environment, run: source mono-$VERSION-environment"
echo "To use mono-$VERSION to run a cli app, run: mono-$VERSION <your app> (eg mono-$VERSION mono -V)"

  评论这张
 
阅读(627)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017