GtkSharp/gnometutorial/mono.html

85 lines
1.8 KiB
HTML
Raw Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<h1>Mono</h1>
<h2><a id="about">About the Mono Technology</a></h2>
<br />
<h2><a id="mylife">How Will Mono Technology Change My
Life?</a></h2>
<br />
<h2><a id="hello">HelloWorld</a></h2>
<br />
This is a must in every book or tutorial, a "Hello, World!"
program, so here it is:
<pre class="code">
using System;
class Hello {
static void Main() {
Console.WriteLine ("Hello, World!");
}
}
</pre>
<kbd>mcs Hello.cs -o hello.exe<br />
mono hello.exe or mint hello.exe</kbd>
<h2><a id="arch">Architecture</a></h2>
<br />
<h2><a id="tools">Tools</a></h2>
<h3>MonoDoc</h3>
<h3>Mono Compiler Suite (mcs)</h3>
<h3>Mono Interpreter (mint)</h3>
<h3>Mono Content dumper and disassembler (monodis)</h3>
<h3>Mono debugger</h3>
<h2><a id="kernel">Linux kernel support for binaries</a></h2>
You can make your mono .exe files executable by following these
steps:
<ol>
<li>Enabling binfmt in your kernel.</li>
<li>Adding the line below to your fstab:<br />
<pre class="code">
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc none
</pre>
</li>
<li>On boot run the cmd below:<br />
<pre class="code">
echo ':CLR:M::MZ::/usr/bin/mono:' &gt; /proc/sys/fs/binfmt_misc/register
</pre>
</li>
<li>chmod +x foobar.exe</li>
</ol>
Another way to accomplish the above is to wrap the <br />
mono .exe file it in a shell script, like this:
<pre class="code">
#!/bin/sh
/usr/bin/mono /usr/bin/mcs.exe "$@"
</pre>
<h2><a id="qae">Questions and exercises</a></h2>
</body>
</html>