2002-11-16 13:03:27 +00:00
|
|
|
<!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>
|
2002-11-09 09:03:51 +00:00
|
|
|
<body>
|
2002-11-16 13:03:27 +00:00
|
|
|
<h1>Mono</h1>
|
2002-11-09 09:03:51 +00:00
|
|
|
|
2002-11-16 13:03:27 +00:00
|
|
|
<h2><a id="about">About the Mono Technology</a></h2>
|
2002-11-09 09:03:51 +00:00
|
|
|
|
2002-11-16 13:03:27 +00:00
|
|
|
<br />
|
|
|
|
<h2><a id="mylife">How Will Mono Technology Change My
|
|
|
|
Life?</a></h2>
|
2002-11-09 09:03:51 +00:00
|
|
|
|
2002-11-16 13:03:27 +00:00
|
|
|
<br />
|
|
|
|
<h2><a id="hello">HelloWorld</a></h2>
|
2002-11-09 09:03:51 +00:00
|
|
|
|
2002-11-16 13:03:27 +00:00
|
|
|
<br />
|
|
|
|
This is a must in every book or tutorial, a "Hello, World!"
|
|
|
|
program, so here it is:
|
2002-11-09 09:03:51 +00:00
|
|
|
<pre class="code">
|
|
|
|
using System;
|
|
|
|
|
|
|
|
class Hello {
|
|
|
|
static void Main() {
|
|
|
|
Console.WriteLine ("Hello, World!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</pre>
|
|
|
|
|
2002-11-16 13:03:27 +00:00
|
|
|
<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>
|
2002-11-09 09:03:51 +00:00
|
|
|
|
|
|
|
<h3>MonoDoc</h3>
|
2002-11-16 13:03:27 +00:00
|
|
|
|
2002-11-09 09:03:51 +00:00
|
|
|
<h3>Mono Compiler Suite (mcs)</h3>
|
2002-11-16 13:03:27 +00:00
|
|
|
|
2002-11-09 09:03:51 +00:00
|
|
|
<h3>Mono Interpreter (mint)</h3>
|
2002-11-16 13:03:27 +00:00
|
|
|
|
2002-11-09 09:03:51 +00:00
|
|
|
<h3>Mono Content dumper and disassembler (monodis)</h3>
|
2002-11-16 13:03:27 +00:00
|
|
|
|
2002-11-09 09:03:51 +00:00
|
|
|
<h3>Mono debugger</h3>
|
|
|
|
|
2002-11-16 13:03:27 +00:00
|
|
|
<h2><a id="kernel">Linux kernel support for binaries</a></h2>
|
|
|
|
|
|
|
|
You can make your mono .exe files executable by following these
|
|
|
|
steps:
|
2002-11-09 09:03:51 +00:00
|
|
|
<ol>
|
2002-11-16 13:03:27 +00:00
|
|
|
<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:' > /proc/sys/fs/binfmt_misc/register
|
|
|
|
</pre>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>chmod +x foobar.exe</li>
|
2002-11-09 09:03:51 +00:00
|
|
|
</ol>
|
|
|
|
|
2002-11-16 13:03:27 +00:00
|
|
|
Another way to accomplish the above is to wrap the <br />
|
|
|
|
mono .exe file it in a shell script, like this:
|
2002-11-09 09:03:51 +00:00
|
|
|
<pre class="code">
|
|
|
|
#!/bin/sh
|
|
|
|
/usr/bin/mono /usr/bin/mcs.exe "$@"
|
|
|
|
</pre>
|
|
|
|
|
2002-11-16 13:03:27 +00:00
|
|
|
<h2><a id="qae">Questions and exercises</a></h2>
|
2002-11-09 09:03:51 +00:00
|
|
|
</body>
|
2002-11-16 13:03:27 +00:00
|
|
|
</html>
|
|
|
|
|