个人工具
登录
查看“UbuntuHelp:MonoFromSource”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:MonoFromSource”的源代码
来自Ubuntu中文
←
UbuntuHelp:MonoFromSource
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/MonoFromSource}} {{Languages|UbuntuHelp:MonoFromSource}} === Introduction === Due to the current lag between Mono releases and Ubuntu/Debian packages being available, this page will help you to compile the latest release of Mono from source. These instructions are for use with Ubuntu 5.04 (Hoary Hedgehog), Ubuntu 5.10 forwards already has a more recent version of Mono in the repositories. === Pre-Requisites === Since we're going to be compiling code, we need to satisfy some requirements before we begin. We also need to satisfy some dependencies for Mono. <pre><nowiki> bash:~$ sudo apt-get install build-essential pkg-config libglib2.0-dev bison libcairo1-dev </nowiki></pre> Now we're going to need somewhere to work: <pre><nowiki> bash:~$ mkdir src bash:~$ cd src </nowiki></pre> ==== libgdiplus ==== '''''Optional''' - Although the following are not required, they do provide more functionality to libgdiplus.'' <pre><nowiki> bash:~/src/$ sudo apt-get install libungif4-dev libjpeg62-dev libtiff4-dev </nowiki></pre> Let's grab the tarball: <pre><nowiki> bash:~/src/$ wget http://www.go-mono.com/sources/libgdiplus-1.1/libgdiplus-1.1.9.tar.gz </nowiki></pre> ...and extract it: <pre><nowiki> bash:~/src/$ tar xzf libgdiplus-1.1.9.tar.gz bash:~/src/$ cd libgdiplus-1.1.9 </nowiki></pre> Now we can compile and install it: <pre><nowiki> bash:~/src/libgdiplus-1.1.9/$ ./configure --prefix=/usr/local bash:~/src/libgdiplus-1.1.9/$ make bash:~/src/libgdiplus-1.1.9/$ sudo make install </nowiki></pre> Now we have to make sure the installed libraries are visible - there are several ways to do this, this is just one. <pre><nowiki> bash:~/src/libgdiplus-1.1.9/$ sudo sh -c "echo /usr/local/lib >> /etc/ld.so.conf" bash:~/src/libgdiplus-1.1.9/$ sudo /sbin/ldconfig </nowiki></pre> Now we can leave this folder... <pre><nowiki> bash:-~/src/libgdiplus-1.1.9/$ cd .. </nowiki></pre> ...and move onto the next step. === Mono === Compiling Mono itself is pleasantly straightforward: <pre><nowiki> bash:~/src/$ wget http://www.go-mono.com/sources/mono-1.1/mono-1.1.9.tar.gz bash:~/src/$ tar xzf mono-1.1.9.tar.gz bash:~/src/$ cd mono-1.1.9 bash:~/src/mono-1.1.9/$ ./configure --prefix=/usr/local --with-preview=yes bash:~/src/mono-1.1.9/$ make bash:~/src/mono-1.1.9/$ sudo make install bash:~/src/$ cd .. </nowiki></pre> You can check the install as follows: <pre><nowiki> bash:~/src/$ mono -V Mono JIT compiler version 1.1.9, (C) 2002-2005 Novell, Inc and Contributors. www.mono-project.com TLS: normal GC: Included Boehm (with typed GC) SIGSEGV : normal Globalization: normal </nowiki></pre> === Gtk# === There are two variants of Gtk# - 1.x and 2.x. Different applications may require one or the other, and due to the nature of Mono there is no harm in having both. Both depend on various GNOME/GTK+ development libraries, which can be satisified as follows: <pre><nowiki> bash:~/src/$ sudo apt-get install libgnome-desktop-dev libgtkhtml3.2-dev </nowiki></pre> There are also optional dependencies, which - if you require them - can be satisified with: <pre><nowiki> bash:~/src/$ sudo apt-get install libgnomedb2-dev librsvg2-dev libvte-dev </nowiki></pre> As with Mono itself once you've satisfied the dependencies, compilation is straight forward. ==== 1.x ==== <pre><nowiki> bash:~/src/$ wget http://go-mono.com/sources/gtk-sharp/gtk-sharp-1.0.10.tar.gz bash:~/src/$ tar xzf gtk-sharp-1.0.10.tar.gz bash:~/src/$ cd gtk-sharp-1.0.10 bash:~/src/gtk-sharp-1.0.10/$ ./configure --prefix=/usr/local bash:~/src/gtk-sharp-1.0.10/$ make bash:~/src/gtk-sharp-1.0.10/$ sudo make install bash:~/src/$ cd .. </nowiki></pre> You can test your install with the following: <pre><nowiki> bash:~/src/$ sudo ldconfig bash:~/src/$ mono gtk-sharp-1.0.10/sample/GtkDemo/GtkDemo.exe </nowiki></pre> ==== 2.x ==== Gtk# 2.x has an additional dependency: <pre><nowiki> bash:~/src/$ sudo apt-get install libpanel-applet2-dev </nowiki></pre> <pre><nowiki> bash:~/src/$ wget http://go-mono.com/sources/gtk-sharp-2.0/gtk-sharp-2.3.91.tar.gz bash:~/src/$ tar xzf gtk-sharp-2.3.91.tar.gz bash:~/src/$ cd gtk-sharp-2.3.91 bash:~/src/gtk-sharp-2.3.91/$ ./configure --prefix=/usr/local bash:~/src/gtk-sharp-2.3.91/$ make bash:~/src/gtk-sharp-2.3.91/$ sudo make install bash:~/src/$ cd .. </nowiki></pre> You can test your install with the following: <pre><nowiki> bash:~/src/$ sudo ldconfig bash:~/src/$ mono gtk-sharp-2.3.91/sample/GtkDemo/GtkDemo.exe </nowiki></pre> === XSP === XSP is a small server to run asp.net pages. It's a component need to run asp.net pages under Apache. Retrive the source from mono web sites. I recommend you get the same version for XSP than mono. <pre><nowiki>wget http://go-mono.com/sources/xsp/xsp-XXX.tar.bz2 </nowiki></pre> Extract hte content of this archive with this command. <pre><nowiki>tar jxf xsp* </nowiki></pre> Compile it and install it with this command. <pre><nowiki>cd xsp* ./configure make sudo make install </nowiki></pre> === mod_mono === Notes : To correctly running mod_mono, you must install XSP. Install this extra dependecies. <pre><nowiki>sudo apt-get install apache2 apache2-prefork-dev </nowiki></pre> Retrive the source from mono web sites. I recommend you get the same version for XSP than mono. <pre><nowiki>wget http://go-mono.com/sources/mod_mono/mod_mono-1.2.6.tar.bz2 </nowiki></pre> Extract hte content of this archive with this command. <pre><nowiki>tar jxf mod_mono* </nowiki></pre> Compile it and install it with this command <pre><nowiki>cd mod_mono* ./configure make sudo make install </nowiki></pre> === Conclusion === You've now got a fully functioning Mono/Gtk# environment, and you can move onto compiling/developing your own applications! [[category:CategoryDocumentation]] [[category:CategoryCleanup]] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:MonoFromSource
。