Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2060885a61 | ||
|
|
7f0542b133 | ||
|
|
9f187b5dd0 |
No files matched your search
@@ -15,5 +15,3 @@ Makefile.in
|
||||
mono-*.tar.gz
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
mono.pc
|
||||
mono.spec
|
||||
@@ -1,474 +1,3 @@
|
||||
2003-06-10 Dick Porter <[email protected]>
|
||||
|
||||
* acconfig.h:
|
||||
* configure.in: Check for struct ip_mreq if struct ip_mreqn isn't
|
||||
available.
|
||||
|
||||
2003-06-10 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Define HAVE_GC_GCJ_MALLOC for included libgc.
|
||||
|
||||
2003-06-10 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in: Fall back to boehm if we don't have a libgc
|
||||
subdirectory.
|
||||
|
||||
2003-06-10 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in: Make the libgc stuff actually work; we now create
|
||||
a shared libmonogc.so when using the included libgc.
|
||||
|
||||
2003-06-09 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in: Only check for gc if --with-gc=boehm.
|
||||
|
||||
2003-06-08 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in: Tell libgc's configure about our threads library.
|
||||
|
||||
2003-06-08 Martin Baulig <[email protected]>
|
||||
|
||||
* libgc/: Integrate the libgc module here.
|
||||
|
||||
[Note: A simple `cvs update' won't work this time; you either need
|
||||
to re-checkout the `mono' module or manually move the `libgc'
|
||||
module here.]
|
||||
|
||||
* configure.in (--with-gc): Added `included' option to use the
|
||||
included libgc. This is now also the default.
|
||||
(LIBGC_CFLAGS, LIBGC_LIBS): Put the libgc stuff here and AC_SUBST it.
|
||||
(INCLUDED_LIBGC): New automake conditional.
|
||||
(USE_INCLUDED_LIBGC): #define this if appropriate.
|
||||
|
||||
* autogen.sh: Run libgc/autogen.sh.
|
||||
|
||||
* Makefile.am (SUBDIRS): Added libgc.
|
||||
|
||||
2003-06-05 Duncan Mak <[email protected]>
|
||||
|
||||
* mono.spec.in (Requires): Add libxml2 and libxslt dependency on
|
||||
the package.
|
||||
|
||||
2003-05-19 Dick Porter <[email protected]>
|
||||
|
||||
* configure.in: Netbsd build fix by [email protected].
|
||||
|
||||
2003-05-10 Martin Willemoes Hansen <[email protected]>
|
||||
|
||||
* scripts/Makefile.am: Added monoresgen secutil sqlsharp
|
||||
shell wrapper scripts.
|
||||
|
||||
2003-05-08 Zoltan Varga <[email protected]>
|
||||
|
||||
* mono/tests/Makefile.am:
|
||||
- Compile with mcs.
|
||||
- Disable some warnings.
|
||||
- Added executables to clean target.
|
||||
- Make testjit the default target.
|
||||
- Print list of failed tests at the end of a test run.
|
||||
- Abort tests when Ctrl-C is pressed.
|
||||
|
||||
* mono/tests/test-driver: Return with a special exit code when
|
||||
SIGINT is detected.
|
||||
|
||||
* mono/tests/checked.cs: Make it compile.
|
||||
|
||||
2003-05-02 Miguel de Icaza <[email protected]>
|
||||
|
||||
* runtime/Makefile.am ($(monobins_DATA)): Use explicit file names
|
||||
for the target exe binaries.
|
||||
|
||||
Copy cilc.exe and secutil.exe from the right paths to the right
|
||||
location.
|
||||
|
||||
Add missing assemblies.
|
||||
|
||||
2003-05-02 Alp Toker <[email protected]>
|
||||
|
||||
* data/config.in: new dll mapping entry for libglade
|
||||
|
||||
2003-05-01 Duncan Mak <[email protected]>
|
||||
|
||||
* scripts/Makefile.am:
|
||||
* runtime/Makefile.am: Install cilc and ilasm.
|
||||
|
||||
2003-04-29 Dietmar Maurer <[email protected]>
|
||||
|
||||
* mono/tests/Makefile.am (JITTEST_PROG): use mini/mono
|
||||
|
||||
2003-04-16 Charles Iliya Krempeaux <[email protected]>
|
||||
|
||||
* doc/web/team.xml : Added myself to it.
|
||||
|
||||
2003-04-10 Duncan Mak <[email protected]>
|
||||
|
||||
* doc/web/render-team-page.cs: Make the names of the element be
|
||||
lowercase instead. BenM says this makes it XHTML compliant; heck,
|
||||
I'm generating this from an XmlDocument already, why not make it
|
||||
XHTML compliant?
|
||||
|
||||
2003-04-10 Duncan Mak <[email protected]>
|
||||
|
||||
* doc/web/render-team-page.cs (Compare): Correctly fix
|
||||
ContributorComparer.
|
||||
(RenderHtml): Add some SetAttribute loving to make it render prettier.
|
||||
|
||||
* doc/web/team.xml: Revert excessive indenting.
|
||||
|
||||
2003-04-07 Martin Baulig <[email protected]>
|
||||
|
||||
* mono/mini/: Added this directory to the build; install `mini'
|
||||
and `libmini.la'.
|
||||
|
||||
2003-04-07 Duncan Mak <[email protected]>
|
||||
|
||||
* doc/web/render-team-page.cs: Fix ContributorComparer.
|
||||
|
||||
2003-04-04 Duncan Mak <[email protected]>
|
||||
|
||||
* doc/web/render-team-page.cs: Make it use 'none.png' if no image
|
||||
are specified in the XML.
|
||||
|
||||
* doc/web/team.xml: Remove the comment.
|
||||
|
||||
* doc/web/render-team-page.cs: Make it not output a full HTML file.
|
||||
|
||||
2003-04-04 Duncan Mak <[email protected]>
|
||||
|
||||
* doc/web/commands:
|
||||
* doc/web/makefile: Add team page information.
|
||||
|
||||
* doc/web/team.xml:
|
||||
* doc/web/render-team-page.cs: Code for rendering a team page.
|
||||
|
||||
2003-04-02 Duncan Mak <[email protected]>
|
||||
|
||||
* doc/web/makefile: Add a new make target for generating a team
|
||||
page on go-mono.com.
|
||||
|
||||
2003-04-04 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Added check for GC_gcj_malloc.
|
||||
|
||||
2003-04-04 Martin Willemoes Hansen <[email protected]>
|
||||
|
||||
* man/sqlsharp.1: changed pass= to password= for the
|
||||
PostgreSql provider.
|
||||
|
||||
>>>>>>> 1.166
|
||||
2003-03-31 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* data/machine.config: added SessionStateModule to httpModules section.
|
||||
|
||||
2003-02-13 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* data/machine.config: added default sessionState section and handler.
|
||||
|
||||
2003-02-17 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/provider-factory: add new web page
|
||||
about Mono.Data's ProviderFactory
|
||||
|
||||
* doc/web/commands
|
||||
* doc/web/makefile: add provider-factory web page to build
|
||||
|
||||
* doc/ado-net
|
||||
* doc/ibmdb2
|
||||
* doc/postgresql
|
||||
* doc/sqlclient
|
||||
* doc/tdsclient
|
||||
* doc/sybase
|
||||
* doc/mysql
|
||||
* doc/firebird
|
||||
* doc/oracle
|
||||
* doc/oledb
|
||||
* doc/odbc
|
||||
* doc/sqlite: updated web pages
|
||||
|
||||
2003-02-16 Martin Baulig <[email protected]>
|
||||
|
||||
* doc/jit-debug-sample
|
||||
* doc/jit-debug-sample2: Removed.
|
||||
|
||||
* doc/jit-debug: Updated.
|
||||
|
||||
2003-02-13 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/screenshots
|
||||
* doc/ado-net
|
||||
* doc/oracle
|
||||
* doc/gtk-sharp: update web pages
|
||||
|
||||
2003-02-13 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* data/machine.config: added sample globalization section.
|
||||
|
||||
2003-02-12 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* data/machine.config: added UrlAuthorizationModule and
|
||||
AuthenticationConfigHandler.
|
||||
|
||||
2003-02-11 Tim Coleman <[email protected]>
|
||||
* data/config.in: Add mapping for Oracle call interface
|
||||
(OCI) native libraries.
|
||||
|
||||
2003-02-04 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* configure.in: added check for sys/un.h.
|
||||
|
||||
2003-01-29 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/postgresql
|
||||
* doc/mysql
|
||||
* doc/ado-net: updates to web pages
|
||||
|
||||
* man/sqlsharp.1: update to man page
|
||||
|
||||
2003-01-28 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* configure.in: added WIN32_THREADS flag when building under windows.
|
||||
It seems that the header files of the gc do not always define it when
|
||||
GC_WIN32_THREADS is defined.
|
||||
|
||||
2003-01-26 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/index
|
||||
* doc/ado-net
|
||||
* doc/firebird
|
||||
* doc/ibmdb2
|
||||
* doc/mysql
|
||||
* doc/odbc
|
||||
* doc/oledb
|
||||
* doc/oracle
|
||||
* doc/postgresql
|
||||
* doc/sqlclient
|
||||
* doc/sqlite
|
||||
* doc/sybase
|
||||
* doc/tdsclient: corrections
|
||||
|
||||
2003-01-26 Duncan Mak <[email protected]>
|
||||
|
||||
* doc/jit-debug: Update the links. Thanks for Andy Oliver for the report.
|
||||
|
||||
2003-01-22 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in: Set version number to 0.19.1.
|
||||
|
||||
Heads up: I'm going to commit some changes to the debugger
|
||||
which'll require you to use this new runtime, so if you update the
|
||||
debugger from CVS, you also need this new runtime.
|
||||
|
||||
2003-01-20 Duncan Mak <[email protected]>
|
||||
|
||||
* configure.in: Bump the release number to 0.19.
|
||||
|
||||
2003-01-19 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/ibmdb2: added file which is new web page
|
||||
about IBM DB2 data provider at Mono.Data.DB2Client
|
||||
|
||||
* makefile
|
||||
* commands: added ibmdb2 web page to go-mono web site
|
||||
|
||||
* doc/ado-net: added a couple more developers email, plus made the
|
||||
email spam resistant, added Mono's DB2 data provider to list,
|
||||
added more info about the ProviderFactory and retrieving data using
|
||||
ADO.NET from ASP.NET, add notes about testing, misc cleanup
|
||||
|
||||
* doc/mysql
|
||||
* doc/postgresql
|
||||
* doc/sqlclient
|
||||
* doc/oracle
|
||||
* doc/tdsclient
|
||||
* doc/firebird
|
||||
* doc/oledb
|
||||
* doc/odbc
|
||||
* doc/sybase
|
||||
* doc/sqlite: added testing notes and C# examples
|
||||
|
||||
* doc/gtk-sharp: added links for GTK# for Windows
|
||||
|
||||
* man/sqlsharp.1: added providers Npgsql and MySQLNet
|
||||
|
||||
2003-01-17 Duncan Mak <[email protected]>
|
||||
|
||||
* runtime/Makefile.am: Add the new Mono.Data.DB2Client.dll.
|
||||
|
||||
2003-01-16 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in (GTHREAD_LIBS, GTHREAD_CFLAGS): Removed the gthread
|
||||
check again, we're now using the mono/io-layer for this.
|
||||
|
||||
Wed Jan 15 16:20:54 CET 2003 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: allow MacOSX (from various people).
|
||||
|
||||
2003-01-14 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in (GTHREAD_LIBS, GTHREAD_CFLAGS): Added check for gthread.
|
||||
|
||||
2002-12-27 Jeroen Janssen <[email protected]>
|
||||
* fixed url for System.Windows.Forms in the class status
|
||||
|
||||
2002-12-18 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* configure.in: moved struct tm field tm_gmtoff check before the check
|
||||
for timezone global variable. This makes Timezone work for me (debian
|
||||
sid, linux, x86, which has both the field and the global variables).
|
||||
|
||||
2002-12-10 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/oracle: added file which is
|
||||
a new web page oracle.html
|
||||
|
||||
* doc/ado-net: clean up and add link
|
||||
to oracle.html
|
||||
|
||||
* doc/web/commands
|
||||
* doc/web/makefile: added oracle.html
|
||||
|
||||
2002-12-10 Daniel Morgan <[email protected]>
|
||||
|
||||
* man/Makefile.am: changed sqlsharpcli.1 to sqlsharp.1
|
||||
|
||||
* man/sqlsharpcli.1: renamed to sqlsharp.1
|
||||
|
||||
2002-12-09 Tim Haynes <[email protected]>
|
||||
|
||||
* mono/jit/jit.c
|
||||
* mono/metadata/icall.c: added mono_install_get_config_dir() to
|
||||
utilize the MONO_CFG_DIR environment variable for specifying
|
||||
different machine.configs.
|
||||
|
||||
2002-12-06 Duncan Mak <[email protected]>
|
||||
|
||||
* data/Makefile.am (EXTRA_DIST): Add machine.config
|
||||
(DISTCLEANFILES): Add config.
|
||||
|
||||
2002-11-30 Daniel Morgan <[email protected]>
|
||||
|
||||
* man/sqlsharpcli.1: added file - a man page
|
||||
for SQL# CLI
|
||||
|
||||
* man/Makefile.am: added sqlsharpcli.1 to man_MANS
|
||||
|
||||
2002-11-20 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/firebird: updated web page
|
||||
|
||||
2002-11-19 Mike Kestner <[email protected]>
|
||||
|
||||
* data/Config.in : added the gtk# dll mapping entries
|
||||
|
||||
2002-11-19 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/firebird: updated web page based on input
|
||||
from the firebird .net data provider author
|
||||
|
||||
Mon Nov 18 16:40:34 CET 2002 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in, mono/os/gc_wrapper.h: check that the gc headers have
|
||||
been installed.
|
||||
|
||||
2002-11-12 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/oledb
|
||||
* doc/odbc
|
||||
* doc/mysql
|
||||
* doc/sqlite
|
||||
* doc/sqlclient
|
||||
* doc/tdsclient
|
||||
* doc/sybase
|
||||
* doc/firebird: added web pages
|
||||
for each specific data provider
|
||||
|
||||
* doc/ado-net
|
||||
* doc/postgresql: updated web page
|
||||
with current status
|
||||
|
||||
* doc/web/commands
|
||||
* doc/web/makefile: updated to include
|
||||
new web pages
|
||||
|
||||
2002-11-06 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* autogen.sh: make it work when MONO_PATH is set and it has more than
|
||||
one directory or ends in ":". Also check that the directory added to
|
||||
ACLOCAL_FLAGS and PATH exist (aclocal fails if they don't).
|
||||
|
||||
2002-10-22 Miguel de Icaza <[email protected]>
|
||||
|
||||
* configure.in: Also allow the miss-spelled bohem.
|
||||
|
||||
2002-10-18 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/ado-net
|
||||
* doc/postgresql
|
||||
* doc/tds-providers: cleaned up the web pages
|
||||
|
||||
* doc/web/commands: postgresql.html page was mistyped
|
||||
|
||||
2002-10-18 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/ado-net: updated status of
|
||||
the ADO.NET functionality and providers
|
||||
and added link to tds-providers.html
|
||||
|
||||
* doc/tds-providers: added file to
|
||||
describe the design and status of
|
||||
the SqlClient, SybaseClient, and TdsClient
|
||||
ADO.NET providers.
|
||||
|
||||
* doc/web/makefile
|
||||
* doc/web/command: added new web page
|
||||
tds-providers.html to build of www.go-mono.com web site
|
||||
|
||||
2002-10-17 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/web/makefile
|
||||
* doc/web/commands: web page
|
||||
postgresql needed to be added
|
||||
|
||||
2002-10-13 Mark Crichton <[email protected]>
|
||||
|
||||
* doc/index: Even more spelling errors fixed.
|
||||
|
||||
2002-10-13 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/adonet: updated status of all providers, added links,
|
||||
and added information
|
||||
about the Mono.Data.SqliteClient provider that
|
||||
Vladimir Vukicevic contributed. Added Brian Ritchie's
|
||||
and Vladimir Vukicevic's email addresses as
|
||||
people to contact about ADO.NET in Mono.
|
||||
Added information about SQL#, configuration tools,
|
||||
and an ADO.NET Multiplexor, etc...
|
||||
|
||||
2002-10-10 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/index: corrected some mistypes
|
||||
|
||||
* doc/adonet: updated the status and plans of all the ADO.NET providers
|
||||
and moved PostgreSQL specific stuff to doc/postgresql
|
||||
|
||||
* doc/postgresql: added new file to detail
|
||||
the status of the PostgreSQL ADO.NET provider
|
||||
and provide test notes for setting it up
|
||||
|
||||
2002-10-09 Daniel Morgan <[email protected]>
|
||||
|
||||
* data/config.in: add entry for MySQL native shared libraries
|
||||
which are different on Windows and Linux
|
||||
|
||||
2002-10-04 Diego Sevilla Ruiz <[email protected]>
|
||||
|
||||
* doc/ccvs: Fixed some ugly formatting.
|
||||
|
||||
2002-10-03 Dick Porter <[email protected]>
|
||||
|
||||
* acconfig.h:
|
||||
* configure.in: Freebsd pthread_t is a pointer
|
||||
|
||||
2002-10-01 Duncan Mak <[email protected]>
|
||||
|
||||
* mono/os/Makefile.am: Add gc_wrapper.h.
|
||||
@@ -1105,4 +634,3 @@ Wed Jul 11 00:36:36 CEST 2001 Paolo Molaro <[email protected]>
|
||||
|
||||
* NEWS:
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
SUBDIRS = @libgc_dir@ mono doc docs runtime scripts man data
|
||||
|
||||
dnl EXTRA_SUBDIRS = libgc
|
||||
SUBDIRS = mono doc docs runtime scripts man data
|
||||
|
||||
EXTRA_DIST= mono.pc.in mono.spec.in
|
||||
|
||||
|
||||
@@ -1,777 +1,3 @@
|
||||
Hello everyone!
|
||||
|
||||
We are releasing a new version of Mono, Mono 0.22. A new release
|
||||
is made today because of the few recent bug-fixes that were committed
|
||||
to CVS.
|
||||
|
||||
Source code and binaries for this release can be found on the
|
||||
web page,
|
||||
|
||||
http://www.go-mono.com/download.html
|
||||
|
||||
The URLs for the sources are:
|
||||
|
||||
* MCS package (the Class Libraries, C# and VB.NET compiler
|
||||
and other assorted tools written in Managed code):
|
||||
|
||||
http://www.go-mono.com/archive/mcs-0.22.tar.gz
|
||||
|
||||
* Mono package (the Runtime engine and JIT compiler):
|
||||
|
||||
http://www.go-mono.com/archive/mono-0.22.tar.gz
|
||||
|
||||
RPM packages for this release can be downloaded from the web-page
|
||||
as well as from the 'Mono' channel on Red Carpet. Debian packages will
|
||||
appear on the download page later, as well as an installer for our
|
||||
Windows users.
|
||||
|
||||
Since last Thursday, 320 commits have been made to our CVS
|
||||
repository. These following hackers contributed to Mono since version
|
||||
0.21:
|
||||
|
||||
Aleksey Demakov, Alexandre Pigolkine, Atsushi Enomoto, Elan
|
||||
Feingeld, Dick Porter, Dietmar Maurer, Duncan Mak, Gonzalo
|
||||
Paniagua, Ian MacLean, Jackson Harper, Jean-Marc Andre, Jerome
|
||||
Laban, Lluis Sanchez, Martin Baulig, Miguel de Icaza, Nick
|
||||
Drochak, Paolo Molaro, Pedro Martinez, Per Ameng, Peter Williams,
|
||||
Rafael Teixeira, Reggie Burnett, Sebastien Pouliot, Tim Coleman
|
||||
and Zoltan Varga.
|
||||
|
||||
Highlights:
|
||||
|
||||
* The "MemoryStream" bug.
|
||||
This bug affected a lot of classes, and made them crashy,
|
||||
database code, XML parsing and a few others were
|
||||
crashing. Thanks to Gonzalo for fixing this bug.
|
||||
|
||||
* System.Data:
|
||||
More bug fixes from Aleksey and Tim.
|
||||
|
||||
* Reflection:
|
||||
Zoltan continues to provide fixes to our Reflection.Emit code
|
||||
to host IKVM.
|
||||
|
||||
* Remoting:
|
||||
Lluis added support for activation using activation
|
||||
attributes.
|
||||
|
||||
* PEToolkit:
|
||||
Jackson imported the PEAPI package from the Queensland
|
||||
University of Technology in Australia. This will replace the
|
||||
existing Mono.PEToolkit for our ILasm back-end.
|
||||
|
||||
* Windows Forms:
|
||||
More fixes from Reggie and Alexandre.
|
||||
|
||||
* System.Web.Mail:
|
||||
Per has been working on this namespace. He announces recently
|
||||
that all major parts of System.Web.Mail has now been implemented.
|
||||
|
||||
* System.Web.Mobile:
|
||||
Gaurav continues to make progress here.
|
||||
|
||||
* Misc:
|
||||
|
||||
Ian MacLean contributed a /compile flag to monoresgen and
|
||||
assorted bug-fixes and improvements from the rest of the team.
|
||||
|
||||
|
||||
My name is Duncan Mak, and I just made my first Mono release.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Hello everyone!
|
||||
|
||||
The Mono Team introduces the best Mono release so far we have
|
||||
done. Thanks to everyone who contributed fixes, code, ideas, and bug
|
||||
reports.
|
||||
|
||||
Mono 0.20 has been released, it is available at the usual location:
|
||||
|
||||
http://www.go-mono.com/download.html
|
||||
|
||||
This is a truly heroic release of Mono. Major architectural
|
||||
chunks that were missing, or were miss-implemented have been fixed in
|
||||
this release, and we are very proud of it. Please see the list of
|
||||
features, because there is no short way of introducing just how good
|
||||
this release is. A big thanks goes to Piers for setting up a
|
||||
Tinderbox that monitors problems with the Mono CVS repository.
|
||||
|
||||
We released packages for SuSE 8.0, Mandrake 8.2, and various
|
||||
Red Hat releases. It is also available from Red Carpet on the Mono
|
||||
channel.
|
||||
|
||||
Source code for Mono, MCS, the Mono Debugger, XSP is available as
|
||||
well from that web page. The sources are:
|
||||
|
||||
MCS package (Class Libraries, C# and VB.NET compiler and managed tools):
|
||||
|
||||
http://www.go-mono.com/archive/mcs-0.20.tar.gz
|
||||
|
||||
Mono package (Runtime engine, JIT compiler):
|
||||
|
||||
http://www.go-mono.com/archive/mono-0.20.tar.gz
|
||||
|
||||
XSP package (XSP test web server for ASP.NET webforms):
|
||||
|
||||
http://www.go-mono.com/archive/xsp-0.3.tar.gz
|
||||
|
||||
This release is brought to you by: Alvaro del Castillo, Alan Tam,
|
||||
Alp Toker, Alejandro Sánchez, Alexandre Pigolkin, Atsushi Enomoto,
|
||||
Brian Ritchie, Christopher Bockner, Daniel Lopez, Daniel Morgan,
|
||||
Dennis Hayes, Dick Porter, Dietmar Maurer, Duncan Mak, Gaurav Vaish,
|
||||
Gonzalo Paniagua, Jackson Harper, Jaime Anguiano, Jeff Stedfast,
|
||||
Johannes Roith, John Sohn, Jonathan Pryor, "Lee Mallabone, "Lluis
|
||||
Sanchez, "Marco Ridoni, Mark Crichton, Martin Baulig, Martin Willemoes
|
||||
Hansen, Miguel de Icaza, Mike Kestner, Nick Drochak, Paolo Molaro,
|
||||
Patrik Torstensson, Pedro Martinez, Per Arneng, Peter Williams, Petr
|
||||
Danecek, Piers Haken, Radek Doulik, Rafael Teixeira, Rodrigo Moya,
|
||||
Sebastien Pouliot, Tim Coleman, Ville Palo, and Zoltan Varga.
|
||||
|
||||
They commited 1810 changes to CVS patches in the past 33 days.
|
||||
|
||||
* New in this release
|
||||
|
||||
* Zoltan and IKVM
|
||||
|
||||
Zoltan's patches to run Jeroen's IKVM (the Java VM that
|
||||
translates JVM bytecodes into .NET bytecodes) are in.
|
||||
|
||||
* Remoting.
|
||||
|
||||
The remoting team's patches that were held off on the previous
|
||||
release are here. Lluis and Patrik have done a fantastic job
|
||||
in getting remoting to work. Many low-level runtime engine
|
||||
changes, and plenty of work on the class-library stuff.
|
||||
|
||||
Lluis has posted a couple of sample applications to the
|
||||
mailing list, you can try those out.
|
||||
|
||||
The new release includes a working BinaryFormatter and
|
||||
BinaryFormatterSink. It means that together with TcpChannel
|
||||
it is possible to make remote calls with any type of
|
||||
parameters and return values, including value types,
|
||||
MarshalByRefObject types (that are properly
|
||||
marshalled/unmarshalled), delegates, enums, etc.
|
||||
|
||||
RemotingConfiguration is partially implemented. It cannot read
|
||||
from config files, but manual configuration using the api is
|
||||
fully working.
|
||||
|
||||
Implemented full support for client activated types and for
|
||||
well known objects (both singleton and single call).
|
||||
|
||||
Lease manager fully working (it manages the lifetime of server
|
||||
objects).
|
||||
|
||||
Implemented interception of the new operator, so it is
|
||||
possible to create a remote object using "new", if the type is
|
||||
properly registered in RemotingConfiguration.
|
||||
|
||||
In Lluis' words: `Basically, 0.20 will have almost all needed
|
||||
for a distributed application with Remoting'
|
||||
|
||||
* New threading semantics, IO-layer
|
||||
|
||||
Dick Porter in a couple of weeks has heroically redone much of
|
||||
the threading support to match the .NET behavior (details are
|
||||
on the .NET threading book as posted on the Mono site).
|
||||
|
||||
He also did a lot of bug fixes in the IO/threading space. The
|
||||
threading implementation now contains a new and faster Monitor
|
||||
implementation, as well as a correct Pulse()/Wait()
|
||||
implementation.
|
||||
|
||||
GC thread finalization has been re-enabled. This means that
|
||||
finalizers will be ran on a separate thread, as done in the
|
||||
Microsoft.NET Framework. This might expose some bugs on
|
||||
existing finalizer code.
|
||||
|
||||
* Moved to NUnit2
|
||||
|
||||
Nick and Gonzalo helped us move to the new NUnit2 platform for
|
||||
all of our tests. A big applause goes to them.
|
||||
|
||||
* Cross Appdomain invocations work now.
|
||||
|
||||
ASP.NET and NUnit2 both used cross appdomain invocations, we
|
||||
have fixed a number of problems, and they are now functional.
|
||||
|
||||
The AppDomain fixes and the Remoting fixes have allowed us to
|
||||
remove a number of hacks in the ASP.NET implementation that
|
||||
were previously there.
|
||||
|
||||
Implemented CrossAppDomainChannel, for calls between domains.
|
||||
|
||||
* C# Compiler and Debugging.
|
||||
|
||||
When generating debugging information in the compiler (with
|
||||
-debug, -g or -debug+) the compiler will embed the debugging
|
||||
information into the resulting executable instead of
|
||||
generating a separate file. Very nice.
|
||||
|
||||
Generating debugging information has also improved vastly
|
||||
performance-wise, and now it is possible to always use
|
||||
debugging builds for software development.
|
||||
|
||||
A number of bugs were fixed on the compiler as well and
|
||||
by using the Mono profiler we have reduced the memory
|
||||
consumption and accelerated the compiler.
|
||||
|
||||
Thanks to Jackson, Martin, Paolo and for helping here.
|
||||
|
||||
* VB.NET Compiler.
|
||||
|
||||
Plenty of new features are included in the compiler in our
|
||||
path to conformance. See <FIXME:get-url-for-posting> for
|
||||
details on the status of the compiler, and the pieces missing.
|
||||
|
||||
* ILasm and Mono.PEToolkit.
|
||||
|
||||
Work on the IL assembler has resumed, but it is not yet ready
|
||||
for production use. The Mono IL Assembler uses the
|
||||
Mono.PEToolkit library done by Sergey and Jackson to
|
||||
manipulate CIL image files.
|
||||
|
||||
* Cryptographic work.
|
||||
|
||||
Sebastien has provided a cert2spc and secutil tools for
|
||||
certificate management. This is the first release that ships
|
||||
an assembly for System.Security
|
||||
|
||||
Also a new internal assembly used only on Windows allows Mono
|
||||
users to use the unmanaged crypto providers.
|
||||
|
||||
* System.XML
|
||||
|
||||
Atsushi has continued to improve the work on our XML
|
||||
implementation: fixing bugs and more closely matching the
|
||||
Microsoft implementation.
|
||||
|
||||
* More PowerPC/Alpha support.
|
||||
|
||||
Taylor Christopher has contributed more code generation macros
|
||||
for PPC and Laramie Leavitt for Alpha.
|
||||
|
||||
* System.XML.Xsl
|
||||
|
||||
Gonzalo continued the implementation of our XSLT transformation
|
||||
API (custom .NET functions are still missing though). It no
|
||||
longer uses temporary files to apply transformations. Thanks
|
||||
to an idea from Zdravko Tashev. Xslt Web controls work as
|
||||
part of this fix.
|
||||
|
||||
* ASP.NET
|
||||
|
||||
Gonzalo has cleaned up a lot the code base, and now our test
|
||||
server supports a --root and --virtual command line options
|
||||
for better control.
|
||||
|
||||
Also, now we generate a much nicer error page on errors. We
|
||||
are looking for volunteers to improve the default look of this
|
||||
page.
|
||||
|
||||
Authentication is now supported
|
||||
|
||||
* Mobile Controls.
|
||||
|
||||
Gaurav Vaish continues on his quest to complete the
|
||||
implementation of the Mobile controls. These controls are
|
||||
required to run a stock IBuySpy application.
|
||||
|
||||
* Class Libraries:
|
||||
|
||||
New Mono.Posix class library that contains classes for working
|
||||
on a Posix systems. Things like Unix domain sockets are here.
|
||||
|
||||
* System.Windows.Forms
|
||||
|
||||
Alexandre Pigolkine continues to contribute more code to our
|
||||
Windows.Forms implementation. Currently it only runs on
|
||||
Windows (or in Linux without GC enabled, due to the
|
||||
pthread/Wine threading library mismatch. This is being
|
||||
actively addressed as part of the Wine work due to the
|
||||
movement to the new thread implementation available in RH 8.1).
|
||||
|
||||
* Database providers
|
||||
|
||||
Christopher Bockner has updated his DB2 database provider (now
|
||||
with prepared statement functionality) and Tim Coleman has
|
||||
continued work on the Oracle database provider (welcome back
|
||||
Tim!)
|
||||
|
||||
* Database code.
|
||||
|
||||
Dan Morgan continues to develop core components in System.Data
|
||||
(and now we welcome Alan Tam to the System.Data core hackers)
|
||||
|
||||
The SQL# tool now supports MySQLNet, Npgsql, DB2Client, and
|
||||
Oracle clients.
|
||||
|
||||
* Runtime
|
||||
|
||||
mono --profile now performs memory allocation profiling too.
|
||||
|
||||
* Runtime fixes.
|
||||
|
||||
We now support multi-module with external file reference
|
||||
assemblies.
|
||||
|
||||
The above in English means that we can now run Eiffel.NET code
|
||||
in Mono.
|
||||
|
||||
* Monograph:
|
||||
|
||||
More statistics supported now.
|
||||
|
||||
* System.Web.Mail
|
||||
|
||||
Per has contributed the code for this namespace.
|
||||
|
||||
* Bugs
|
||||
|
||||
Plenty of bugs were closed.
|
||||
-------------------------------------------------------------------------
|
||||
Hello everyone!
|
||||
|
||||
We have made a new release of Mono available. Despite the fact
|
||||
that we just did Mono 0.18, this release is packed with new features.
|
||||
|
||||
* Availability.
|
||||
|
||||
Mono 0.19 is available in package format from:
|
||||
|
||||
http://www.go-mono.com/download.html
|
||||
|
||||
We released packages for SuSE 8.0, Mandrake 8.2, Debian and various
|
||||
Red Hat releases. It is also available from Red Carpet on the Mono
|
||||
channel.
|
||||
|
||||
Source code for Mono, MCS, the Mono Debugger, XSP is available as
|
||||
well from that web page.
|
||||
|
||||
* New in this release
|
||||
|
||||
* Remoting news:
|
||||
|
||||
Lluis has implemented and documented the Binary formatter
|
||||
Woohoo! He has done a lot of work as well to support
|
||||
remoting.
|
||||
|
||||
Patrik has also been working heavily on fixing a
|
||||
number of remoting related bugs and missing features.
|
||||
|
||||
Ajay also implemented 1-d array serialization in System.Xml
|
||||
|
||||
* New database provider: IBM DB2
|
||||
|
||||
Christopher Bockner has contributed a DB2 data
|
||||
provider for System.Data. We have a very complete
|
||||
range of data providers.
|
||||
|
||||
* System.Web.Mobile
|
||||
|
||||
Gaurav has started work on this assembly, this will
|
||||
allow us to run the unmodified reference ASP.NET
|
||||
applications that were designed to support Mobile
|
||||
browsing.
|
||||
|
||||
* System.Data and System.XML:
|
||||
|
||||
More implementation work on XmlDataDocument from Ville
|
||||
and plenty of fixes from Atsushi.
|
||||
|
||||
* MacOS patches:
|
||||
|
||||
Paolo integrated John Duncan's and Benjamin Reed
|
||||
patches to make Mono run on MacOS X out of the box.
|
||||
|
||||
* IsolatedStorage
|
||||
|
||||
The initial implementation of it was done by Jonathan
|
||||
Pryor and included in this release.
|
||||
|
||||
* Compilers:
|
||||
|
||||
More work on the Mono Visual Basic compiler (it is now
|
||||
included in the packages).
|
||||
|
||||
Plenty of bug fixes from Jackson, Miguel to the C#
|
||||
compiler.
|
||||
|
||||
Patches from Francesco and Daniel to the VB.NET
|
||||
support runtime.
|
||||
|
||||
* Debugger support
|
||||
|
||||
Plenty of updates to run the new Mono Debugger from Martin.
|
||||
|
||||
* Main missing bits:
|
||||
|
||||
Some of everyone's favorite patches or code chunks have not yet
|
||||
been integrated, hopefully Mono 0.20 will have them:
|
||||
|
||||
* Zoltan's patch to run IKVM is not yet on this release
|
||||
|
||||
* Some parts of Patrik's remoting code did not make it to the
|
||||
release either.
|
||||
|
||||
* Reggie's MySQL native provider is also missing.
|
||||
|
||||
Enjoy!
|
||||
Miguel.
|
||||
-------------------------------------------------------------------------
|
||||
Hello everyone!
|
||||
|
||||
We have made a new release of Mono available. Despite the fact
|
||||
that we just did Mono 0.18, this release is packed with new features.
|
||||
|
||||
* Availability.
|
||||
|
||||
Mono 0.19 is available in package format from:
|
||||
|
||||
http://www.go-mono.com/download.html
|
||||
|
||||
We released packages for SuSE 8.0, Mandrake 8.2, Debian and various
|
||||
Red Hat releases. It is also available from Red Carpet on the Mono
|
||||
channel.
|
||||
|
||||
Source code for Mono, MCS, the Mono Debugger, XSP is available as
|
||||
well from that web page.
|
||||
|
||||
* New in this release
|
||||
|
||||
* Remoting news:
|
||||
|
||||
Lluis has implemented and documented the Binary formatter
|
||||
Woohoo! He has done a lot of work as well to support
|
||||
remoting.
|
||||
|
||||
Patrik has also been working heavily on fixing a
|
||||
number of remoting related bugs and missing features.
|
||||
|
||||
Ajay also implemented 1-d array serialization in System.Xml
|
||||
|
||||
* New database provider: IBM DB2
|
||||
|
||||
Christopher Bockner has contributed a DB2 data
|
||||
provider for System.Data. We have a very complete
|
||||
range of data providers.
|
||||
|
||||
* System.Web.Mobile
|
||||
|
||||
Gaurav has started work on this assembly, this will
|
||||
allow us to run the unmodified reference ASP.NET
|
||||
applications that were designed to support Mobile
|
||||
browsing.
|
||||
|
||||
* System.Data and System.XML:
|
||||
|
||||
More implementation work on XmlDataDocument from Ville
|
||||
and plenty of fixes from Atsushi.
|
||||
|
||||
* MacOS patches:
|
||||
|
||||
Paolo integrated John Duncan's and Benjamin Reed
|
||||
patches to make Mono run on MacOS X out of the box.
|
||||
|
||||
* IsolatedStorage
|
||||
|
||||
The initial implementation of it was done by Jonathan
|
||||
Pryor and included in this release.
|
||||
|
||||
* Compilers:
|
||||
|
||||
More work on the Mono Visual Basic compiler (it is now
|
||||
included in the packages).
|
||||
|
||||
Plenty of bug fixes from Jackson, Miguel to the C#
|
||||
compiler.
|
||||
|
||||
Patches from Francesco and Daniel to the VB.NET
|
||||
support runtime.
|
||||
|
||||
* Debugger support
|
||||
|
||||
Plenty of updates to run the new Mono Debugger from Martin.
|
||||
|
||||
* Main missing bits:
|
||||
|
||||
Some of everyone's favorite patches or code chunks have not yet
|
||||
been integrated, hopefully Mono 0.20 will have them:
|
||||
|
||||
* Zoltan's patch to run IKVM is not yet on this release
|
||||
|
||||
* Some parts of Patrik's remoting code did not make it to the
|
||||
release either.
|
||||
|
||||
* Reggie's MySQL native provider is also missing.
|
||||
|
||||
Enjoy!
|
||||
Miguel.
|
||||
------------------------------------------------------------------------------
|
||||
Happy new year!
|
||||
|
||||
The Mono team is proud to release Mono 0.18, with plenty of bug
|
||||
fixes and improvements. If you are a happy 0.17 user, this
|
||||
release is a happiness extension release. Many bugs in the
|
||||
runtime, class libraries and C# compiler have been fixed.
|
||||
|
||||
Also, our special envoy in Japan has reported that there is
|
||||
some naming confussion about the naming of Mono, as can be
|
||||
seen in the following documentary material:
|
||||
|
||||
Atsushi Enomoto shows the source of confussion:
|
||||
|
||||
http://primates.ximian.com/~duncan/gallery/Duncan-in-Tokyo/DSCN0702
|
||||
|
||||
Nick and Duncan echo it:
|
||||
|
||||
http://primates.ximian.com/~duncan/gallery/Duncan-in-Tokyo/DSCN0703
|
||||
|
||||
* Availability
|
||||
|
||||
Mono 0.18 packages and source code is available for download from:
|
||||
|
||||
http://www.go-mono.com/download.html
|
||||
|
||||
Those using Red Carpet on Linux can install Mono 0.18 from
|
||||
the Mono channel. The packages have already been pushed for
|
||||
you.
|
||||
|
||||
At release time we have packages for Red Hat 8.0, 7.3,
|
||||
7.2 and 7.1 and Mandrake 8.2.
|
||||
|
||||
* Contributors to this release
|
||||
|
||||
This release is brought to you by:
|
||||
|
||||
Alejandro Sanchez, Alp Toker, Atsushi Enomoto, Cesar Octavio
|
||||
Lopez Netaren, Daniel Lopez (mod_mono), Daniel Morgan, Dennis
|
||||
Hayes, Dick Porter, Dietmar Maurer, Duncan Mak, Eduardo
|
||||
Garcia, Gaurav Vaish, Gonzalo Paniagua, Jackson Harper, Jaime
|
||||
Anguiano, Jeroen Janssen, Johannes Roith, Jonathan Pryor, Juli
|
||||
Mallett, Lluis Sanchez, Marco Ridoni, Martin Baulig, Miguel de
|
||||
Icaza, Nick Drochak, Paolo Molaro, Patrik Torstensson, Piers
|
||||
Haken, Rachel Hestilow, Rafael Teixeira, Ravi Pratap,
|
||||
Sebastian Pouliot, Tim Coleman, Tim Hayes, Ville Palo, Zoltan
|
||||
Varga.
|
||||
|
||||
* New in this release
|
||||
|
||||
VB.NET compiler:
|
||||
|
||||
Many improvements to the Mono VB.NET compiler.
|
||||
|
||||
ASP.NET:
|
||||
|
||||
Plenty of bug fixes in ASP.NET. Larger applications
|
||||
can now be run with it. The authentication system has
|
||||
been deployed, most changes are from Gonzalo.
|
||||
|
||||
We have a modified IBuySpy running (without Xslt)
|
||||
|
||||
If you want to run ASP.NET you can run it with either
|
||||
our XSP proof-of-concept server, or with Daniel's
|
||||
Apache module that can be fetched from CVS (module
|
||||
name: mod_apache)
|
||||
|
||||
Type Reflector:
|
||||
|
||||
A Console, Gtk# and Windows.Forms tool to browse
|
||||
compiled assemblies and examine the types on it, from
|
||||
Jonathan Pryor.
|
||||
|
||||
Moving to NUnit 2.0
|
||||
|
||||
Nick continues the work on moving our test suite to NUnit 2.0
|
||||
|
||||
Mobile.Controls:
|
||||
|
||||
Gaurav has started work on the Mobile controls, which
|
||||
are required to run some of the reference applications
|
||||
in full-mode like IBuySpy.
|
||||
|
||||
Remoting:
|
||||
|
||||
The remoting infrastructure has got a big boost from
|
||||
Lluis in this release.
|
||||
|
||||
System.Data/XML
|
||||
|
||||
Ville has been working on improving our System.Data
|
||||
classes in the XML assembly.
|
||||
|
||||
Crypto:
|
||||
|
||||
Plenty of new crypto from Sebastien as well. A new
|
||||
web page in our site can be used to track this.
|
||||
|
||||
http://www.go-mono.com/crypto.html
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Hello!
|
||||
|
||||
Version 0.17 of Mono has been released.
|
||||
|
||||
There are plenty of new features, bug fixes, new classes,
|
||||
performance improvements, optimizations and much more
|
||||
available in this release.
|
||||
|
||||
* Stats
|
||||
|
||||
2605 cvs commits to the Mono repository since October 1st, an
|
||||
average of 37 commits per day including weekends.
|
||||
|
||||
212 commits to the Mono module.
|
||||
1438 commits to the MCS module.
|
||||
|
||||
* Mono Improvements:
|
||||
|
||||
Work has begun to make the runtime run a finalizer thread and
|
||||
invoke all the finalizers from this thread. This is the same
|
||||
behavior as Java and the Microsoft runtime, but it is disabled
|
||||
on this build.
|
||||
|
||||
Integrated the s390 work from Neale Ferguson.
|
||||
|
||||
Beginning of the work for pre-compiling code (Ahead of time
|
||||
compilation) for Mono (based on the early work of Zoltan).
|
||||
|
||||
New option `--noboundscheck' for benchmark purposes, it
|
||||
disables array bound checks.
|
||||
|
||||
Uses mmap instead of SysV shared memory for the Windows API
|
||||
emulation layer.
|
||||
|
||||
Plenty of bug fixes, improvements and integration with the
|
||||
upper layer class libraries.
|
||||
|
||||
New exception handling code uses the GCC native support for
|
||||
stack-walking if available and gives big performance boost
|
||||
(15% on mcs bootstrap).
|
||||
|
||||
A lot of the work in the new release of Mono is required for
|
||||
the Mono Debugger (which will be released separately). The
|
||||
Mono debugger is interesting, because it can debug both
|
||||
managed and unmanaged applications, but it only supports the
|
||||
JITer for debugging.
|
||||
|
||||
Dick, Dietmar, Gonzalo, Martin and Paolo were in charge of
|
||||
most of these changes.
|
||||
|
||||
* Compiler improvements:
|
||||
|
||||
Many bug fixes as usual, better C# compliancy.
|
||||
|
||||
Performance improvements. The new release of the Mono C#
|
||||
compiler is 37% faster than the previous version (self-compile
|
||||
is down to 8 seconds). On my P4 1.8Ghz machine, the Mono C#
|
||||
compiler compiles (342,000 lines per minute).
|
||||
|
||||
Thanks to go Ravi and Martin for helping out with the bug
|
||||
fixing hunt.
|
||||
|
||||
* Cryptography and Security classes
|
||||
|
||||
Sebastien Pouliot and Andrew Birkett were extremely busy
|
||||
during the past two months working on the cryptography
|
||||
classes, many of the crypto providers are now working
|
||||
|
||||
Jackson on the other hand helped us with the security
|
||||
classes, he said about those:
|
||||
|
||||
`Writing security classes is the most exciting thing I have
|
||||
ever done, I can not wait to write more of them'.
|
||||
|
||||
* ASP.NET:
|
||||
|
||||
We have now moved the code from the XSP server (which was our
|
||||
test bed for ASP.NET) into the right classes inside
|
||||
System.Web, and now any web server that was built by using the
|
||||
System.Web hosting interfaces can be used with Mono.
|
||||
|
||||
The sample XSP server still exists, but it is now just a
|
||||
simple implementation of the WorkerRequest and ApplicationHost
|
||||
classes and can be used to test drive ASP.NET. A big thanks
|
||||
goes to Gonzalo who worked on this night and day (mostly
|
||||
night).
|
||||
|
||||
Gaurav keeps helping us with the Web.Design classes, and
|
||||
improving the existing web controls.
|
||||
|
||||
* ADO.NET:
|
||||
|
||||
New providers are available in this release. The relentless
|
||||
System.Data team (Brian, Dan, Rodrigo, Tim and Ville) are
|
||||
hacking non-stop on the databse code. Improving existing
|
||||
providers, and new providers.
|
||||
|
||||
The new providers on this release:
|
||||
|
||||
* Oracle
|
||||
* MS SQL
|
||||
* ODBC
|
||||
* Sybase
|
||||
* Sqlite (for embedded use).
|
||||
|
||||
Many regression tests have been added as well (Ville has been
|
||||
doing a great job here).
|
||||
|
||||
Brian also created a DB provider multiplexor (The ProviderFactory)
|
||||
|
||||
Stuart Caborn contributed Writing XML from a DataSet.
|
||||
Luis Fernandez contributed constraint handling code.
|
||||
|
||||
Also there is new a Gtk# GUI tool from Dan that can be used to
|
||||
try out various providers.
|
||||
|
||||
* System.XML:
|
||||
|
||||
Atsushi has taken the lead in fixing and plugging the missing
|
||||
parts of the System.XML namespace, many fixes, many
|
||||
improvements.
|
||||
|
||||
* CodeDom and the C# provider.
|
||||
|
||||
Jackson Harper has been helping us with the various interface
|
||||
classes from the CodeDOM to the C# compiler, in this release
|
||||
a new assembly joins us: Cscompmgd. It is a simple assembly,
|
||||
and hence Microsoft decided not to waste an entire "System"
|
||||
"dot" on it.
|
||||
|
||||
* Testing
|
||||
|
||||
Nick Drochak has integrated the new NUnit 2.0 system.
|
||||
|
||||
* Monograph:
|
||||
|
||||
Monograph now has a --stats option to get statistics on
|
||||
assembly code.
|
||||
|
||||
|
||||
CVS Contributors to this release:
|
||||
|
||||
Alejandro Sanchez, Alp Toker, Andrew Birkett, Atsushi Enomoto,
|
||||
Brian Ritchie, Cesar Octavio Lopez Nataren, Chris Toshok,
|
||||
Daniel Morgan, Daniel Stodden, Dennis Hayes, Dick Porter,
|
||||
Diego Sevilla, Dietmar Maurer, Duncan Mak, Eduardo Garcia,
|
||||
Ettore Perazzoli, Gaurav Vaish, Gonzalo Paniagua, Jackson
|
||||
Harper, Jaime Anguiano, Johannes Roith, John Sohn, Jonathan
|
||||
Pryor, Kristian Rietveld, Mads Pultz, Mark Crichton, Martin
|
||||
Baulig, Martin Willemoes Hansen, Miguel de Icaza, Mike
|
||||
Kestner, Nick Drochak, Nick Zigarovich, Paolo Molaro, Patrik
|
||||
Torstensson, Phillip Pearson, Piers Haken, Rachel Hestilow,
|
||||
Radek Doulik, Rafael Teixeira, Ravi Pratap, Rodrigo Moya,
|
||||
Sebastien Pouliot, Tim Coleman, Tim Haynes, Ville Palo,
|
||||
Vladimir Vukicevic, and Zoltan Varga.
|
||||
|
||||
(Am sorry, I could not track everyone from the ChangeLog
|
||||
messages, I apologize in advance for the missing
|
||||
contributors).
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Hello!
|
||||
|
||||
Version 0.16 of Mono has been released! This is mostly a bug
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#undef HAVE_SOL_TCP
|
||||
#undef HAVE_IP_PKTINFO
|
||||
#undef HAVE_STRUCT_IP_MREQN
|
||||
#undef HAVE_STRUCT_IP_MREQ
|
||||
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
|
||||
#undef USE_MONO_MUTEX
|
||||
#undef HAVE_LARGE_FILE_SUPPORT
|
||||
@@ -14,12 +13,8 @@
|
||||
#undef NAME_DEV_RANDOM
|
||||
#undef HAVE_CRYPT_RNG
|
||||
#undef HAVE_BOEHM_GC
|
||||
#undef USE_INCLUDED_LIBGC
|
||||
#undef DISABLE_SHARED_HANDLES
|
||||
#undef HAVE_TIMEZONE
|
||||
#undef HAVE_TM_GMTOFF
|
||||
#undef MONO_SIZEOF_SUNPATH
|
||||
#undef NEED_LINK_UNLINK
|
||||
#undef PTHREAD_POINTER_ID
|
||||
#undef HAVE_GC_H
|
||||
#undef HAVE_GC_GCJ_MALLOC
|
||||
@@ -8,17 +8,8 @@ srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
if [ -n "$MONO_PATH" ]; then
|
||||
# from -> /mono/lib:/another/mono/lib
|
||||
# to -> /mono /another/mono
|
||||
for i in `echo ${MONO_PATH} | tr ":" " "`; do
|
||||
i=`dirname ${i}`
|
||||
if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then
|
||||
ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS"
|
||||
fi
|
||||
if [ -n "{i}" -a -d "${i}/bin" ]; then
|
||||
PATH="${i}/bin:$PATH"
|
||||
fi
|
||||
done
|
||||
ACLOCAL_FLAGS="-I $MONO_PATH/share/aclocal $ACLOCAL_FLAGS"
|
||||
PATH="$MONO_PATH/bin:$PATH"
|
||||
export PATH
|
||||
fi
|
||||
|
||||
@@ -117,12 +108,6 @@ automake --add-missing --gnu $am_opt ||
|
||||
echo "Running autoconf ..."
|
||||
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
|
||||
|
||||
if test -d $srcdir/libgc; then
|
||||
echo Running libgc/autogen.sh ...
|
||||
(cd $srcdir/libgc ; NOCONFIGURE=1 ./autogen.sh "$@")
|
||||
echo Done running libgc/autogen.sh ...
|
||||
fi
|
||||
|
||||
|
||||
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
|
||||
@@ -1,93 +1,36 @@
|
||||
AC_INIT(README)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono,0.25)
|
||||
AM_INIT_AUTOMAKE(mono, 0.16)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
dnl
|
||||
dnl libgc checks
|
||||
dnl
|
||||
|
||||
gc_headers=no
|
||||
gc=included
|
||||
use_included_gc=no
|
||||
|
||||
if test -d $srcdir/libgc ; then
|
||||
gc_default=included
|
||||
else
|
||||
gc_default=boehm
|
||||
fi
|
||||
|
||||
#
|
||||
# These are the flags that need to be stored in the mono.pc file for
|
||||
# compiling code that will embed Mono
|
||||
#
|
||||
libmono_cflags=""
|
||||
libmono_ldflags=""
|
||||
AC_SUBST(libmono_cflags)
|
||||
AC_SUBST(libmono_ldflags)
|
||||
|
||||
# Thread configuration inspired by sleepycat's db
|
||||
AC_MSG_CHECKING([host platform characteristics])
|
||||
libgc_threads=no
|
||||
case "$host" in
|
||||
*-*-mingw*|*-*-cygwin*)
|
||||
platform_win32=yes
|
||||
AC_DEFINE(PLATFORM_WIN32)
|
||||
CC="gcc -mno-cygwin"
|
||||
HOST_CC="gcc"
|
||||
CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
|
||||
CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS"
|
||||
libdl=
|
||||
libgc_threads=win32
|
||||
gc_default=boehm
|
||||
;;
|
||||
*-*-*netbsd*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
libmono_ldflags="-pthread"
|
||||
AC_DEFINE(NEED_LINK_UNLINK)
|
||||
libdl=
|
||||
libgc_threads=pthreads
|
||||
;;
|
||||
*-*-*freebsd*|*-*-*openbsd*)
|
||||
*-*-*bsd*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
|
||||
libmono_cflags="-D_THREAD_SAFE"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
libmono_ldflags="-pthread"
|
||||
AC_DEFINE(NEED_LINK_UNLINK)
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
libgc_threads=pthreads
|
||||
;;
|
||||
*-*-linux*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -DMONO_USE_EXC_TABLES -D_GNU_SOURCE -D_REENTRANT -fexceptions"
|
||||
libmono_cflags="-DMONO_USE_EXC_TABLES -fexceptions -D_REENTRANT"
|
||||
libmono_ldflags="-lpthread"
|
||||
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT"
|
||||
libdl="-ldl"
|
||||
libgc_threads=pthreads
|
||||
;;
|
||||
*-*-solaris*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT"
|
||||
AC_DEFINE(NEED_LINK_UNLINK)
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
libgc_threads=solaris
|
||||
;;
|
||||
*-*-darwin*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE"
|
||||
libmono_cflags="-D_THREAD_SAFE"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
libmono_ldflags="-pthread"
|
||||
AC_DEFINE(NEED_LINK_UNLINK)
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
libgc_threads=no
|
||||
gc_default=none
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([*** Please add $host to configure.in checks!])
|
||||
@@ -127,7 +70,7 @@ AC_HEADER_STDC
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h sys/un.h)
|
||||
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h)
|
||||
|
||||
# for mono/metadata/debug-symfile.c
|
||||
AC_CHECK_HEADERS(elf.h)
|
||||
@@ -180,72 +123,37 @@ AC_SUBST(GLIB_LIBS)
|
||||
AC_SUBST(GMODULE_CFLAGS)
|
||||
AC_SUBST(GMODULE_LIBS)
|
||||
|
||||
AC_ARG_WITH(gc, [ --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default])
|
||||
AC_CHECK_HEADERS(gc.h gc/gc.h)
|
||||
AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
|
||||
gc=auto
|
||||
AC_ARG_WITH(gc, [ --with-gc=boehm,none],[gc=$with_gc])
|
||||
|
||||
LIBGC_CFLAGS=
|
||||
LIBGC_LIBS=
|
||||
libgc_dir=
|
||||
case "x$gc" in
|
||||
xboehm|xbohem|xyes)
|
||||
AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
|
||||
AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
|
||||
|
||||
xboehm|xyes)
|
||||
if test "x$found_boehm" != "xyes"; then
|
||||
AC_MSG_ERROR("GC requested but libgc not found! Install libgc or run configure with --with-gc=none.")
|
||||
fi
|
||||
if test "x$gc_headers" != "xyes"; then
|
||||
AC_MSG_ERROR("GC requested but header files not found! You may need to install them by hand.")
|
||||
AC_MSG_ERROR("GC requested but libgc not found!")
|
||||
fi
|
||||
|
||||
AC_DEFINE(HAVE_BOEHM_GC)
|
||||
AC_SUBST(HAVE_BOEHM_GC)
|
||||
LIBGC_LIBS="-lgc $libdl"
|
||||
|
||||
AC_CHECK_FUNCS(GC_gcj_malloc)
|
||||
LIBS="$LIBS -lgc $libdl"
|
||||
;;
|
||||
|
||||
xincluded)
|
||||
AC_CONFIG_SUBDIRS(libgc)
|
||||
|
||||
found_boehm=yes
|
||||
gc_headers=yes
|
||||
use_included_gc=yes
|
||||
libgc_dir=libgc
|
||||
|
||||
LIBGC_CFLAGS='-I$(top_srcdir)/libgc/include'
|
||||
LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
|
||||
|
||||
AC_DEFINE(HAVE_BOEHM_GC)
|
||||
AC_SUBST(HAVE_BOEHM_GC)
|
||||
|
||||
AC_DEFINE(HAVE_GC_H)
|
||||
AC_DEFINE(USE_INCLUDED_LIBGC)
|
||||
|
||||
# The included libgc contains GCJ support
|
||||
AC_DEFINE(HAVE_GC_GCJ_MALLOC)
|
||||
;;
|
||||
|
||||
xnone)
|
||||
AC_MSG_WARN("Compiling mono without GC.")
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Invalid argument to --with-gc.])
|
||||
# If libgc was found, use it. Otherwise just warn.
|
||||
if test "x$found_boehm" != "xyes"; then
|
||||
AC_MSG_WARN("Compiling mono without GC.")
|
||||
else
|
||||
AC_DEFINE(HAVE_BOEHM_GC)
|
||||
AC_SUBST(HAVE_BOEHM_GC)
|
||||
LIBS="$LIBS -lgc $libdl"
|
||||
gc="boehm"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
we_are_embedded_in_mono=yes
|
||||
export we_are_embedded_in_mono
|
||||
export libgc_threads
|
||||
|
||||
AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
|
||||
AC_SUBST(LIBGC_CFLAGS)
|
||||
AC_SUBST(LIBGC_LIBS)
|
||||
AC_SUBST(libgc_dir)
|
||||
|
||||
dnl
|
||||
dnl End of libgc checks
|
||||
dnl
|
||||
|
||||
if test x$platform_win32 = xno; then
|
||||
dnl ******************************************************************
|
||||
dnl *** Check for large file support ***
|
||||
@@ -370,20 +278,8 @@ if test x$platform_win32 = xno; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_STRUCT_IP_MREQN)
|
||||
], [
|
||||
# We'll just have to try and use struct ip_mreq
|
||||
# We'll just have to use struct ip_mreq
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING(for struct ip_mreq)
|
||||
AC_TRY_COMPILE([#include <netinet/in.h>], [
|
||||
struct ip_mreq mreq;
|
||||
mreq.imr_interface.s_addr = 0;
|
||||
], [
|
||||
# Yes, we have it...
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_STRUCT_IP_MREQ)
|
||||
], [
|
||||
# No multicast support
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
dnl *****************************
|
||||
@@ -464,24 +360,24 @@ if test x$platform_win32 = xno; then
|
||||
dnl ********************************
|
||||
dnl *** Checks for timezone stuff **
|
||||
dnl ********************************
|
||||
AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
|
||||
AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
|
||||
AC_TRY_COMPILE([
|
||||
#include <time.h>
|
||||
], [
|
||||
struct tm tm;
|
||||
tm.tm_gmtoff = 1;
|
||||
], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
|
||||
if test $ac_cv_struct_tm_gmtoff = yes; then
|
||||
AC_DEFINE(HAVE_TM_GMTOFF)
|
||||
], [
|
||||
timezone = 1;
|
||||
], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
|
||||
if test $ac_cv_var_timezone = yes; then
|
||||
AC_DEFINE(HAVE_TIMEZONE)
|
||||
else
|
||||
AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
|
||||
AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
|
||||
AC_TRY_COMPILE([
|
||||
#include <time.h>
|
||||
], [
|
||||
timezone = 1;
|
||||
], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
|
||||
if test $ac_cv_var_timezone = yes; then
|
||||
AC_DEFINE(HAVE_TIMEZONE)
|
||||
], [
|
||||
struct tm tm;
|
||||
tm.tm_gmtoff = 1;
|
||||
], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
|
||||
if test $ac_cv_struct_tm_gmtoff = yes; then
|
||||
AC_DEFINE(HAVE_TM_GMTOFF)
|
||||
else
|
||||
AC_ERROR(unable to find a way to determine timezone)
|
||||
fi
|
||||
@@ -567,17 +463,14 @@ fi
|
||||
TARGET="unknown"
|
||||
ACCESS_UNALIGNED="yes"
|
||||
|
||||
JIT_SUPPORTED=no
|
||||
|
||||
case "$host" in
|
||||
#mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; ACCESS_UNALIGNED="no";;
|
||||
i*86-*-*) TARGET=X86; arch_target=x86; JIT_SUPPORTED=yes;;
|
||||
i*86-*-*) TARGET=X86; arch_target=x86;;
|
||||
sparc*-*-*) TARGET=SPARC; arch_target=sparc; ACCESS_UNALIGNED="no";;
|
||||
#alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; ACCESS_UNALIGNED="no";;
|
||||
#m68k-*-linux*) TARGET=M68K;;
|
||||
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | powerpc-*-sysv* | powerpc-*-darwin*) TARGET=POWERPC; arch_target=ppc; JIT_SUPPORTED=yes;;
|
||||
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | powerpc-*-sysv*) TARGET=POWERPC; arch_target=ppc;;
|
||||
arm-*-linux-* | armv4l-*-linux-*) TARGET=ARM; arch_target=arm; ACCESS_UNALIGNED="no";;
|
||||
s390-*-linux*) TARGET=S390; arch_target=s390; ACCESS_UNALIGNED="no";;
|
||||
esac
|
||||
|
||||
if test ${TARGET} = unknown; then
|
||||
@@ -597,9 +490,6 @@ AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
|
||||
AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
|
||||
AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
|
||||
AM_CONDITIONAL(ARM, test x$TARGET = xARM)
|
||||
AM_CONDITIONAL(S390, test x$TARGET = xS390)
|
||||
|
||||
AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
|
||||
|
||||
LIBC="libc.so.6"
|
||||
AC_SUBST(LIBC)
|
||||
@@ -607,7 +497,6 @@ AC_SUBST(LIBC)
|
||||
AC_SUBST(arch_target)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(CPPFLAGS)
|
||||
AC_SUBST(LDFLAGS)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
@@ -624,17 +513,15 @@ mono/os/unix/Makefile
|
||||
mono/arch/x86/Makefile
|
||||
mono/arch/ppc/Makefile
|
||||
mono/arch/sparc/Makefile
|
||||
mono/arch/s390/Makefile
|
||||
mono/arch/arm/Makefile
|
||||
mono/arch/alpha/Makefile
|
||||
mono/interpreter/Makefile
|
||||
mono/tests/Makefile
|
||||
mono/benchmark/Makefile
|
||||
mono/monoburg/Makefile
|
||||
mono/monograph/Makefile
|
||||
mono/jit/Makefile
|
||||
mono/io-layer/Makefile
|
||||
mono/handles/Makefile
|
||||
mono/mini/Makefile
|
||||
runtime/Makefile
|
||||
scripts/Makefile
|
||||
man/Makefile
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
monodir = $(sysconfdir)/mono
|
||||
|
||||
EXTRA_DIST = config.in machine.config
|
||||
EXTRA_DIST = config.in
|
||||
|
||||
mono_DATA = config machine.config
|
||||
|
||||
DISTCLEANFILES = config
|
||||
mono_DATA = config
|
||||
|
||||
config: config.in Makefile
|
||||
sed -e 's^\@LIBC\@^libc.so.6^g' < $(srcdir)/config.in > config.tmp \
|
||||
|
||||
@@ -2,17 +2,4 @@
|
||||
<dllmap dll="cygwin1.dll" target="@LIBC@" />
|
||||
<dllmap dll="libc" target="@LIBC@" />
|
||||
<dllmap dll="libxslt.dll" target="libxslt.so" />
|
||||
<dllmap dll="libmySQL.dll" target="libmysqlclient.so" />
|
||||
<dllmap dll="odbc32.dll" target="libodbc.so" />
|
||||
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.so" />
|
||||
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so" />
|
||||
<dllmap dll="libpango-1.0-0.dll" target="libpango-1.0.so" />
|
||||
<dllmap dll="libatk-1.0-0.dll" target="libatk-1.0.so" />
|
||||
<dllmap dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0.so" />
|
||||
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0.so" />
|
||||
<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so" />
|
||||
<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so" />
|
||||
<dllmap dll="libglade-2.0-0.dll" target="libglade-2.0.so" />
|
||||
<dllmap dll="oci" target="clntsh" />
|
||||
<dllmap dll="gtkhtml-3.0" target="libgtkhtml-3.0.so.2" />
|
||||
</configuration>
|
||||
@@ -1,95 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<configuration>
|
||||
|
||||
<configSections>
|
||||
<section name="appSettings" type="System.Configuration.NameValueFileSectionHandler, System" />
|
||||
|
||||
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System" />
|
||||
<sectionGroup name="system.web">
|
||||
<section name="httpHandlers"
|
||||
type="System.Web.Configuration.HttpHandlersSectionHandler, System.Web" />
|
||||
<section name="httpModules"
|
||||
type="System.Web.Configuration.HttpModulesConfigurationHandler, System.Web" />
|
||||
<section name="machineKey"
|
||||
type="System.Web.Configuration.MachineKeyConfigHandler, System.Web" />
|
||||
<section name="authentication"
|
||||
type="System.Web.Configuration.AuthenticationConfigHandler, System.Web" />
|
||||
<section name="authorization"
|
||||
type="System.Web.Configuration.AuthorizationConfigHandler, System.Web" />
|
||||
<section name="globalization"
|
||||
type="System.Web.Configuration.GlobalizationConfigurationHandler, System.Web" />
|
||||
<section name="sessionState"
|
||||
type="System.Web.SessionState.SessionStateSectionHandler, System.Web" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="system.net">
|
||||
<section name="connectionManagement"
|
||||
type="System.Net.Configuration.ConnectionManagementHandler, System" />
|
||||
<section name="authenticationModules"
|
||||
type="System.Net.Configuration.NetAuthenticationModuleHandler, System" />
|
||||
<section name="defaultProxy"
|
||||
type="System.Net.Configuration.DefaultProxyHandler, System" />
|
||||
<section name="webRequestModules"
|
||||
type="System.Net.Configuration.WebRequestModuleHandler, System" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<system.net>
|
||||
<connectionManagement>
|
||||
<add address="*" maxconnection="2" />
|
||||
</connectionManagement>
|
||||
<authenticationModules>
|
||||
<add type="System.Net.BasicClient" />
|
||||
</authenticationModules>
|
||||
<defaultProxy>
|
||||
<proxy />
|
||||
<!-- bypassonlocal and proxyaddress are ok -->
|
||||
<!-- usessystemdefault is not supported -->
|
||||
</defaultProxy>
|
||||
<webRequestModules>
|
||||
<add prefix="http" type="System.Net.HttpRequestCreator, System" />
|
||||
<add prefix="https" type="System.Net.HttpRequestCreator, System" />
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System" />
|
||||
</webRequestModules>
|
||||
</system.net>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web" />
|
||||
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web" />
|
||||
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web" />
|
||||
</httpHandlers>
|
||||
<httpModules>
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web" />
|
||||
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web" />
|
||||
<add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web" />
|
||||
</httpModules>
|
||||
<authentication mode="Forms">
|
||||
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
|
||||
<credentials passwordFormat="Clear">
|
||||
<!--<user name="gonzalo" password="gonz"/>-->
|
||||
</credentials>
|
||||
</forms>
|
||||
</authentication>
|
||||
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
|
||||
<!-- Sample globalization settings
|
||||
<globalization requestEncoding="iso-8859-1"
|
||||
responseEncoding="iso-8859-1"
|
||||
fileEncoding="iso-8859-1"
|
||||
culture="en-US"
|
||||
uiculture="en-US" />
|
||||
-->
|
||||
<sessionState mode="InProc" />
|
||||
</system.web>
|
||||
|
||||
<appSettings>
|
||||
<!--<add key="yourkey" value="your value" /> -->
|
||||
<!--<remove key="a key defined higher in the hierarchy" /> -->
|
||||
<!--<clear/> Removes all defined settings -->
|
||||
</appSettings>
|
||||
<system.diagnostics>
|
||||
<trace autoflush="false" indentsize="4" />
|
||||
</system.diagnostics>
|
||||
</configuration>
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
WEB_FILES= \
|
||||
ado-net anoncvs asp-net books ccvs c-sharp class-library contact contributing devel-faq documentation download \
|
||||
embedded-api faq firebird gcc-frontend hackers ideas index \
|
||||
java jit-debug languages mailing-lists monodoc-xml mysql odbc \
|
||||
oledb papers \
|
||||
passport plans porting postgresql ppc projects rationale \
|
||||
resources roadmap runtime sqlclient sqlite sybase tdsclient \
|
||||
tds-providers status testing thanks tools \
|
||||
porting anoncvs monodoc-xml winforms
|
||||
WEB_FILES= \
|
||||
ado-net c-sharp class-library contact contributing documentation download \
|
||||
faq gcc-frontend ideas index passport rationale resources \
|
||||
roadmap runtime status team testing thanks tools porting anoncvs monodoc-xml winforms
|
||||
|
||||
OTHERS= pending resources-pending todo mono-build.sh mono-build-w32.sh
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 448 B |
@@ -15,33 +15,3 @@ To publish changes:
|
||||
|
||||
cd web
|
||||
make push
|
||||
|
||||
############## Samples
|
||||
|
||||
|
||||
If you want to add a new item in the left menu
|
||||
you have to edit mono/doc/web/commands and add
|
||||
the entry there.
|
||||
|
||||
For new files you can add something as:
|
||||
level,entry,path_to_the_file,file.src
|
||||
|
||||
ex: 1,COBOL#,cobol.html,cobol.src
|
||||
|
||||
If you just want to add a link to the menu:
|
||||
1,MyEntry,URL
|
||||
|
||||
ex: 1,About Linux,http://www.linux.org
|
||||
|
||||
To test the results under Linux:
|
||||
1. Edit mono/doc/web/makefile
|
||||
|
||||
Delete all the references to class status
|
||||
and the deploy/index.rss as well as the
|
||||
mono.exe commands.
|
||||
|
||||
2. make
|
||||
3. Open your browser and point to the
|
||||
file:///(YOUR PATH HERE)mono/doc/web/deploy/index.html
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
To update your sources every day, you use this command:
|
||||
|
||||
<pre>
|
||||
export CVSROOT=:pserver:anonymous@anoncvs.go-mono.com:/mono
|
||||
export CVSROOT=:pserver:anonymous@reypastor.hispalinux.es:/mono
|
||||
cvs -z3 update -dP mcs mono gtk-sharp
|
||||
</pre>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<a name="#mirror">
|
||||
** Becoming an AnonCVS mirror
|
||||
|
||||
To become an AnonCVS mirror, you currently need about 40
|
||||
To become an AnonCVS mirror, you currently need about 20
|
||||
megabytes of free disk space and bandwidth that you do not
|
||||
mind sharing (you probably want enough to spare).
|
||||
|
||||
|
||||
@@ -9,61 +9,16 @@
|
||||
|
||||
There is work underway for both systems. The Web Forms
|
||||
support is more advanced at this point, and various ".aspx"
|
||||
programs can be run using the Mono runtime, including IBuySpy.
|
||||
|
||||
ASP.NET works either embedded into
|
||||
our XSP server test server or the mod_mono Apache module.
|
||||
|
||||
We are now working bug fixing and adding missing features
|
||||
after making the whole pipeline compatible with MS.
|
||||
programs can be run using the Mono runtime and the XSP page
|
||||
parser.
|
||||
|
||||
Tim started work on the Web Services. Although we have a
|
||||
SoapFormatter as part of the remoting infrastructure already
|
||||
(contributed by Jesus), most people will be using the ASP.NET
|
||||
Web Services support. Work for the supporting class libraries
|
||||
just started recently.
|
||||
just started recently.
|
||||
|
||||
The major missing element is a complete XmlSerializer.
|
||||
|
||||
** HttpRuntime
|
||||
|
||||
Patrik has authored most of the HttpRuntime support (both on
|
||||
the System.Web and on the foundation).
|
||||
|
||||
** XSP
|
||||
|
||||
This is where initial development of the .aspx/.ascx/.asax compiler
|
||||
to C# took place. That compiler is now integrated in System.Web classes
|
||||
mostly under System.Web.Compilation namespace.
|
||||
|
||||
We added a new web server that works with mono and MS runtime and is
|
||||
being used to debug our classes. It resides in xsp/server. A couple of
|
||||
classes of this new server can be reused/extended to make an apache
|
||||
module/cgi using mono (MonoWorkerRequest and MonoApplicationHost).
|
||||
|
||||
There is also a set of .aspx pages to test the server along with
|
||||
a few user controls under xsp/test.
|
||||
|
||||
You can check it out from CVS and run 'make install' to test it.
|
||||
|
||||
** Controls
|
||||
|
||||
A lot of work has been put in the various classes that
|
||||
implement the controls (UI.HtmlControls and UI.WebControls),
|
||||
but they have been coded mostly in the dark, and without being
|
||||
able to test them in real life: Gaurav and Leen worked very
|
||||
hard on this namespace.
|
||||
|
||||
We can now render all HtmlControls and all WebControls.
|
||||
|
||||
Help in making the controls better is appreciated.
|
||||
|
||||
** ASP.NET and free controls.
|
||||
|
||||
We want to encourage developers to create open source controls
|
||||
that can be used both on Mono's ASP.NET and Microsoft's ASP.NET.
|
||||
|
||||
* Web Forms: The pieces (historical)
|
||||
* Web Forms: The pieces
|
||||
|
||||
There are a couple of components to the puzzle:
|
||||
|
||||
@@ -98,18 +53,78 @@
|
||||
|
||||
Duncan got our System.Web assembly to compile.
|
||||
|
||||
** HttpRuntime
|
||||
|
||||
Patrik has authored most of the HttpRuntime support (both on
|
||||
the System.Web and on the foundation).
|
||||
|
||||
He is now working on finishing HttpRuntime and a few needed
|
||||
classes.
|
||||
|
||||
** XSP
|
||||
|
||||
Currently XSP provides the .aspx compiler to C#.
|
||||
There is also a small web server for testing in module xsp
|
||||
along with a bunch of .aspx pages to test the server.
|
||||
|
||||
The C# code generator is being moved to System.Web.Compilation.
|
||||
|
||||
Gonzalo is in charge of the compiler.
|
||||
|
||||
** Controls
|
||||
|
||||
A lot of work has been put in the various classes that
|
||||
implement the controls (UI.HtmlControls and UI.WebControls),
|
||||
but they have been coded mostly in the dark, and without being
|
||||
able to test them in real life: Gaurav and Leen worked very
|
||||
hard on this namespace.
|
||||
|
||||
We can now render all HtmlControls and almost all WebControls.
|
||||
DataGrid and DataList controls are being finisehd by Gaurav.
|
||||
Xml control needs some work on System.Xml related to XSL.
|
||||
|
||||
** Extending ASP.NET
|
||||
|
||||
Currently you have to reference in your ASP.NET the control
|
||||
and all of its properties, which works fine if you have a GUI
|
||||
designer, but is harder for people used to develop using text
|
||||
editors.
|
||||
|
||||
Since we have a parser, we could extend this parser to allow
|
||||
people to still use ASP.NET controls, using a simpler syntax.
|
||||
For example people doing blogs and editing their templates
|
||||
over the web probably do not want to use direct ASP.NET but a
|
||||
wrapper around it.
|
||||
|
||||
** Roadmap
|
||||
|
||||
1. The Parser.
|
||||
|
||||
2. Get the parser to generate output compatible with ASP.NET.
|
||||
|
||||
3. Run the sample output with the real Microsoft runtime
|
||||
but using our generated page.
|
||||
|
||||
4. Run the sample with our classes with the .NET runtime.
|
||||
|
||||
5. Run the samples with our classes with the our runtime (without
|
||||
using HttpRuntime).
|
||||
|
||||
6. Finish HttpRuntime.
|
||||
<b>We are here</b>.
|
||||
|
||||
7. Running our sample code with our classes with our runtime.
|
||||
|
||||
** How to Help
|
||||
|
||||
Testing and fixing HtmlControls, WebControls and validators is an
|
||||
easy way to help.
|
||||
|
||||
In the CVS module XSP you can find a small web server used for
|
||||
testing and a directory containing sample aspx pages.
|
||||
In the CVS module XSP you can find the aspx to C# page parser,
|
||||
a little web server used for testing and a directory containing
|
||||
sample aspx pages.
|
||||
|
||||
You have some documentation under doc directory and in the README
|
||||
file of each directory. They explain how to test our System.Web.
|
||||
Testing is really easy!
|
||||
|
||||
As the server also works with MS runtime, you can use it to check
|
||||
what the expected results are.
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
* Mono Books
|
||||
|
||||
<a href="http://www.amazon.de/exec/obidos/ASIN/3827264928/qid=1050051051/sr=2-1/ref=sr_2_3_1/028-2755135-1623712">
|
||||
Mono: .NET-kompatible Anwendungen mit dem Open Source-Framework
|
||||
</a>
|
||||
|
||||
* C# Books
|
||||
|
||||
A Programmer's Introduction to C# - Second Edition: Eric Gunnerson
|
||||
@@ -25,10 +19,6 @@
|
||||
A Retargetable C Compiler - Design and Implementation: C. Fraser, David
|
||||
Hanson
|
||||
|
||||
* Threading
|
||||
|
||||
.NET Multithreading: Alan L. Dennis (ISBN 1-930110-54-5)
|
||||
|
||||
* Reference Manuals
|
||||
|
||||
<a
|
||||
@@ -44,4 +34,4 @@
|
||||
MIPS Processor supplement</a>
|
||||
|
||||
<a href="http://www.sparc.org/standards/V8.pdf">The SPARC Architecture
|
||||
Manual Version 8</a>
|
||||
Manual Version 8</a>
|
||||
@@ -1,28 +1,19 @@
|
||||
* MCS: The Ximian C# compiler
|
||||
|
||||
The Mono C# compiler is considered feature complete at this
|
||||
point and relatively mature. MCS is able to compile itself
|
||||
and many more C# programs (there is a test suite included that
|
||||
you can use). It is routinely used to compile Mono, roughly
|
||||
half a million lines of C# code.
|
||||
MCS is currently able to compile itself and many more C#
|
||||
programs (there is a test suite included that you can use).
|
||||
It is routinely used to compile Mono, roughly half a million
|
||||
lines of C# code.
|
||||
|
||||
* Pending tasks
|
||||
|
||||
There are a few known bugs in the Mono C# compiler, but
|
||||
they are very very few at this point,
|
||||
We are in feature completion mode right now. There are still
|
||||
a couple of areas that are not covered by the Mono compiler, but
|
||||
they are very very few at this point (security attributes),
|
||||
you can also browse the MCS <a href="http://bugzilla.ximian.com/buglist.cgi?product=Mono%2FMCS&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&short_desc=&short_desc_type=substring&long_desc=&long_desc_type=substring&bug_file_loc=&bug_file_loc_type=substring&keywords=&keywords_type=anywords&op_sys_details=&op_sys_details_type=substring&version_details=&version_details_type=substring&cmdtype=doit&newqueryname=&order=Reuse+same+sort+as+last+time&form_name=query">bugs</a> from Bugzilla.
|
||||
|
||||
A test suite is maintained to track the progress of
|
||||
the compiler and various programs are routinely compiled and
|
||||
ran.
|
||||
|
||||
** Slides
|
||||
|
||||
Slides for the Mono C# Compiler presentation at .NET ONE are
|
||||
available <a
|
||||
href="http://primates.ximian.com/~miguel/slides-europe-nov-2002/Mono_C_Sharp_Overview_1007.sxi">here</a>
|
||||
in StarOffice format.
|
||||
|
||||
** Obtaining MCS
|
||||
|
||||
The Mono C# compiler is part of the `mcs' module in the Mono CVS
|
||||
|
||||
@@ -1,159 +1,14 @@
|
||||
* CVS Access
|
||||
|
||||
Here we describe how one obtains commit access to the CVS repository
|
||||
and the responsibilities that come with that access privilege.
|
||||
If you are an active Mono developer, you can get a CVS account
|
||||
that hosts the Mono source code.
|
||||
|
||||
** What is CVS?
|
||||
If you are not a developer, but want to track the development, please
|
||||
see the <a href="anoncvs.html">AnonCVS</a> instructions.
|
||||
|
||||
Briefly, CVS is a system tool used to store and maintain files and
|
||||
a history of their changes over time. The Mono source code and related
|
||||
files are kept on a CVS server at Ximian.
|
||||
|
||||
** What Access?
|
||||
|
||||
We mean "commit" access. This is the privilege to make permanent
|
||||
changes to the Mono source code and related files. You need an account
|
||||
created by the CVS server administrator in order to commit changes to
|
||||
the files on that server.
|
||||
|
||||
** How Does One Obtain Access?
|
||||
|
||||
Any active Mono developer can get a CVS account. Normally one is
|
||||
considered an 'active' developer after sending several patches to the
|
||||
mailing lists and/or bugzilla for review.
|
||||
|
||||
If you are not a developer, but want to access the latest sources,
|
||||
please see the <a href="anoncvs.html">AnonCVS</a> instructions.
|
||||
|
||||
If you feel you are ready for a CVS account send an e-mail to
|
||||
<a href="mailto:[email protected]">miguel</a> with your public OpenSSH
|
||||
key for this purpose. Please specify if the key was generated with SSH
|
||||
version 1 or version 2. Detailed instructions are below.
|
||||
|
||||
* Policies
|
||||
|
||||
It is necessary that everyone with CVS commit access respect and
|
||||
adhere to the following rules. If you ask for and are granted CVS
|
||||
access, you are agreeing to follow these policies.
|
||||
|
||||
** Code License
|
||||
|
||||
If you are about to commit code to a module, the code that is
|
||||
being committed should be released under the same license as
|
||||
the code that the module has.
|
||||
|
||||
Check the license if you are unsure, but it is basically:
|
||||
class libraries X11; compiler and tools: GPL; runtime: LGPL.
|
||||
|
||||
If in doubt, check with the maintainers of the module, or send
|
||||
mail to [email protected].
|
||||
|
||||
** Changing code
|
||||
|
||||
Even if you have CVS commit access, that doesn't mean you can change
|
||||
code at will in any directory or module. Directories and Namespaces
|
||||
have a sort of unofficial ownership. If you are not the owner of a
|
||||
piece of code and you want to make changes/fixes to it, there are two
|
||||
cases.
|
||||
1) The change is a typo fix or a one-liner build or trivial fix. In
|
||||
this case almost anyone can commit (always remembering to add the
|
||||
proper changelog entry to explain the change). We say "almost anyone",
|
||||
because changes to certain directories almost always should be reviewed
|
||||
first. Such as changes to core stuff: corlib/System, System.Collections,
|
||||
mini/, metadata/, System.IO.
|
||||
|
||||
2) The change is larger. In this case the patch *must* be sent to
|
||||
mono-devel-list for review by the owner of the code and by the other
|
||||
hackers. Always submit such patches to the list or bugzilla, although
|
||||
you may put the owner of the code in the CC header. Hackers come and go.
|
||||
Mailing a patch to only a personal address is a good way to get the
|
||||
patch forgotten and missed. Plus, getting the patches reviewed as well
|
||||
as reviewing them, is a good thing, so try to get used to it.
|
||||
|
||||
Note: If the patch is an addition of code and doesn't change any of the
|
||||
existing code, the rules are slightly relaxed: there is more freedom
|
||||
in committing such changes, if they don't interfere with the existing
|
||||
codebase.
|
||||
|
||||
** Owning Code
|
||||
|
||||
Now, how do you get to be the owner of a chunk of code? The answer is
|
||||
simple. You wrote the code, so you're the unofficial owner. There is
|
||||
also another way. After sending a few patches for the code, the
|
||||
owner (or the core developers of mono, if the owner somehow disappeared)
|
||||
trusts you and tells you you're free to commit without getting his
|
||||
review first.
|
||||
|
||||
|
||||
Here is a (partial) list of namespaces/directories with their owners:
|
||||
<ul>
|
||||
<li>Debugger module and debug code in mono: martin
|
||||
<li>mcs compiler: miguel, martin, ravi
|
||||
<li>Reflection/Reflection.Emit: lupus, zoltan
|
||||
<li>IO-layer: dick
|
||||
<li>mini: lupus, dietmar
|
||||
<li>test suite: nickd (though anyone should feel free to add test cases)
|
||||
<li>System.IO: dick, ville
|
||||
<li>security stuff: spouliot
|
||||
<li>ilasm: jackson
|
||||
<li>System.Web and related: gonzalo
|
||||
<li>System.Xml: eno, piers
|
||||
<li>Remoting: dietmar, lluis
|
||||
<li>interop/marshal: dietmar
|
||||
<li>threads: dick
|
||||
</ul>
|
||||
|
||||
If you are the owner of a piece of code, feel free to commit code, and
|
||||
delegate the work to others.
|
||||
|
||||
But, if you're not the owner of the code, committing a rewrite without
|
||||
getting a review first is not good cvsitizenship (especially when the
|
||||
rewrite claimed to fix bugs, but not a single regression test has been
|
||||
added to the suite).
|
||||
|
||||
** Commit Rules
|
||||
|
||||
Once you know you can commit a patch (because of the rules above) there
|
||||
are a few other small rules to follow:
|
||||
<ul>
|
||||
<li>Always add a changelog entry with a meaningful explanation
|
||||
<li>If you fix a bug, add a regression test for it in the regression
|
||||
suite
|
||||
<li>Don't commit unrelated changes together with a fix: do fine-grained
|
||||
commits
|
||||
<li>Always check what you're committing: make sure you're only committing
|
||||
what you need and make sure you don't change line endings and
|
||||
whitespace. Do a 'cvs diff -u' of the files you're going to commit and
|
||||
check the changes.
|
||||
<li>Don't do reformatting commits, unless you're the original author of
|
||||
the code
|
||||
<li>When fixing bugs, don't follow the documentation blindly, it may
|
||||
well be wrong. Test the behavior on the MS runtime or ask on the list
|
||||
for discussion if unsure. Don't be afraid of having your changes
|
||||
reviewed.
|
||||
<li>Never remove copyright notices from the code
|
||||
<li>Never remove licensing info from code
|
||||
<li>Never commit code you didn't write yourself or code that doesn't
|
||||
have a suitable license
|
||||
<li>Follow the style conventions
|
||||
<li>Keep an eye on performance considerations, especially for code in
|
||||
core classes, ask on the list for guidance
|
||||
<li>Do a regression test run and a bootstrapping build if making changes
|
||||
to core functionality before committing. Do not commit code that would
|
||||
break the compile, because that wastes everybody's time. Two things
|
||||
are important in this step: trying to build your sources and making
|
||||
sure that you add all the new files before you do a commit.
|
||||
</ul>
|
||||
|
||||
Also, remember to pat yourself on the back after the commit, smile and
|
||||
think we're a step closer to a better free software world.
|
||||
|
||||
|
||||
* Using CVS.
|
||||
|
||||
This is a small tutorial for using CVS.
|
||||
|
||||
** Generating an SSH key
|
||||
Send an e-mail to miguel with your public OpenSSH key for this
|
||||
purpose. Please specify if the key was generated with SSH version 1
|
||||
or version 2.
|
||||
|
||||
If you are using SSH version 2, please generate your key using:
|
||||
|
||||
@@ -161,16 +16,14 @@
|
||||
ssh-keygen -t rsa
|
||||
</pre>
|
||||
|
||||
And mail <a href="mailto:[email protected]">miguel</a> the
|
||||
id_rsa.pub file.
|
||||
And mail me the id_rsa.pub file.
|
||||
|
||||
If you are using SSH version 1, run:
|
||||
<pre>
|
||||
ssh-keygen
|
||||
</pre>
|
||||
|
||||
And mail <a href="mailto:[email protected]">miguel</a> your
|
||||
identity.pub file.
|
||||
And mail me your identity.pub file.
|
||||
|
||||
If you are using SSH from SSH Communications Security (they offer
|
||||
a free SSH client for personal use), you have to use OpenSSH to
|
||||
@@ -181,10 +34,9 @@
|
||||
ssh-keygen -i -f id_XXX.pub > my_public_key.pub
|
||||
</pre>
|
||||
|
||||
where the file id_XXX.pub is your public key file,
|
||||
normally located under ~/.ssh/ or ~/.ssh2/.
|
||||
Send to <a href="mailto:[email protected]">miguel</a> the
|
||||
my_public_key.pub file.
|
||||
where the file <pre>id_XXX.pub</pre> is your public key file,
|
||||
normally located under <pre>~/.ssh/</pre> or <pre>~/.ssh2/</pre>.
|
||||
Send to miguel the <pre>my_public_key.pub</pre> file.
|
||||
|
||||
The *exact* format for this file must be:
|
||||
|
||||
@@ -226,7 +78,7 @@
|
||||
** Making patches
|
||||
|
||||
Usually you will want to make a patch to contribute, and let
|
||||
other people review it before committing it. To obtain such a
|
||||
other people review it before commiting it. To obtain such a
|
||||
"patch", you type:
|
||||
|
||||
<pre>
|
||||
@@ -235,25 +87,7 @@
|
||||
mail [email protected] < file.diff
|
||||
</pre>
|
||||
|
||||
** Committing your work
|
||||
|
||||
Once you get approval to commit to the CVS, or if you are
|
||||
committing code that you are the maintainer of, you will want
|
||||
to commit your code to CVS.
|
||||
|
||||
To do this, you have to "add" any new files that you created:
|
||||
|
||||
<pre>
|
||||
cvs add new-file.cs
|
||||
</pre>
|
||||
|
||||
And then commit your changes to the repository:
|
||||
|
||||
<pre>
|
||||
cvs commit file-1.cs file-2.cs
|
||||
</pre>
|
||||
|
||||
* Keeping track of changes.
|
||||
** Keeping track of changes.
|
||||
|
||||
We provide two e-mail based mechanisms to keep track of
|
||||
changes to the code base:
|
||||
@@ -272,6 +106,28 @@
|
||||
|
||||
We hope to offer LXR and Bonsai in the future as well.
|
||||
|
||||
** Commiting your work
|
||||
|
||||
Once you get approval to commit to the CVS, or if you are
|
||||
commiting code that you are the maintainer of, you will want
|
||||
to commit your code to CVS.
|
||||
|
||||
To do this, you have to "add" any new files that you created:
|
||||
|
||||
<pre>
|
||||
cvs add new-file.cs
|
||||
</pre>
|
||||
|
||||
And then commit your changes to the repository:
|
||||
|
||||
<pre>
|
||||
cvs commit file-1.cs file-2.cs
|
||||
</pre>
|
||||
|
||||
** The Mailing List
|
||||
|
||||
To keep track of the various development and changes to the
|
||||
CVS tree, you can subscribe to the [email protected].
|
||||
To subscribe, send an email message to
|
||||
[email protected] and in the body of the
|
||||
message put `subscribe'.
|
||||
@@ -279,8 +135,24 @@
|
||||
This will send you an email message every time a change is
|
||||
made to the CVS repository, together with the information that
|
||||
the author of the changes submitted.
|
||||
|
||||
** Recommendations
|
||||
|
||||
You might also want to track the live changes, subscribe to
|
||||
the <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
to receive the patches as they are checked into CVS.
|
||||
Please do not commit code that would break the compile to the
|
||||
CVS, because that normally wastes everybody's time. Two things
|
||||
are important in this step: trying to build your sources and making
|
||||
sure that you add all the new files before you do a commit.
|
||||
|
||||
To build the sources, most of the type trying the `make' command
|
||||
is enough. In some cases (the class libraries) we use nant, so
|
||||
you need to run nant manually.
|
||||
|
||||
Use ChangeLog entries so we can keep textual descriptions of
|
||||
your work, and use the contents of your ChangeLog file as the
|
||||
CVS commit message (ie, paste the contents of this into the
|
||||
editor buffer).
|
||||
|
||||
If you are making changes to someone else's code, please make
|
||||
sure you get in touch with the maintainer of that code before
|
||||
applying patches. You want to avoid commiting conflicting
|
||||
work to someone else's code.
|
||||
@@ -1,45 +1,17 @@
|
||||
* Status of the various pieces of the class library
|
||||
|
||||
Classes in Mono are organized by the assembly that they belong to.
|
||||
You can browse the status of the class library and see who has
|
||||
registered to work on what parts of the system. These list
|
||||
work-in-progress components currently.
|
||||
|
||||
Here is the status of the different assemblies:
|
||||
<ul>
|
||||
<li><a href="http://www.go-mono.com/class-status-corlib.html">corlib</a>: The core library.
|
||||
<li><a href="http://www.go-mono.com/class-status-System.html">System</a>.
|
||||
<li><a href="http://www.go-mono.com/class-status-System.Xml.html">System.Xml</a>.
|
||||
Browse the current <a href="class-status/index.html">status</a>.
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Data.html">System.Data</a>:
|
||||
Database access functionality (also check the <a href="ado-net.html">Mono ADO.NET status</a> pages).
|
||||
You can also download the XML <a
|
||||
href="class-status/maintainers.xml">maintainers</a> file that
|
||||
contains the actual maintainers list.
|
||||
|
||||
<li><a href="http://www.go-mono.com/class-status-System.Drawing.html">System.Drawing</a>.
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Web.html">System.Web</a>:
|
||||
ASP.NET classes, also check the <a href="asp-net.html">Mono ASP.NET status pages</a>
|
||||
|
||||
<li><a href="http://www.go-mono.com/class-status-System.Web.Services.html">System.Web.Services</a>.
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-Microsoft.VisualBasic.html">Microsoft.VisualBasic</a>:
|
||||
Support runtime for Visual Basic applications
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Windows.Forms.html">Windows.Forms</a>:
|
||||
there is also a <a
|
||||
href="http://lists.ximian.com/mailman/listinfo/mono-winforms-list">mailing
|
||||
list available</a>
|
||||
|
||||
<li><a href="http://www.go-mono.com/class-status-System.EnterpriseServices.html">EnterpriseServices</a>.
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Runtime.Serialization.Formatters.Soap.html">System.Runtime.Serialization.Formatters.Soap</a>.
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Security.html">System.Security</a>:
|
||||
Xml Signature Security classes, also check the <a href="crypto.html">Cryptography status pages</a>
|
||||
|
||||
</ul>
|
||||
You can also download the master <a
|
||||
href="class-status/class.xml">Class Status XML</a> file.
|
||||
|
||||
* List of not-implemented classes
|
||||
|
||||
|
||||
@@ -8,31 +8,53 @@
|
||||
multilingual documentation makes for significant additional text.
|
||||
|
||||
With these considerations in mind, Mono will use external XML files
|
||||
for type documentation, rather than documenting the source
|
||||
inline. The XML file format used is inspired by the XML format used
|
||||
to document the ECMA APIs.
|
||||
|
||||
for type documentation, rather than documenting the source inline.
|
||||
|
||||
Several tools will be created for managing, verifying, generating,
|
||||
and updating class library documentation, including:
|
||||
|
||||
<ul>
|
||||
<li><a href="#monodoc">monodoc - A graphical documentation viewer.</a></li>
|
||||
<li>xmllint: a tool used to validate a proper XML document.
|
||||
<li><a href="#monodoc">MonoDoc - A graphical documentation editor and viewer.</a></li>
|
||||
<li><a href="#mkmaster">MkMaster - A command line tool to feed stub information to MonoDoc.</a></li>
|
||||
<li><a href="#aspnet">An ASP.NET documentation editor.</a></li>
|
||||
<li><a href="#xsltool">An xsl tool to convert monodoc xml to html documentation.</a></li>
|
||||
</ul>
|
||||
|
||||
You can download the tools to document Mono from the CVS
|
||||
repository from module `monodoc'.
|
||||
** XML Documentation Files and Formats
|
||||
|
||||
|
||||
*** Monodoc XML
|
||||
This XML is Mono's documentation format. Documentation and a DTD/Schema
|
||||
for Monodoc XML is located in cvs and can be found <a href="http://go-mono.org/monodoc.dtd">here</a>.
|
||||
|
||||
This XML could be generated by MonoDoc or the ASP.NET client.
|
||||
|
||||
More about the XML format <a href="http://go-mono.org/monodoc-xml.html">here</a>.
|
||||
** Documentation Tools
|
||||
|
||||
*** <a name="monodoc">MonoDoc</a>
|
||||
A graphical documentation editor and viewer. Currently, MonoDoc
|
||||
consists of a Qt# application and is in heavy development.
|
||||
|
||||
A graphical documentation viewer written in Gtk#. In the
|
||||
future we will have an ASP.NET front-end to present the
|
||||
documentation on the web as well.
|
||||
*** <a name="mkmaster">MkMaster</a>
|
||||
This tool creates the Master.xml file that MonoDoc uses as a reference
|
||||
for documentation generation. This is a reflection engine that is used
|
||||
to gather metadata from assemblies and create an xml representation.
|
||||
|
||||
*** <a name="aspnet">ASP.NET</a>
|
||||
This tool is planned.
|
||||
|
||||
*** <a name="xsltool">An XSL converter</a>
|
||||
This tool is planned. If someone wants to step forward and adopt this
|
||||
project, it would be very helpful ;)
|
||||
|
||||
** Status and Roadmap
|
||||
|
||||
*** 16, September 2002
|
||||
|
||||
A preliminary version of MonoDoc is in Mono's cvs. It is under heavy development.
|
||||
Once this is complete we will start documenting the API!
|
||||
|
||||
** Get Involved
|
||||
|
||||
Help us develop Mono's documentation tools! Subscribe to
|
||||
|
||||
@@ -1,51 +1,18 @@
|
||||
* Contributing to the Mono project
|
||||
|
||||
Mono has not been completed yet. It is a project under
|
||||
active development and with a vibrant community. If you are
|
||||
looking at ways of helping the project, you have come to the
|
||||
right web page.
|
||||
There are many ways in which you can help in the Mono project:
|
||||
|
||||
There are three different philosophical approaches to helping
|
||||
the Mono project, the selfish way, the altruistic or the
|
||||
educational way.
|
||||
<ul>
|
||||
* <b>Programmers:</b> You can work on a free
|
||||
implementation of the <a
|
||||
href="class-library.html">class libraries</a>, the
|
||||
<a href="runtime.html">runtime engine</a>, <a
|
||||
href="tools.html">the tools</a>, the <a
|
||||
href="testing.html">testing framework</a>
|
||||
|
||||
The <b>selfish</b> way is packed with adventure. You start by
|
||||
building your own software, and start using the compiler and
|
||||
tools that come with Mono. Eventually you will run into
|
||||
missing features, or a bug in the software. Since we ship all
|
||||
the source code for Mono, you can start tracking down the
|
||||
problem. Depending on how much time you have to devote to the
|
||||
problem you could: <a href="http://bugzilla.ximian.com">File a
|
||||
bug report</a> (read <a href="#goodbugreport">this</a>); track
|
||||
down the problem and provide a better
|
||||
<a href="http://bugzilla.ximian.com">bug report</a>; fix the
|
||||
bug and provide a patch (you can <a
|
||||
href="mailto:[email protected]">post it</a> to the <a
|
||||
href="http://lists.ximian.com/mailman/listinfo/mono-list">mono
|
||||
mailing list</a>; or discuss the solution on the mailing
|
||||
list. Ideally you will also write a <a
|
||||
href="testing.html">regression test</a> so the bug does not
|
||||
get re-introduced in the future.
|
||||
|
||||
The <b>altruistic</b> is probably the easiest because you get
|
||||
to pick a piece of Mono that you might want to work on. You
|
||||
can pick an unfinished <a href="class-library.html">class</a> (from our <a
|
||||
href="class-status.html">class status page</a>); help with the
|
||||
<a href="documentation.html">documentation effort</a> (<a
|
||||
href="http://lists.ximian.com/mailman/listinfo/mono-docs-list">mailing
|
||||
list for the documentation effort</a>); fix existing <a
|
||||
href=http://bugzilla.ximian.com/buglist.cgi?product=Mono%2FClass+Libraries&product=Mono%2FRuntime&component=CORLIB&component=misc&component=System&component=System.Web&component=System.XML&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&short_desc=&short_desc_type=substring&long_desc=&long_desc_type=substring&bug_file_loc=&bug_file_loc_type=substring&keywords=&keywords_type=anywords&op_sys_details=&op_sys_details_type=substring&version_details=&version_details_type=substring&cmdtype=doit&newqueryname=&order=Reuse+same+sort+as+last+time&form_name=query">runtime
|
||||
bugs</a>; <a
|
||||
href="http://bugzilla.ximian.com/buglist.cgi?product=Mono%2FMCS&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&short_desc=&short_desc_type=substring&long_desc=&long_desc_type=substring&bug_file_loc=&bug_file_loc_type=substring&keywords=&keywords_type=anywords&op_sys_details=&op_sys_details_type=substring&version_details=&version_details_type=substring&cmdtype=doit&newqueryname=&order=Reuse+same+sort+as+last+time&form_name=query">compiler
|
||||
bugs</a>; help with the <a href="tools.html">tools</a> or
|
||||
writing <a href="testing.html">tests</a> that help make Mono
|
||||
more robust or help with the <a
|
||||
href="http://www.go-mono.com/winforms.html">Winforms
|
||||
effort</a>.
|
||||
|
||||
The <b>educational</b> way is an interesting one, because you
|
||||
pick a technology you are interested in, and work on that
|
||||
technology to learn the technology.
|
||||
* <b>Writers:</b> You can help us bywriting <a
|
||||
href="documentation.html">documentation</a>.
|
||||
</ul>
|
||||
|
||||
Those are just broad things that need to be worked on, but
|
||||
something that would help tremendously would be to help with
|
||||
@@ -128,50 +95,6 @@
|
||||
|
||||
You can review the list of current bugs by going <a href="http://bugzilla.ximian.com/buglist.cgi?product=Mono%2FClass+Libraries&product=Mono%2FMCS&product=Mono%2FRuntime&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&short_desc=&short_desc_type=substring&long_desc=&long_desc_type=substring&bug_file_loc=&bug_file_loc_type=substring&keywords=&keywords_type=anywords&op_sys_details=&op_sys_details_type=substring&version_details=&version_details_type=substring&cmdtype=doit&order=%27Importance%27&form_name=query">here</a>
|
||||
|
||||
<a name="goodbugreport"/>
|
||||
** How to make good bug reports
|
||||
|
||||
A mail from Paolo to mono-devel-list contained this check list:
|
||||
<ol>
|
||||
* Submit a test case, the smaller it is, the better
|
||||
|
||||
* Use <a href="http://bugzilla.ximian.com">
|
||||
http://bugzilla.ximian.com</a> to report the bug.
|
||||
|
||||
<p>In <b>addition</b> to bugzilla, posting to the list is
|
||||
fine if the bug merits larger exposure or design
|
||||
discussions to solve; posting to the list twice or more
|
||||
is just a way to annoy people and make them waste time,
|
||||
specially when you start a new thread about it.
|
||||
|
||||
* If the test involves libraries or assemblies that are
|
||||
not part of mono, add info about where to download all
|
||||
the dependencies, and how to compile/install them.
|
||||
|
||||
* If compiling the test case requires more than:
|
||||
<pre> mcs test.cs </pre>
|
||||
provide the <b>full command line</b> you used to compile
|
||||
the test.
|
||||
|
||||
* If running the test requires more than:
|
||||
<pre> mono test.exe </pre>
|
||||
provide the <b>full command line</b> needed to replicate
|
||||
the bug.
|
||||
|
||||
* Provide info about the version of the software you're
|
||||
using (both mono and the operating system or relevant
|
||||
libraries).
|
||||
|
||||
* Provide the output you expect the test case to produce.
|
||||
|
||||
* Provide the actual output <b>you</b> get from the test case.
|
||||
</ol>
|
||||
|
||||
A good bug report complies with at least 6 items from the list.
|
||||
If your bug report complies with 3 or less items, it is very
|
||||
poor and it means it will take much more time to fix (when it's
|
||||
not ignored).
|
||||
|
||||
** Small tasks
|
||||
|
||||
A few smaller tasks are here, dropped in no particular order:
|
||||
|
||||
@@ -1,375 +0,0 @@
|
||||
* Cryptography
|
||||
|
||||
In the .NET framework cryptography can be found under a number of
|
||||
namespaces in several assemblies.
|
||||
|
||||
** Assembly: corlib
|
||||
|
||||
*** Namespace: <b>System.Security.Cryptography</b>
|
||||
|
||||
Thanks to the work of many people this namespace is almost complete.
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* Every classes are present.
|
||||
|
||||
* Most classes have their unit tests. Some tests like <code>
|
||||
SymmetricAlgorithmTest</code> are generated by external
|
||||
tools.
|
||||
|
||||
* MACTripleDES is compatible with the implementation shipped in
|
||||
framework 1.0. Version 1.1 gives different results when the
|
||||
MACed data is a multiple of BlockSize (8 bytes).
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* The current implementation of <code>CryptoStream</code> is
|
||||
very limited and contain known bugs (<a
|
||||
href="http://bugzilla.ximian.com/show_bug.cgi?id=40689">
|
||||
40689</a>). The class need to be re-designed.
|
||||
|
||||
* RNGCryptoServiceProvider is currently only working on Linux.
|
||||
The current implementation reside in Mono's runtime and use
|
||||
the <code>/dev/[u]random</code> device (which do not exists
|
||||
under Windows). A Windows specific alternative is available
|
||||
using the Mono.Security.Win32 assembly.
|
||||
|
||||
* Keypair persistance for RSA and DSA. This persistance must
|
||||
somehow be linked with X509 certificate stores (in planning).
|
||||
|
||||
* <code>PasswordDeriveBytes.CryptDeriveKey</code> is included
|
||||
in MS BCL to provide compatibility with existing Windows
|
||||
applications. The main problem is that the key derivation
|
||||
algorithm can be different for every CSP (Crypto Service
|
||||
Provider). However for compatibility we should provide an
|
||||
implementation compatible with the MS CSP (most likely used).
|
||||
</ul>
|
||||
|
||||
**** Notes
|
||||
<ul>
|
||||
* All cryptographic algorithms are entirely managed, including
|
||||
classes named <code>*CryptoServiceProvider</code>, with the
|
||||
exception of <code>RNGCryptoServiceProvider</code> (which
|
||||
implementation resides in the runtime).
|
||||
|
||||
* There is a bug in the <code>PKCS1MaskGenerationMethod</code>
|
||||
class (in both framework 1.0 and 1.1). This means our
|
||||
implementation isn't compatible with MS (but is compatible with
|
||||
PKCS#1 v.2.1). However we get OAEP padding for every platform!
|
||||
|
||||
* Look at assembly Mono.Security.Win32 if you require more
|
||||
compatiblity with the Microsoft implementation (like accessing
|
||||
a particuliar keypair container inside a specific CSP).
|
||||
</ul>
|
||||
|
||||
|
||||
*** Namespace: <b>System.Security.Cryptography.X509Certificates</b>
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* X.509 certificates are parsed using 100% managed code
|
||||
(using the Mono.Security.ASN1 class).
|
||||
|
||||
* Software Publisher Certificates (SPC) used by Authenticode
|
||||
(tm) to sign assemblies are supported (extraction from PE
|
||||
files) but <b>not yet</b> validated.
|
||||
|
||||
* Unit tests are generated from a set of existing certificates
|
||||
(about a dozen) each having different properties. Another
|
||||
set of certificates (more than 700) are used for a more
|
||||
complete test (but isn't part of the standard test suite for
|
||||
size and time consideration, i.e. a 7.5Mb C# source file).
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* Authenticode(tm) support is incomplete. We can extract the
|
||||
certificates from PE files but cannot validate the signature
|
||||
nor the certificate chain (and we're still missing some trust
|
||||
anchors). See Tools section for more information.
|
||||
</ul>
|
||||
|
||||
**** Notes
|
||||
<ul>
|
||||
* Except for their structure <b>there are no validation of the
|
||||
certificates</b> done by this class (this is by design and
|
||||
isn't a restriction of Mono!). This means that certificate
|
||||
signatures and validity dates are <b>never</b> checked
|
||||
(except when used for Authenticode, i.e.
|
||||
<code>CreateFromSignedFile</code>).
|
||||
|
||||
* The newer X509Certificate class included in Microsoft's Web
|
||||
Service Enhancement (WSE) is a little better (as it includes
|
||||
CryptoAPI's validation) when <code>IsCurrent</code> is called.
|
||||
See assembly <b>Microsoft.Web.Services</b> for more details.
|
||||
|
||||
* The class Mono.Security.X509.X509Certificate (in Mono.Security
|
||||
assembly) is becoming a much better alternative - and will
|
||||
continue to evolve to support the security tools.
|
||||
|
||||
* Microsoft implementation of <code>X509Certificate</code> is
|
||||
done by using CryptoAPI (unmanaged code). From the exceptions
|
||||
thrown Authenticode(tm) support is done via COM.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
** Assembly: System.Security
|
||||
|
||||
*** Namespace: <b>System.Security.Cryptography.Xml</b>
|
||||
|
||||
This namespace implements the <a href="http://www.w3.org/TR/xmldsig-core/">
|
||||
XML Digital Signature</a> specification from
|
||||
<a href="http://www.w3.org/">W3C</a>.
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* All classes are present but some (most Transforms) are only
|
||||
stubbed.
|
||||
|
||||
* Most classes have their unit tests.
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* All the transforms needs to be done. But this requires far
|
||||
more XML knowledge than crypto. Note: Most tests runs because
|
||||
the feeded XML is pre-c14n (by hand in the code) before
|
||||
signing (not because the transforms works). In the short
|
||||
term <code>libxml2</code> could be used to provide C14N, but
|
||||
in the long term a fully managed class would be much better.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
** Assembly: Mono.Security
|
||||
|
||||
<b>Rational: </b>
|
||||
This assembly provides the missing pieces to .NET security. On Windows
|
||||
CryptoAPI is often used to provide much needed functionalities (like
|
||||
some cryptographic algorithms, code signing, X.509 certificates). Mono,
|
||||
for platform independance, implements these functionalities in 100%
|
||||
managed code.
|
||||
|
||||
*** Namespace: Mono.Security
|
||||
<ul>
|
||||
* Structures (ASN1, PKCS7) and primitives (PKCS1).
|
||||
</ul>
|
||||
*** Namespace: Mono.Security.Authenticode
|
||||
<ul>
|
||||
* Code signing and verification.
|
||||
* Support for SPC (Software Publisher Certificate) files and
|
||||
PVK (Private Key) files.
|
||||
</ul>
|
||||
*** Namespace: Mono.Security.Cryptography
|
||||
<ul>
|
||||
* Additional algorithms: MD2, ARCFOUR (required for SSL)
|
||||
* Convertion helpers
|
||||
</ul>
|
||||
*** Namespace: Mono.Security.X509
|
||||
<ul>
|
||||
* X.509 structures (certificate, CRL...) building and decoding.
|
||||
</ul>
|
||||
*** Namespace: Mono.Security.X509.Extensions
|
||||
<ul>
|
||||
* X.509 extensions (from public X.509 to private PKIX, Netsapce,
|
||||
Microsoft, Entrust...).
|
||||
</ul>
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* Some part of the work has not yet been commited (still cleaning up).
|
||||
|
||||
* A big part of this assembly is also included inside Mono's
|
||||
corlib. The classes are duplicated in this assembly so the
|
||||
functionalities can be used without a dependency on Mono's
|
||||
corlib (which depends on Mono's runtime).
|
||||
|
||||
* Unit test coverage isn't (yet) complete.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
** Assembly: Mono.Security.Win32
|
||||
|
||||
<b>Rational: </b>
|
||||
This assembly goal is to provide maximum compatibility with CryptoAPI
|
||||
to application running with Mono's runtime on the Windows operating
|
||||
system.
|
||||
|
||||
<b>This assembly should NEVER be used directly by any application</b>
|
||||
(e.g. referecing the assembly from a project).
|
||||
The classes should only be used by modifying the <code>machine.config
|
||||
</code> configuration file (and then only if this increased
|
||||
compatibility is required by an application).
|
||||
|
||||
See the file <code><a href="http://cvs.hispalinux.es/cgi-bin/cvsweb/~checkout~/mcs/class/Mono.Security.Win32/README?rev=1.1&content-type=text/plain&cvsroot=mono">/mcs/class/Mono.Security.Win32/README</a></code>
|
||||
for complete instructions.
|
||||
|
||||
*** Namespace: Mono.Security.Cryptography
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* A RNGCryptoServiceProvider built on top of CryptoAPI. This
|
||||
allows Windows users to get around the limitation of the
|
||||
runtime RNG (which requires <code>/dev/[u]random/</code>).
|
||||
|
||||
* Wrapper classes for unmanaged versions of hash algorithms:
|
||||
MD2, MD4, MD5 and SHA1 are supported. <b>note</b>: some
|
||||
algorithms shouldn't be used in new design (MD4 is broken,
|
||||
MD2 and MD5 aren't considered safe for some usage). They are
|
||||
included to preserve interoperability with older applications
|
||||
(e.g. some old, but still valid, X.509 certificates use MD2).
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* Wrapper classes for unmanaged versions of symmetric
|
||||
encryption algorithms (like DES, TripleDES, RC2 and others
|
||||
present in default CSP).
|
||||
|
||||
* Wrapper classes for unmanaged versions of asymmetric
|
||||
algorithms (like DSA and RSA) which persist their keypair
|
||||
into the specified CSP.
|
||||
</ul>
|
||||
|
||||
**** Ideas
|
||||
<ul>
|
||||
* Similar assemblies (e.g. <code>Mono.Security.XXX</code>)
|
||||
could be created for <a href="http://www.openssl.org">OpenSSL</a>,
|
||||
<a href="http://www.mozilla.org/projects/security/pki/nss/">NSS</a>,
|
||||
<a href="http://www.eskimo.com/~weidai/cryptlib.html">crypto++</a>,
|
||||
<a href="http://www.cryptlib.orion.co.nz/">cryptlib</a> ... for
|
||||
improved performance and/or HSM (Hardware Security Module) support
|
||||
under Linux and/or Windows.
|
||||
</ul>
|
||||
<hr>
|
||||
** Assembly: Microsoft.Web.Services
|
||||
|
||||
Microsoft Web Service Enhancement (WSE), known as Web Service
|
||||
Development Kit (WSDK) in it's beta days, is an add-on the .NET
|
||||
framework that implements WS-Security (and other WS-* specifications).
|
||||
It also includes improved support for XML Signature (replacing and/or
|
||||
extending <code>System.Security.Cryptography.Xml</code>) and X.509
|
||||
certificates classes.
|
||||
|
||||
Note: WSE is distributed as an add-on because some specifications,
|
||||
like WS-Security, aren't yet completed by
|
||||
<a href="http://www.oasis-open.org/committees/wss/">OASIS</a> or
|
||||
other committees.
|
||||
|
||||
<b>[*] There are some licensing issues to consider before starting to
|
||||
implement WS-Security. All contributors must sign an agreement with
|
||||
Microsoft before commiting anything related to WS-Security into CVS.
|
||||
</b>
|
||||
|
||||
*** Namespace: Microsoft.Web.Services.Security [*]
|
||||
*** Namespace: Microsoft.Web.Services.Timestamp [*]
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* Nothing (yet) commited in CVS <b>[*]</b>.
|
||||
</ul>
|
||||
|
||||
*** Namespace: Microsoft.Web.Services.Security.X509
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* Nothing (yet) commited in CVS. However the classes in this
|
||||
namespace are outside WS-Security scope. So development, for
|
||||
those classes, could be done without signing any agreements.
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* We need to define certificate stores (for both users and
|
||||
machines). These sames stores must be linked with asymmetric
|
||||
keypairs. This could also be used to store the SPC roots.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
** Tools
|
||||
|
||||
There are many tools in the .NET framework that indirectly interacts
|
||||
with some cryptographic classes. Mono will eventually need these tools.
|
||||
Unless noted the tools should work on any CLR (tested with both Mono
|
||||
and Microsoft).
|
||||
|
||||
**** Status
|
||||
|
||||
The following tools are complete (mostly complete):
|
||||
<ul>
|
||||
* <code>secutil</code> is a tool to extract certificates and
|
||||
strongnames from assemblies in a format that can be easily
|
||||
re-used in source code (C# or VB.NET syntax).
|
||||
|
||||
* <code>cert2spc</code> is a tool to transform multiple X.509
|
||||
certificates and CRLs into a Software Publisher Certificate
|
||||
(SPC) file - which is a long name for a simple PKCS#7 file.
|
||||
|
||||
* <code>makecert</code> to create X.509 test certificates that
|
||||
can be used (once transformed in SPC) to sign assemblies.
|
||||
</ul>
|
||||
|
||||
Somewhat usable, somewhat incomplete:
|
||||
<ul>
|
||||
* <code>sn</code> is a clone of the <code>sn</code> to manage
|
||||
strongnames. Current version is limited to creating new keypairs
|
||||
and converting values.
|
||||
|
||||
* <code>monosn</code> is a clone of the <code>sn</code> to manage
|
||||
strongnames. This tools is part of the runtime (not the class
|
||||
library) and as such is written in C and won't run without Mono.
|
||||
</ul>
|
||||
|
||||
|
||||
**** TODO
|
||||
The following tools are still missing or largely incomplete:
|
||||
<ul>
|
||||
|
||||
* <code>signcode</code> and <code>chktrust</code> (in progress)
|
||||
for signing and validating Authenticode(tm) signatures on
|
||||
assemblies (or any PE file).
|
||||
|
||||
* Other tools like a, GUI-based, certificate manager...
|
||||
</ul>
|
||||
|
||||
Note that many of the tools requires the class library and/or the
|
||||
runtime to be ready for them. E.g. StrongName and Authenticode signatures
|
||||
tools are of limited use until supported by the runtime.
|
||||
|
||||
<hr>
|
||||
** Other stuff
|
||||
|
||||
<ul>
|
||||
* SSL/TLS for secure communication (a prototype is under way).
|
||||
Some work is already visible in Mono.Security assembly (e.g.
|
||||
RC4, RSAManaged ...).
|
||||
</ul>
|
||||
|
||||
|
||||
<hr>
|
||||
** How to Help
|
||||
|
||||
<ul>
|
||||
* Complete any of the TODO (and feel good about it ;-).
|
||||
|
||||
* Analyse the current coverage of the unit tests on the
|
||||
cryptographic classes and complete the unit tests.
|
||||
|
||||
* Optimization can also be done on most algorithms as crypto
|
||||
is never fast enough. Some have been done using the
|
||||
Community Edition of BoundChecker (a free VisualStudio
|
||||
addon) - recommanded! Just be sure to test every optimization
|
||||
(using the unit test) carefully - it's so fast to break an
|
||||
algorithm ;-).
|
||||
|
||||
* Write some documentation on the cryptographic classes for
|
||||
the <a href="http://go-mono.com/tutorial/html/en/index.html">Mono
|
||||
Handbook</a> as I'm not a very good writer (at least in English).
|
||||
</ul>
|
||||
|
||||
Contact Sebastien Pouliot (<a href="mailto:[email protected]">home</a>
|
||||
, <a href="mailto:[email protected]">work</a>) if you need additional
|
||||
informations about the status of the cryptographic classes.
|
||||
|
||||
<hr>
|
||||
Last reviewed: June 11, 2003 (post mono 0.24)
|
||||
@@ -14,16 +14,13 @@
|
||||
<ul>
|
||||
|
||||
* The development tools (compilers, assembler tools,
|
||||
language reference, design time features): these
|
||||
live in the `monodoc' CVS module.
|
||||
language reference, design time features).
|
||||
|
||||
* Frequently Asked Question compilations.
|
||||
|
||||
* HOWTO documents.
|
||||
|
||||
* The Class Libraries (Both the original .NET class
|
||||
libraries as well as the class libraries produced by
|
||||
the project).
|
||||
* The Class Libraries
|
||||
|
||||
* Tutorials on Mono and the specifics of running it.
|
||||
|
||||
@@ -32,197 +29,11 @@
|
||||
|
||||
</ul>
|
||||
|
||||
* Class Library documentation
|
||||
** Class Library documentation
|
||||
|
||||
We are moving to a new setup for documenting the class libraries,
|
||||
and you can read about it <a href="classlib-doc.html">here</a>.
|
||||
|
||||
There are two classes of documentation: free documentation for
|
||||
existing .NET classes and documentation for the classes that
|
||||
we have developed on top of .NET.
|
||||
|
||||
There is a large body of documentation that came from the ECMA
|
||||
standarization effort that has been checked into CVS. It does
|
||||
not contain everything Mono and .NET have, so they need to be
|
||||
updated and augmented.
|
||||
|
||||
** Gtk# documentation
|
||||
|
||||
We also have a large body of class libraries that are specific
|
||||
to Mono, for example the documentation for Gtk#.
|
||||
|
||||
We have checked in stub documentation for Gtk# into the CVS
|
||||
repository (on gtk-sharp/doc) and we need volunteers to help
|
||||
populate the documentation for it. Since Gtk# is a wrapper
|
||||
for Gtk, plenty of documentation exists in the <a
|
||||
href="http://developer.gnome.org/doc/API">Gnome developer
|
||||
site</a>.
|
||||
|
||||
To get started:
|
||||
|
||||
You need to download Gtk# from the CVS repository. The module
|
||||
name is `gtk-sharp'. You can obtain a copy from both the CVS
|
||||
repository or the anonymous CVS repository.
|
||||
|
||||
To pull your copy type:
|
||||
|
||||
<pre>
|
||||
cvs co gtk-sharp
|
||||
</pre>
|
||||
Documentation lives in gtk-sharp/doc/en. The "en" indicates the
|
||||
English language, the first one we are targeting. We can later
|
||||
do translations, but for now we are focusing on a single
|
||||
language.
|
||||
|
||||
In that directory you will find the documentation organized by
|
||||
namespaces. One directory per namespace. In the directories
|
||||
you will find one XML file per class that needs to be
|
||||
documented. The mission is to fill in the data with useful
|
||||
information. Feel free to grab liberally information from the
|
||||
Gtk documentation from:
|
||||
|
||||
<a href="http://developer.gnome.org/doc/API/">http://developer.gnome.org/doc/API/</a>
|
||||
|
||||
Of course, the API does not apply directly. It only applies at
|
||||
a foundational level, so you can not really just copy and
|
||||
paste. Summaries, and remarks sections can probably be lifted
|
||||
with little or no effort.
|
||||
|
||||
Gtk# uses properties to represent get/set operations in the C
|
||||
API, so you can also use some bits from there.
|
||||
|
||||
Most of the documentation contains already place holders for
|
||||
text, we use the internationally approved phrase for this
|
||||
purpose, `To be added'. So the quest is to remove all of the
|
||||
"To be added" strings with information with resembles as closely
|
||||
as possible the toolkit reality.
|
||||
|
||||
*** The pieces to be filled.
|
||||
|
||||
Summaries are one or two line descriptions of the element
|
||||
(class, struct, interface, method, field, event, delegate), and
|
||||
its used to render summary pages. So it has to be short.
|
||||
|
||||
The "remarks" section is used to describe in detail the element.
|
||||
|
||||
**** Tags.
|
||||
|
||||
As you document Gtk# you will have a number of tags that you can
|
||||
use inside the summary and remarks sections, these are:
|
||||
|
||||
<pre>
|
||||
<para> </para>
|
||||
</pre>
|
||||
Used to separate paragraphs.
|
||||
|
||||
<pre>
|
||||
<paramref name="param_name"/>
|
||||
</pre>
|
||||
Used to reference a formal parameter to a function.
|
||||
|
||||
<pre>
|
||||
<see cref="T:SomeTypeName"/>
|
||||
</pre>
|
||||
Use this to reference a type, this will include an hyper
|
||||
link to the page for type SomeTypeName.
|
||||
|
||||
For example, to reference "System.Enum", do:
|
||||
|
||||
<pre>
|
||||
<see cref="T:System.Enum"/>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<see cref="P:SomeTypeName.Property"/>
|
||||
</pre>
|
||||
Use this to reference a property, this will include an hyper
|
||||
link to the page for the property `Property' of type `SomeTypeName'.
|
||||
|
||||
For example, to reference the BaseType property in System.Type, do:
|
||||
|
||||
<pre>
|
||||
<see cref="P:System.Type.BaseType"/>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<see cref="M:SomeTypeName.Method(type,type)"/>
|
||||
</pre>
|
||||
Use this to reference a method, this will include an hyper
|
||||
link to the page for the method `Method' of type `SomeTypeName'.
|
||||
|
||||
For example, to reference the ToString method in System.Object, do:
|
||||
|
||||
<pre>
|
||||
<see cref="M:System.Object.ToString()"/>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<see langword="keyword"/>
|
||||
</pre>
|
||||
Use this to link to a keyword in the C# language, for
|
||||
example to link to `true', do:
|
||||
|
||||
<pre>
|
||||
<see langword="true"/>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<example> ... </example>
|
||||
</pre>
|
||||
Use example to insert an example. The example can
|
||||
contain explanatory text and code.
|
||||
|
||||
<pre>
|
||||
<code lang="C#">.. </code>
|
||||
</pre>
|
||||
|
||||
Use this to provide a sample C# program, typically used
|
||||
within the <example> tags.
|
||||
|
||||
When providing examples, try to provide a full example,
|
||||
we would like to be able to have a button to compile and
|
||||
run samples embedded into the documentation, or pop up
|
||||
an editor to let the user play with the sample.
|
||||
|
||||
You can link to an example like this:
|
||||
|
||||
<pre>
|
||||
<code lang="C#" source="file.cs"> </code>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<item>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<list type="bullet"> </list>
|
||||
</pre>
|
||||
|
||||
Use this to create lists. Lists contains <item>
|
||||
elements
|
||||
|
||||
<pre>
|
||||
<list type="table"> </lits>
|
||||
<listheader>
|
||||
<term>YOUR FIRST COLUMN</term>
|
||||
<description>YOUR DESCRIPTION</description>
|
||||
</listheader>
|
||||
</pre>
|
||||
For two-column tables. Inside use:
|
||||
|
||||
<pre>
|
||||
<item>
|
||||
<term>First</term>
|
||||
<description>First descritpion</description>
|
||||
</item>
|
||||
<item>
|
||||
<term>Second</term>
|
||||
<description>Second descirption</description>
|
||||
</item>
|
||||
</pre>
|
||||
|
||||
** Words of warning.
|
||||
|
||||
A few words of warning and advice for class documentors:
|
||||
|
||||
A well-documented API can ease hours of frustration; as Mono
|
||||
|
||||
@@ -1,290 +0,0 @@
|
||||
* Embedding the Mono runtime, preliminary version
|
||||
|
||||
This document describes how to embed the Mono runtime in your
|
||||
application, and how to invoke CIL methods from C, and how to
|
||||
invoke C code from CIL
|
||||
|
||||
Slides for Paolo's presentation at .NET ONE on the embedding
|
||||
API are available here: <a
|
||||
href="http://primates.ximian.com/~lupus/slides/embed">Hosting the Mono
|
||||
Runtime</a>. You can also get his <a
|
||||
href="http://primates.ximian.com/~lupus/slides/embed/Mono-0.01.tar.gz">sample
|
||||
Mono module for Perl</a>
|
||||
|
||||
Authors: Paolo Molaro, Miguel de Icaza.
|
||||
|
||||
* Embedding the runtime.
|
||||
|
||||
Embedding the runtime consists of various steps:
|
||||
|
||||
<ul>
|
||||
* Compiling and linking the Mono runtime
|
||||
|
||||
* Initializing the Mono runtime
|
||||
|
||||
* Optionally expose C code to the C#/CIL universe.
|
||||
|
||||
</ul>
|
||||
|
||||
These are discussed in detail next.
|
||||
|
||||
** Compiling and Linking
|
||||
|
||||
To embed the runtime, you have to link your code against the
|
||||
Mono runtime libraries. To do this, you want to pass the
|
||||
flags returned by pkg-config to your compiler:
|
||||
|
||||
<pre>
|
||||
pkg-config --cflags --libs mono
|
||||
</pre>
|
||||
|
||||
Like this:
|
||||
|
||||
<pre>
|
||||
gcc sample.c `pkg-config --cflags --libs mono`
|
||||
</pre>
|
||||
|
||||
You can separate the compilation flags from the linking flags, for
|
||||
instance, you can use the following macros in your makefile:
|
||||
|
||||
<pre>
|
||||
CFLAGS=`pkg-config --cflags mono`
|
||||
LDFLAGS=`pkg-config --libs mono`
|
||||
</pre>
|
||||
|
||||
** Initializing the Mono runtime
|
||||
|
||||
To initialize the runtime, call mono_jit_init, like this:
|
||||
|
||||
<pre>
|
||||
MonoDomain *domain;
|
||||
|
||||
domain = mono_jit_init ("domain-name");
|
||||
</pre>
|
||||
|
||||
That will return a MonoDomain where your code will be
|
||||
executed. You can create multiple domains. Each domain is
|
||||
isolated from the other domains and code in one domain will
|
||||
not interfere with code in other domains. This is useful if
|
||||
you want to host different applications in your program.
|
||||
|
||||
Then you can load an assembly containing code into the domain:
|
||||
|
||||
<pre>
|
||||
MonoAssembly *assembly;
|
||||
|
||||
assembly = mono_domain_assembly_open (domain, "file.dll");
|
||||
if (!assembly)
|
||||
error ();
|
||||
</pre>
|
||||
|
||||
In the above example, the contents of `file.dll' will be
|
||||
loaded into the domain. This only loads the code, but it will
|
||||
not execute anything yet. You can replace `file.dll' with
|
||||
another transport file, like `file.exe'
|
||||
|
||||
To start executing code, you must invoke a method in the
|
||||
assembly, or if you have provided a static Main method (an
|
||||
entry point), you can use the convenience function:
|
||||
|
||||
<pre>
|
||||
retval = mono_jit_exec (domain, assembly, argc - 1, argv + 1);
|
||||
</pre>
|
||||
|
||||
If you want to invoke a different method, look at the
|
||||
`Invoking Methods in the CIL universe' section later on.
|
||||
|
||||
** Shutting down the runtime
|
||||
|
||||
To shutdown the Mono runtime, you have to clean up all the
|
||||
domains that were created, use this function:
|
||||
|
||||
<pre>
|
||||
mono_jit_cleanup (domain);
|
||||
</pre>
|
||||
|
||||
** Applications that use threads.
|
||||
|
||||
The Boehm GC system needs to catch your calls to the pthreads
|
||||
layer, so in each file where you use pthread.h you should
|
||||
include the <gc/gc.h> file.
|
||||
|
||||
* Exposing C code to the CIL universe
|
||||
|
||||
The Mono runtime provides two mechanisms to expose C code to
|
||||
the CIL universe: internal calls and native C code. Internal
|
||||
calls are tightly integrated with the runtime, and have the
|
||||
least overhead, as they use the same data types that the
|
||||
runtime uses.
|
||||
|
||||
The other option is to use the Platform Invoke (P/Invoke) to
|
||||
call C code from the CIL universe, using the standard P/Invoke
|
||||
mechanisms.
|
||||
|
||||
To register an internal call, use this call in the C code:
|
||||
|
||||
<pre>
|
||||
mono_add_internal_call ("Hello::Sample", sample);
|
||||
</pre>
|
||||
|
||||
Now, you need to declare this on the C# side:
|
||||
|
||||
<pre>
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
</pre>
|
||||
|
||||
|
||||
<pre>
|
||||
class Hello {
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
extern static string Sample ();
|
||||
}
|
||||
</pre>
|
||||
|
||||
Since this routine returns a string, here is the C definition:
|
||||
|
||||
<pre>
|
||||
static MonoString*
|
||||
Sample ()
|
||||
{
|
||||
return mono_string_new (mono_domain_get (), "Hello!");
|
||||
}
|
||||
</pre>
|
||||
|
||||
Notice that we have to return a `MonoString', and we use the
|
||||
`mono_string_new' API call to obtain this from a string.
|
||||
|
||||
* Invoking Methods in the CIL universe
|
||||
|
||||
Calling a method in the CIL universe from C requires a number of steps:
|
||||
|
||||
<ul>
|
||||
* Obtaining the MonoMethod handle to the method.
|
||||
|
||||
* The method invocation.
|
||||
</ul>
|
||||
|
||||
** Obtaining a MonoMethod
|
||||
|
||||
To get a MonoMethod there are several ways.
|
||||
|
||||
You can get a MonoClass (the structure representing a type)
|
||||
using:
|
||||
|
||||
<pre>
|
||||
MonoClass *
|
||||
mono_class_from_name (MonoImage *image, const char* name_space, const char *name);
|
||||
</pre>
|
||||
|
||||
and then loop in the returned class method array until you get
|
||||
the one you're looking for. There are examples of such
|
||||
searches as static functions in several C files in
|
||||
metadata/*.c: we need to expose one through the API and remove
|
||||
the duplicates.
|
||||
|
||||
The other, simpler, way is to use the functions in
|
||||
debug-helpers.h: there are examples of their use in monograph,
|
||||
mint and the jit as well. You basically use a string
|
||||
description of the method, like:
|
||||
|
||||
<pre>
|
||||
"System.Object:GetHashCode()"
|
||||
</pre>
|
||||
|
||||
and create a MonoMethodDesc out of it with:
|
||||
|
||||
<pre>
|
||||
MonoMethodDesc* mono_method_desc_new (const char *name, gboolean include_namespace);
|
||||
</pre>
|
||||
|
||||
You can then use:
|
||||
|
||||
<pre>
|
||||
MonoMethod* mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass);
|
||||
MonoMethod* mono_method_desc_search_in_image (MonoMethodDesc *desc, MonoImage *image);
|
||||
</pre>
|
||||
|
||||
to search for the method in a class or in an image. You would
|
||||
tipically do this just once at the start of the program and
|
||||
store the result for reuse somewhere.
|
||||
|
||||
** Invoking a Method
|
||||
|
||||
There are two functions to call a managed method:
|
||||
|
||||
<pre>
|
||||
MonoObject*
|
||||
mono_runtime_invoke (MonoMethod *method, void *obj, void **params,
|
||||
MonoObject **exc);
|
||||
and
|
||||
MonoObject*
|
||||
mono_runtime_invoke_array (MonoMethod *method, void *obj, MonoArray *params,
|
||||
MonoObject **exc);
|
||||
</pre>
|
||||
|
||||
obj is the 'this' pointer, it should be NULL for static
|
||||
methods, a MonoObject* for object instances and a pointer to
|
||||
the value type for value types.
|
||||
|
||||
The params array contains the arguments to the method with the
|
||||
same convention: MonoObject* pointers for object instances and
|
||||
pointers to the value type otherwise. The _invoke_array
|
||||
variant takes a C# object[] as the params argument (MonoArray
|
||||
*params): in this case the value types are boxed inside the
|
||||
respective reference representation.
|
||||
|
||||
From unmanaged code you'll usually use the
|
||||
mono_runtime_invoke() variant.
|
||||
|
||||
Note that this function doesn't handle virtual methods for
|
||||
you, it will exec the exact method you pass: we still need to
|
||||
expose a function to lookup the derived class implementation
|
||||
of a virtual method (there are examples of this in the code,
|
||||
though).
|
||||
|
||||
You can pass NULL as the exc argument if you don't want to
|
||||
catch exceptions, otherwise, *exc will be set to the exception
|
||||
thrown, if any. if an exception is thrown, you can't use the
|
||||
MonoObject* result from the function.
|
||||
|
||||
If the method returns a value type, it is boxed in an object
|
||||
reference.
|
||||
|
||||
We have plans for providing an additional method that returns
|
||||
an unmanaged->managed thunk like this:
|
||||
|
||||
<pre>
|
||||
void* mono_method_get_unmanaged_thunk (MonoMethod *method);
|
||||
</pre>
|
||||
|
||||
You'll be able to store the returned pointer in a function
|
||||
pointer with the proper signature and call that directly from
|
||||
C:
|
||||
|
||||
<pre>
|
||||
typedef gint32 (*GetHashCode) (MonoObject *obj);
|
||||
|
||||
GetHashCode func = mono_method_get_unmanaged_thunk (System_Object_GetHashCode_method);
|
||||
|
||||
gint32 hashvalue = func (myobject);
|
||||
</pre>
|
||||
|
||||
It may not be possible to manage exceptions in that case,
|
||||
though. I need to think more about it.
|
||||
|
||||
** Threading issues
|
||||
|
||||
If your application creates threads on its own, and you want them to
|
||||
be able to call code into the CIL universe with Mono, you have to
|
||||
register the thread with Mono before issuing the call.
|
||||
|
||||
To do so, call the mono_thread_attach() function before you execute
|
||||
any managed code from the thread
|
||||
|
||||
* Samples
|
||||
|
||||
See the sample programs in mono/sample/embed for examples of
|
||||
embedding the Mono runtime in your application.
|
||||
|
||||
|
||||
@@ -3,13 +3,10 @@
|
||||
<a href="#gnome">Mono and GNOME</a><br>
|
||||
<a href="#gui">Building GUI applications with Mono</a><br>
|
||||
<a href="#msft">Mono and Microsoft</a><br>
|
||||
<a href="#platforms">Mono platforms</a><br>
|
||||
<a href="#compatibility">Compatibility</a></br>
|
||||
<a href="#pnpproject">Mono and the Portable.NET Project</a><br>
|
||||
<a href="#webservices">Web Services</a><br>
|
||||
<a href="#asp">Mono and ASP.NET</a><br>
|
||||
<a href="#ado">Mono and ADO.NET</a><br>
|
||||
<a href="#monodoc">MonoDoc</a><br>
|
||||
<a href="#devel">Development Tools and Issues</a><br>
|
||||
<a href="#java">Mono and Java</a><br>
|
||||
<a href="#extending">Extending Mono</a><br>
|
||||
@@ -87,12 +84,10 @@ A: Mono contains a number of components useful for building new
|
||||
|
||||
Q: Where can I find the specification for these technologies?
|
||||
|
||||
A: You can find the information here:
|
||||
A: You can find the work-in-progress documentation from the T3G ECMA
|
||||
group here:
|
||||
|
||||
|
||||
C# <a href="http://www.ecma.ch/ecma1/STAND/ecma-334.htm">http://www.ecma.ch/ecma1/STAND/ecma-334.htm</a>
|
||||
|
||||
CLI <a href="http://www.ecma.ch/ecma1/STAND/ecma-335.htm">http://www.ecma.ch/ecma1/STAND/ecma-335.htm</a>
|
||||
<a href="http://www.dotnetexperts.com">http://www.dotnetexperts.com</a>
|
||||
|
||||
Q: Will you implement the .NET Framework SDK class libraries?
|
||||
|
||||
@@ -123,18 +118,17 @@ Q: When will you ship it?
|
||||
A: Different parts of Mono will achieve usability at different stages,
|
||||
once we are comfortable with the compiler, we will release "Mono Core",
|
||||
which contains everything needed to develop applications with the base
|
||||
class libraries, this will happen soon and in the meantime you can
|
||||
download daily snapshots of our work. Also the full ASP.NET support is
|
||||
close to completion.
|
||||
class libraries. This should be available at some point during 2002.
|
||||
|
||||
Other higher level class libraries (ASP.NET, ADO.NET, WinForms) will
|
||||
Other higher level class libraries (ASP.NET, ADO.NET) will
|
||||
be released when they become stable.
|
||||
|
||||
Q: What major components will you include in Mono?
|
||||
|
||||
A: Hopefully everything that Microsoft ships on their Framework
|
||||
(ADO.NET, ASP.NET, WinForms), and we encourage third party developers to
|
||||
create reusable components that work on both Mono and Windows.
|
||||
(ADO.NET, ASP.NET), and
|
||||
we encourage third party developers to create reusable components that
|
||||
work on both Mono and Windows.
|
||||
|
||||
Q: How can I contribute?
|
||||
|
||||
@@ -272,30 +266,6 @@ A: Gtk# is a set of bindings for the Gtk+ toolkit for C# (and other
|
||||
CIL-enabled languages). System.Windows.Forms is an API defined
|
||||
by Microsoft to build GUI applications.
|
||||
|
||||
Q: Why not implement System.Windows.Forms on top of Gtk# or Qt#?
|
||||
|
||||
A: There are several reasons for this.
|
||||
|
||||
First of all, Gtk+ and Qt are standard toolkits on Linux, and their
|
||||
proponents want to use their favorite toolkits when writing
|
||||
applications.
|
||||
|
||||
Related to this is the idea that System.Windows.Forms is
|
||||
brain-dead in certain areas, such as internationalization.
|
||||
System.Windows.Forms uses explicit sizes for all controls, as opposed
|
||||
to Gtk+ and Qt which use a box/packing model, which can better deal with
|
||||
the different string lengths different languages will have.
|
||||
|
||||
Next is compatibility. It is not possible to implement
|
||||
System.Windows.Forms on top of Gtk+/Qt and have 100% compatibility,
|
||||
because System.Windows.Forms exposes some Win32-isms, such as the
|
||||
Win32 message loop. In order to maintain compatibility, Wine must be used,
|
||||
and this is being done; see the
|
||||
<a href="/winforms.html">System.Windows.Forms effort page</a>.
|
||||
|
||||
Additionally, Wine apps don't currently fit in -- visually -- with
|
||||
Gtk+ or Qt apps.
|
||||
|
||||
Q: Will I be able to run my smart clients on systems powered by Mono?
|
||||
|
||||
A: As long as your applications are 100% .NET and do not make use
|
||||
@@ -340,16 +310,14 @@ A: We do not know, volunteers are working on this, but there is no set
|
||||
|
||||
Q: Is Microsoft helping Ximian with this project?
|
||||
|
||||
A: There is no high level communication between Ximian and Microsoft
|
||||
at this point, but engineers who work on .NET or the ECMA groups
|
||||
have been very friendly, and very nice to answer our questions, or
|
||||
clarify part of the specification for us.
|
||||
A: No. Ximian CTO Miguel de Icaza had a friendly conversation with
|
||||
Microsoft software architect David Stutz, but that's about the
|
||||
extent of the contact. Microsoft is interested in other
|
||||
implementations of .NET and are willing to help make the ECMA spec
|
||||
more accurate for this purpose.
|
||||
|
||||
Microsoft is interested in other implementations of .NET and are
|
||||
willing to help make the ECMA spec more accurate for this purpose.
|
||||
|
||||
Ximian was also invited to participate in the ECMA committee
|
||||
meetings for C# and the CLI.
|
||||
Ximian representatives have also spoken with Sam Ruby at the ECMA
|
||||
TG3 committee to discuss the same issues.
|
||||
|
||||
Q: Is Microsoft or Corel paying Ximian to do this?
|
||||
|
||||
@@ -453,82 +421,6 @@ A: Not yet, but the client side API for authentication is not the problem.
|
||||
Alliance APIs. The problem is people on the web provider end that might use
|
||||
this for authentication.
|
||||
|
||||
<a name="platforms"></a>
|
||||
** Mono Platforms
|
||||
|
||||
Q: What operating systems does Mono run on?
|
||||
|
||||
A: Mono is known to run on Linux, Unix and Windows systems.
|
||||
|
||||
Q: What architectures does Mono support?
|
||||
|
||||
A: Mono today ships with a Just-in-Time compiler for x86-based
|
||||
systems. It is tested regularly on Linux, FreeBSD and Windows
|
||||
(with the XP/NT core).
|
||||
|
||||
There is also an interpreter, which is slower that runs on the
|
||||
s390, SPARC and PowerPC architectures.
|
||||
|
||||
Q: Can Mono run on Windows 9x, or ME editions?
|
||||
|
||||
A: Mono requires Unicode versions of Win32 APIs to run,
|
||||
and only a handful of *W functions is supported under Win9x.
|
||||
|
||||
There is Microsoft Layer for Unicode that provides implementation
|
||||
of these APIs on 9x systems.
|
||||
|
||||
Unfortunately it uses linker trick for delayed load that is not
|
||||
supported by ld, so some sort of adapter is necessary.
|
||||
|
||||
You will need MSLU and one of the following libs to link Mono to
|
||||
unicows.dll <a
|
||||
href="http://mono.eurosoft.od.ua/files/unimono.zip">http://mono.eurosoft.od.ua/files/unimono.zip</a>
|
||||
or alternatively search the net for "libunicows".
|
||||
|
||||
No changes to Mono source code required, the only thing is to make
|
||||
sure that linker will resolve imports to adapter library instead of
|
||||
Win32 libs. This is achieved by inserting -lunimono before
|
||||
-lkerner32/user32 in the linker's specs file.
|
||||
|
||||
<a name="compatibility"></a>
|
||||
** Compatibility
|
||||
|
||||
Q: Can Mono run applications developed with the Microsoft.NET fraemwork?
|
||||
|
||||
A: Yes, Mono can run applications developed with the Microsft .NET Framework
|
||||
on Unix. There are a few caveats to keep in mind: Mono has not
|
||||
been completed yet, so a few API calls might be missing; And in
|
||||
some cases the Mono behavior *might* be incorrect.
|
||||
|
||||
Q: Will missing API entry points be implemented?
|
||||
|
||||
A: Yes, the goal of Mono is to implement precisely the .NET Framework
|
||||
API (as well as compile-time selectable subsets, for those
|
||||
interested in a lighter version of Mono).
|
||||
|
||||
Q: If the behavior of an API call is different, will you fix it?
|
||||
|
||||
A: Yes, we will. But we will need your assistance for this. If you find a bug
|
||||
in the Mono implementation, please fill a bug report in <a
|
||||
href="http://bugzilla.ximian.com">http://bugzilla.ximian.com</a>.
|
||||
Do not assume we know about the problem, we might not, and using the bug tracking
|
||||
system helps us organize the development process.
|
||||
|
||||
Q: Can I develop my applications on Windows, and deploy on a supported
|
||||
Mono platform (like Linux)?
|
||||
|
||||
A: Yes, you can.
|
||||
|
||||
As of today, Mono is not 100% finished, so it is sometimes useful
|
||||
to compile the code with Mono, to find out if your application
|
||||
depends on unimplemented functionality.
|
||||
|
||||
Q: Will applications run out the box with Mono?
|
||||
|
||||
A: Sometimes they will. But sometimes a .NET application might invoke
|
||||
Win32 API calls, or assume certain patterns that are not correct
|
||||
for cross-platform applications.
|
||||
|
||||
<a name="pnpproject"></a>
|
||||
** Mono and Portable.NET
|
||||
|
||||
@@ -540,72 +432,45 @@ A: Most of Mono is being written using C#, with only
|
||||
|
||||
It is easier to describe what is unique about Mono:
|
||||
<ul>
|
||||
<li> An advanced native-code compilation engine: Both
|
||||
just-in-time compilation (JIT) and pre-compilation of CIL
|
||||
bytecodes into native code are supported.
|
||||
|
||||
<li> A foundation for code optimization: The new code generator in
|
||||
Mono builds on the experience of our first JIT engine, and enables
|
||||
us to implement various advanced compiler optimization
|
||||
tricks. With an SSA-framework, plenty of new optimizations are possible.
|
||||
|
||||
The current list of optimizations are: Peephole postpass,
|
||||
Branch optimizations, Inline method calls, Constant folding, Constant
|
||||
propagation, Copy propagation, Dead code elimination, Linear scan
|
||||
global reg allocation, Conditional moves, Emit per-domain code,
|
||||
Instruction scheduling, Intrinsic method implementations, Tail
|
||||
recursion and tail calls, Loop related optimizations, Fast x86 FP
|
||||
compares, Leaf procedures optimizations
|
||||
|
||||
<li> A self-hosting C# compiler written in C#, which is clean, easy
|
||||
to maintain.
|
||||
|
||||
<li> Focus on the .NET Framework: we are tracking down the .NET
|
||||
Framework API definition, as we believe it is the API people
|
||||
will be most familiar with.
|
||||
|
||||
<li> A multi-platform runtime engine: both a JIT engine and an
|
||||
interpreter exist. The JIT engine runs currently on x86
|
||||
systems, while the interpreter works on SPARC, StrongARM,
|
||||
s390 and PowerPC systems.
|
||||
systems, while the interpreter works on SPARC, StrongARM and
|
||||
PowerPC systems.
|
||||
|
||||
Our new compilation engine is being ported to the PowerPC.
|
||||
|
||||
<li> Supports Linux, BSD, Windows and Solaris at this point.
|
||||
<li> Supports Linux, Windows and Solaris at this point.
|
||||
|
||||
<li> The JIT engine is written using a portable instruction
|
||||
selector which not only generates good code but
|
||||
selector which not only generates good code (we are told
|
||||
that we are faster than Rotor, but it is hard to tell) but
|
||||
is also the foundation to re-target the JIT engine to other
|
||||
systems.
|
||||
|
||||
<li> Full support for remoting in the runtime.
|
||||
The system employed is described in various compiler
|
||||
books and it is very similar to what is described in the
|
||||
book that covers LCC, the ANSI C retargetable C compiler.
|
||||
|
||||
<li> The JIT engine supports in-lining, constant folding and propagation,
|
||||
|
||||
<li> Full support for remoting in the runtime, but the class
|
||||
libraries are still behind.
|
||||
|
||||
<li> The C# compiler, the JIT engine and the class libraries are
|
||||
mature enough that the whole system has been self-hosting
|
||||
since April 2002. This means that we develop Mono
|
||||
completely with itself at this point.
|
||||
mature enough that the whole system is self-hosting. This means that
|
||||
we develop Mono completely with itself at this point.
|
||||
|
||||
By forcing ourselves to use our own code to develop our
|
||||
tools, we bug fix problems rapidly, and the system is
|
||||
overall more robust and tested than if we did not.
|
||||
<li> We are not yet done, and there is a lot of work left to be
|
||||
done
|
||||
|
||||
<li> We have a great community of developers, without which Mono
|
||||
would not be possible.
|
||||
|
||||
<li> We will provide an ahead of time compilation mode in the
|
||||
future.
|
||||
</ul>
|
||||
|
||||
In general, Mono is more mature and complete since it has been used
|
||||
to develop itself, which is a big motivator for stability and
|
||||
correctness, while Portable.NET remains pretty much an untested
|
||||
platform.
|
||||
|
||||
Q: I hear Mono keeps changing the P/Invoke API, why?
|
||||
|
||||
A: We are just fixing our implementation to be compatible with the
|
||||
Microsoft implementation. In other words, the Mono P/Invoke API is
|
||||
more complete when compared to the Portable.NET version, hence
|
||||
various pieces of software that depend on this extended
|
||||
functionality fail to work properly with Portable.NET.
|
||||
|
||||
<a name="webservices"></a>
|
||||
** Web Services
|
||||
|
||||
@@ -643,62 +508,23 @@ A: Yes. The CLI contains enough information about a class that
|
||||
exposing it to other RPC systems (like CORBA) is really simple, and
|
||||
does not even require support from an object.
|
||||
|
||||
<a href="http://remoting-corba.sourceforge.net/">Remoting.CORBA</a> is
|
||||
a CORBA implementation that is gaining momentum.
|
||||
|
||||
Building an implementation of the Bonobo interfaces once this is ready
|
||||
should be relatively simple.
|
||||
We will be implementing CORBA inter-operation as an extension to the
|
||||
Mono classes so that we can integrate with Bonobo, just like
|
||||
Microsoft provides COM inter-operation classes and support
|
||||
mechanisms.
|
||||
|
||||
Q: Can I serialize my objects to other things other than XML?
|
||||
|
||||
A: Yes, although the serializing tools have not yet been planned, and
|
||||
you would probably have to implement them yourself.
|
||||
you would probably have to implement them yourself.
|
||||
|
||||
Q: Will Mono use ORBit?
|
||||
|
||||
A: There are a few advantages in using ORBit, like reusing existing code
|
||||
and leveraging all the work done on it. Michael Meeks has posted
|
||||
a few <a href="http://lists.ximian.com/archives/public/mono-list/2002-September/008592.html">reasons</a>,
|
||||
as well as some <a href="http://lists.ximian.com/archives/public/mono-list/2002-September/008657.html">ideas</a>
|
||||
that could be used to reuse ORBit.
|
||||
|
||||
Most users are likely to choose a native .NET solution, like <a href="http://cvs.gnome.org/bonsai">Remoting.CORBA</a>
|
||||
|
||||
|
||||
<a name="monodoc"></a>
|
||||
** MonoDoc
|
||||
|
||||
Q: What is MonoDoc?
|
||||
|
||||
A: MonoDoc is a graphical documentation browser for the Mono class
|
||||
libraries. Currently, monodoc consists of a Gtk# application and is
|
||||
in heavy development.
|
||||
A: No. Mono will be using a new implementation of CORBA that isn't still started.
|
||||
|
||||
<a name="devel"></a>
|
||||
** Development Tools and Issues
|
||||
|
||||
Q: I am having trouble compiling a new version of Mono from CVS, it
|
||||
complains about my runtime being out of sync.
|
||||
|
||||
A: Jonathan Pryor has provided the following answer:
|
||||
|
||||
To upgrade your class libraries and compiler, see the See
|
||||
README.building in the MCS directory.
|
||||
|
||||
The single biggest source of confusion seems to be the "Your
|
||||
runtime is out of sync" messages. Realize that this is *normal*
|
||||
while BUILDING. Think about it: you're building a new class
|
||||
library with the old runtime. If the new class library references
|
||||
a function that the old runtime knows nothing about, the runtime
|
||||
system issues this warning.
|
||||
|
||||
Basically what needs to happen is for a new mono runtime to be
|
||||
compiled, then the corlib class library be compiled, and once this
|
||||
is done, install the new runtime, followed by corlib.
|
||||
|
||||
Once this is done, you can continue building your entire
|
||||
environment.
|
||||
|
||||
Q: Will it be possible to use the CLI features without using byte codes
|
||||
or the JIT?
|
||||
|
||||
@@ -819,76 +645,29 @@ Q: I'm wondering if there are any plans to start using nant to build the
|
||||
A: Maybe well be doing some sort of automated build process + testing when
|
||||
the summer finish.
|
||||
|
||||
Q: My C code uses the __stdcall which is not availble on Linux, how can I
|
||||
make the code portable Windows/Unix across platforms?
|
||||
|
||||
A: Replace the __stdcall attribute with the STDCALL macro, and include this
|
||||
in your C code for newer gcc versions:
|
||||
|
||||
#ifndef STDCALL
|
||||
#define STDCALL __attribute__((stdcall))
|
||||
#endif
|
||||
|
||||
Q: I want to be able to execute Mono binaries, without having to use the "mono"
|
||||
command. How can I do this?
|
||||
|
||||
A: From Carlos Perelló:
|
||||
|
||||
<i>I think that the best solution is the binfmt feature with the
|
||||
wrapper that exists with Debian packages at:
|
||||
|
||||
<a href="http://www.debianplanet.org/mono/dists/unstable/main/source/admin/">http://www.debianplanet.org/mono/dists/unstable/main/source/admin/</a>
|
||||
|
||||
If you want use it with Big endian machines, you should apply a patch
|
||||
(<a href="http://carlos.pemas.net/debian/mono/binfmt-detector-cli.c.diff">http://carlos.pemas.net/debian/mono/binfmt-detector-cli.c.diff</a>)
|
||||
|
||||
It works really good and lets you use wine also, it reads the .exe file
|
||||
headers and check if it's a .net executable.
|
||||
|
||||
This way you just execute: ./my-cool-mono-application.exe and it works
|
||||
without the need of any wrapper.</i>
|
||||
|
||||
<a name="asp">
|
||||
** Mono and ASP.NET
|
||||
|
||||
Q: Does Mono support ASP.NET?
|
||||
Q: Is Mono supporting ASP.NET?
|
||||
|
||||
A: Yes.
|
||||
|
||||
Mono supports ASP.NET, we have shown an unmodified IBuySpy
|
||||
installation running on Mono as well as various other programs. You can
|
||||
try it yourself downloading the XSP server.
|
||||
A: Yes. The development of the support for ASP.NET comes in various stages,
|
||||
here is what Gonzalo has been working on: 1. The Parser. 2. Getting the
|
||||
parser to generate output compatible with ASP.NET. 3. Running the sample
|
||||
output with the real Microsoft runtime but using our generated page. 4.
|
||||
Running the sample with our classes with the .NET runtime. 5. Running
|
||||
our sample code with our classes with our runtime. This is the process
|
||||
we are following. Currently Gonzalo has reached point 5.
|
||||
|
||||
Q: Do I need install cygwin to work on ASP.NET in mono or Linux is enough since
|
||||
it is self host right now.
|
||||
|
||||
A: Linux is enough.
|
||||
|
||||
Q: How can I run ASP.NET-based applications with Mono?
|
||||
|
||||
A: You need the Mono runtime and a hosting web server. Currently we distribute a
|
||||
small web server called `xsp' which is used to debug applications, or you can choose
|
||||
to use Daniel's Apache 2 module.
|
||||
|
||||
Q: Any plan to make ASP.NET in mono works with Apache in Linux?.
|
||||
|
||||
A: Daniel has authored an Apache2 Module for Mono that hosts the ASP.NET runtime
|
||||
and is available here: <a
|
||||
href="http://apacheworld.org/modmono/">http://apacheworld.org/modmono/</a>
|
||||
|
||||
Q: Will you support Apache 1?
|
||||
|
||||
A: Modules developed for Apache 2 are not compatible with Apache 1.3
|
||||
Daniel plans to support Apache 1.3 in the future but the current focus is on
|
||||
Apache 2, because of the better support for threading and Windows.
|
||||
|
||||
Q: Can I run Apache 1 and Apache 2 on the same machine?
|
||||
|
||||
You can always keep a copy of Apache 2 running in paralell with your Apache
|
||||
1.3 (either different port or using a reverse proxy).
|
||||
|
||||
You can also bind the two servers to different IP addresses on the
|
||||
same physical machine.
|
||||
A: Yes, we have plans to do so, but we need to wait for Patrik's patches to
|
||||
HttpRuntime. Once that is there, writing a mod_mono should be trivial
|
||||
(look at mono/samples/embed for a sample embedded application).
|
||||
|
||||
<a name="ado">
|
||||
** Mono and ADO.NET
|
||||
@@ -911,12 +690,6 @@ A: We are implementing all the classes in Microsoft .NET's System.Data, so
|
||||
you can be sure that things will work the same in Mono as with the Microsoft
|
||||
implementation.
|
||||
|
||||
Q: Does Mono can to connect to Sybase by using Mono.Data.*?
|
||||
|
||||
A: Yes. use Mono.Data.SybaseClient. First of all you have to create a
|
||||
SybaseConnection, and then, from it, use it as any other
|
||||
IDbConnection-based class.
|
||||
|
||||
<a name="java">
|
||||
** Mono and Java
|
||||
|
||||
@@ -941,12 +714,12 @@ A: You can get very good tools for doing Java development on free
|
||||
|
||||
Q: Could Java target the CLI?
|
||||
|
||||
A: Yes, Java could target the CLI, Microsoft's J# compiler does that.
|
||||
A: Yes, Java could target the CLI. We have details on a <a
|
||||
href="ideas.html#guavac">project</a> that someone could take on to
|
||||
make this happen.
|
||||
|
||||
The <a href="http://weblog.ikvm.net/">IKVM</a> project builds a
|
||||
Java runtime that works on top of .NET and on top of Mono. IKVM is
|
||||
essentially a JIT compiler that translates from JVM bytecodes into
|
||||
CIL instructions, and then lets the native JIT engine take over.
|
||||
Microsoft has an implementation of the Java language called J# that
|
||||
can target the CIL execution engine.
|
||||
|
||||
Q: Is it possible to write a JVM byte code to CIL converter?
|
||||
|
||||
@@ -968,8 +741,6 @@ A: Yes, it is possible. Here are a few starting point:
|
||||
be translated into the equivalent "meaning" in CLR-land.
|
||||
</ul>
|
||||
|
||||
See also the <a href="http://weblog.ikvm.net/">IKVM project</a>
|
||||
|
||||
Q: Could mono become a hybrid CIL/java platform?
|
||||
|
||||
A: No. It is quite far from the philosophy of the project. The idea of Mono
|
||||
@@ -984,19 +755,9 @@ A: No. It is quite far from the philosophy of the project. The idea of Mono
|
||||
|
||||
Q: Do you plan to implement a Javascript compiler?
|
||||
|
||||
A: Yes. The beginnings of the JScript compiler can be found on CVS.
|
||||
Cesar coordinates this effort.
|
||||
|
||||
Q: Can Mono or .NET share system classes (loaded from mscore.dll and other
|
||||
libs) or will it behave like Sun's Java VM?
|
||||
|
||||
A: What you can do with mono is to load different applications in their own
|
||||
application domain: this is a feature of the CLR that allows sandboxing
|
||||
applications inside a single process space. This is usualy exploited to
|
||||
compartmentalize different parts of the same app, but it can also be
|
||||
effectively used to reduce the startup and memory overhead.
|
||||
Using different appdomains the runtime representation of types and
|
||||
methods is shared across applications.
|
||||
A: Yes. Eto Demerzal has started a Rhino port to C#.
|
||||
After this is completed, we will begin developing
|
||||
the JavaScript compiler.
|
||||
|
||||
<a name="extending"></a>
|
||||
** Extending Mono
|
||||
@@ -1027,13 +788,10 @@ A: Embracing a good technology is good. Extending technologies in
|
||||
encourage you to make those classes operate correctly well in both
|
||||
Mono and .NET.
|
||||
|
||||
Today Mono ships with a number of extra libraries that were
|
||||
developed either by members of the Mono community, or other
|
||||
groups.
|
||||
|
||||
Q: Is there any way I can develop the class libraries using Linux yet?
|
||||
|
||||
A: Yes. Mono has been selfhosting since March 2002.
|
||||
A: Yes. Some class libraries can be developed on Linux. Search for
|
||||
Paolo's post (he lists which classes can be compiled fine now).
|
||||
|
||||
Q: Is there any way I can install a known working copy of mono in /usr,
|
||||
and an experimental copy somewhere else, and have both copies use
|
||||
@@ -1258,6 +1016,9 @@ A: We will have to evaluate the licenses for compatibility first,
|
||||
but as a general rule, we will accept the code under the same
|
||||
terms of the "container" module.
|
||||
|
||||
Q: Is the Mono
|
||||
|
||||
|
||||
<a name="patents"></a>
|
||||
** Patents
|
||||
|
||||
@@ -1265,61 +1026,27 @@ Q: Could patents be used to completely disable Mono (either submarine
|
||||
patents filed now, or changes made by Microsoft specifically to
|
||||
create patent problems)?
|
||||
|
||||
A: First some background information.
|
||||
A: No. First, its basic functional capabilities have pre-existed too
|
||||
long to be held up by patents. The basic components of Mono are
|
||||
technologically equivalent to Sun's Java technology, which has been
|
||||
around for years.
|
||||
|
||||
The .NET Framework is divided in two parts: the ECMA/ISO covered
|
||||
technologies and the other technologies developed on top of it like
|
||||
ADO.NET, ASP.NET and Windows.Forms.
|
||||
Mono will also implement multi-language and
|
||||
multi-architecture support, but there are previous technologies
|
||||
such as UCSD p-code and ANDF that also support multiple languages
|
||||
using a common intermediate language. The libraries are similar
|
||||
to other language's libraries, so again, they're too similar to
|
||||
be patentable in large measure.
|
||||
|
||||
Mono implements the ECMA/ISO covered parts, as well as being a
|
||||
project that aims to implement the higher level blocks like
|
||||
ASP.NET, ADO.NET and Windows.Forms.
|
||||
|
||||
The Mono project has gone beyond both of those components and has
|
||||
developed and integrated third party class libraries, the most
|
||||
important being: Debugging APIs, integration with the Gnome
|
||||
platform (Accessibility, Pango rendering, Gdk/Gtk, Glade, GnomeUI),
|
||||
Mozilla, OpenGL, extensive database support (Microsoft only
|
||||
supports a couple of providers out of the box, while Mono has
|
||||
support for 11 different providers), our POSIX integration
|
||||
libraries and finally the embedded API (used to add scripting to
|
||||
applications and host the CLI, or for example as an embedded
|
||||
runtime in Apache).
|
||||
|
||||
The core of the .NET Framework, and what has been patented by
|
||||
Microsoft falls under the ECMA/ISO submission. Jim Miller at
|
||||
Microsoft has made a statement on the patents covering ISO/ECMA,
|
||||
(he is one of the inventors listed in the patent): <a
|
||||
href="https://mailserver.di.unipi.it/pipermail/dotnet-sscli/msg00218.html">here</a>.
|
||||
|
||||
Basically a grant is given to anyone who want to implement those
|
||||
components for free and for any purpose.
|
||||
|
||||
The controversial elements are the ASP.NET, ADO.NET and
|
||||
Windows.Forms subsets. Those are convenient for people who need
|
||||
full compatibility with the Windows platform, but are not required
|
||||
for the open source Mono platform, nor integration with today's
|
||||
Mono's rich support of Linux.
|
||||
|
||||
The Mono strategy for dealing with these technologies is as
|
||||
follows: (1) work around the patent by using a different
|
||||
implementation techinque that retains the API, but changes the
|
||||
mechanism; if that is not possible, we would (2) remove the pieces
|
||||
of code that were covered by those patents, and also (3) find prior
|
||||
art that would render the patent useless.
|
||||
However, if Microsoft does patent some technology, then our plan is
|
||||
to either (1) work around it, (2) chop out patented pieces, (3)
|
||||
find prior art that would render the patent useless.
|
||||
|
||||
Not providing a patented capability would weaken the
|
||||
interoperability, but it would still provide the free software /
|
||||
open source software community with good development tools, which
|
||||
is the primary reason for developing Mono.
|
||||
|
||||
The patents do not apply in countries where software patents are
|
||||
not allowed.
|
||||
|
||||
For Linux server and desktop development, we only need the ECMA
|
||||
components, and things that we have developed (like Gtk#) or Apache
|
||||
integration.
|
||||
|
||||
<a name="etc"></a>
|
||||
** Miscellaneous Questions
|
||||
|
||||
@@ -1387,27 +1114,7 @@ A: If you use mono from cvs, you need to be prepared for changes in the
|
||||
the right thing (but occasionally you may need to do it the other
|
||||
way around).
|
||||
|
||||
Q: Why are you going for a GtkHtml implementation?
|
||||
|
||||
A: GtkHTML is just a lightweight HTML rendering engine that does not
|
||||
support CSS, so we need it to look decent for those of us that will
|
||||
be using the documentation in our day-to-day work on Linux. The
|
||||
Web-based interfaces lack the agility that you get from a native GUI
|
||||
tool to browse your documentation. Probably later on, we will write
|
||||
scripts and generate a full documentation set that is web-browsable,
|
||||
but we need a command-line and GUI tools that we can use natively on
|
||||
Linux when disconnected from the Web (and that has better
|
||||
interactions than a web page).
|
||||
|
||||
Q: Is there a command-line tool that allows me to access .NET interactively?
|
||||
|
||||
A: There are several but one that is free software and uses MCS is the one
|
||||
Dennis Lu from Rice University is working on; a REPL C# interpreter.
|
||||
|
||||
Q: Is it possible to use Visual C++ with Mono?.
|
||||
|
||||
A: It's possible to run VC++ generated apps under Mono, but we do not
|
||||
provide a Manager C++ compiler ourselves.
|
||||
|
||||
<a name="problems"></a>
|
||||
** Mono Common Problems
|
||||
|
||||
@@ -1,196 +0,0 @@
|
||||
* Firebird and Interbase Data Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Data Provider for Firebird and Interbase databases</li>
|
||||
|
||||
<li>Does not exist in Mono, but is a separate project</li>
|
||||
|
||||
<li>The <a href="http://firebird.sourceforge.net/index.php">Firebird Relational Database</a> is
|
||||
is an independent project which uses source code based on the Interbase source code released
|
||||
by Borland under the Interbase Public License</li>
|
||||
|
||||
<li>Both the Firebird Relational Database and the Firebird .NET Data Provider can be
|
||||
downloaded from <a href="http://sourceforge.net/projects/firebird/">here</a></li>
|
||||
|
||||
<li>The Firebird .NET Data provider has been made
|
||||
available by Carlos Guzmán Álvarez (aka "Carlos G.A."), who has also made a
|
||||
number of contributions to the OdbcJdbc code</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Currently, it is able to connect to Firebird and Interbase databases
|
||||
and execute commands</li>
|
||||
|
||||
<li>The new data
|
||||
provider/driver is written in C# and provides a high-performance native
|
||||
implementation of the GDS32/API functions. This means that .Net developers
|
||||
will be able to access Firebird databases without the need of Firebird
|
||||
client install</li>
|
||||
|
||||
<li>In support of the new module, a new mailing list
|
||||
<a href="http://lists.sourceforge.net/lists/listinfo/firebird-net-provider">firebird-net-provider</a> has
|
||||
been created. Please use this list for any
|
||||
questions that you may have about the provider</li>
|
||||
|
||||
<li>Stuff that works:
|
||||
<ul>
|
||||
<li>Currently implemented classes:
|
||||
<ul>
|
||||
<li>Connection and Connection Pooling</li>
|
||||
<li>Command</li>
|
||||
<li>Transaction</li>
|
||||
<li>CommandBuilder</li>
|
||||
<li>DataAdapter</li>
|
||||
<li>DataReader</li>
|
||||
<li>Error</li>
|
||||
<li>ErrorCollection</li>
|
||||
<li>Exception</li>
|
||||
<li>Parameter</li>
|
||||
<li>ParameterCollection</li>
|
||||
<li>Transaction</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Bug fixing</li>
|
||||
<li>Improving API reference documentation</li>
|
||||
<li>Full testing with Firebird 1.5</li>
|
||||
<li>Test with Mono ( http://www.go-mono.com )
|
||||
<ul>
|
||||
<li>Status : Started</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Support for array datatype
|
||||
<ul>
|
||||
<li>Status : Started</li>
|
||||
<li>Comments: See Interbase API reference documentation</li>
|
||||
<li>Add new file FbArray.cs for array fields management</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Support for Stored Procs calls that have returns values
|
||||
<ul>
|
||||
<li>Status : Pending.</li>
|
||||
<li>Comments: Modify the isc_dsql_prepare method of GDS implementation for
|
||||
allow to return the output parameters.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Implementation of FbClientPermission and FbClientPermissionAttribute
|
||||
<ul>
|
||||
<li>Status : Pending</li>
|
||||
<li>Comments: See if these are really needed for Firebird</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Improve Logger implementation
|
||||
<ul>
|
||||
<li>Status: Pending</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Need a working mono and mcs</li>
|
||||
|
||||
<li>Need access to a Firebird Relational Database or you can download
|
||||
it from <a href="http://firebird.sourceforge.net">here</a></li>
|
||||
|
||||
<li>Get the Firebird .NET data provider from here as
|
||||
<a href="http://lists.sourceforge.net/lists/listinfo/firebird-net-provider">firebird-net-provider</a>. Make
|
||||
sure the Firebird .NET data provider binary assembly FirebirdSql.Data.Firebird.dll is
|
||||
installed in the same place as the mono class libraries.</li>
|
||||
|
||||
<li>Has a ConnectionString format:
|
||||
<pre>
|
||||
"Database=databasefile.gdb;User=user;Password=pass;Dialect=3;Server=hostname"
|
||||
</pre>
|
||||
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using FirebirdSql.Data.Firebird;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Database=C:\\PROGRAM FILES\\FIREBIRD\\EXAMPLES\\EMPLOYEE.GDB;" +
|
||||
"User=SYSDBA;" +
|
||||
"Password=masterkey;" +
|
||||
"Dialect=3;" +
|
||||
"Server=localhost";
|
||||
IDbConnection dbcon = new FbConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql = "SELECT * FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
object dataValue = myReader.GetValue(0);
|
||||
string sValue = dataValue.ToString();
|
||||
Console.WriteLine("Value: " + sValue);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r FirebirdSql.Data.Firebird.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r FirebirdSql.Data.Firebird.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
* The GCC front-end
|
||||
|
||||
Jeremy Singer has developed a .NET backend for GCC, his
|
||||
research work is available <a
|
||||
href="http://www.cl.cam.ac.uk/~jds31/research/gccnet/">here</a>.
|
||||
The GCC front-end will accept input in a binary file with
|
||||
codes in the Common Intermediate Language (CIL), and generate
|
||||
native code.
|
||||
|
||||
This will allow pre-compilation and full optimization to take
|
||||
place before a program is executed.
|
||||
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
* Gtk#
|
||||
|
||||
<a href="http://gtk-sharp.sourceforge.net">Gtk#</a> (Gtk
|
||||
sharp) is a set of C# language bindings for the
|
||||
<a href="http://www.gtk.org">Gtk+</a> toolkit and other
|
||||
libraries that are part of the
|
||||
<a href="http://www.gnome.org">GNOME</a> platform .
|
||||
|
||||
* Wiki
|
||||
|
||||
There is a <a
|
||||
href="http://www.nullenvoid.com/gtksharp/wiki/index.php/">Gtk#
|
||||
Wiki</a>. You are encouraged to contribute to it.
|
||||
|
||||
** API of Gtk#
|
||||
|
||||
The Gtk# API is documented using the ECMA XML document format, you can read
|
||||
more about it <a href="documentation.html">here</a>. You can
|
||||
also use the MonoDoc tool that ships with Gtk# documentation.
|
||||
|
||||
** Where to learn more.
|
||||
|
||||
Visit the official site for the <a href="http://gtk-sharp.sourceforge.net">Gtk# Project</a>.
|
||||
The <a href="http://www.go-mono.org/faq">Mono FAQ</a> has some useful
|
||||
information too.
|
||||
|
||||
** GTK# On Linux
|
||||
|
||||
<p>Where to get distributions of GTK# for Linux:
|
||||
<ul>
|
||||
<li><a href="http://gtk-sharp.sourceforge.net">RPMs</a></li>
|
||||
<li><a href="http://www.debianplanet.org/mono/">Debs</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Buidling on Linux:
|
||||
|
||||
<ul>
|
||||
<li>Get GTK# source from <a href="http://gtk-sharp.sourceforge.net">Gtk# Project</a>.</li>
|
||||
<li>run ./autogen.sh --prefix=my_mono_installation_prefix</li>
|
||||
<li>make</li>
|
||||
<li>make install</li>
|
||||
</ul>
|
||||
|
||||
** GTK# On Windows
|
||||
|
||||
<p>Look at our Wiki for installation instructions <a href="http://www.nullenvoid.com/gtksharp/wiki/index.php/InstallingBeginnersGuide">here</a>
|
||||
|
||||
|
||||
<p>If you want to build GTK# yourself on Windows:
|
||||
|
||||
<p>To build gtk# under windows, you will need the following:
|
||||
|
||||
<ul>
|
||||
<li>cygwin from <a href="http://www.cygwin.com/">here</a> When installing Cygwin via setup.exe,
|
||||
by default binutils and other tools do not get installed; you have to make
|
||||
sure to select these items. Just make
|
||||
sure Base and Development are set to Install.</li>
|
||||
<li>Mono 0.17 or later from <a href="http://www.go-mono.com/download.html">here</a>
|
||||
You can use Windows Setup Wizard (NT/2000/XP).</li>
|
||||
<li>GTK+ 2.0 (and dependencies). You can obtain gtk+ 2.0 by either of the
|
||||
following:
|
||||
<ul>
|
||||
<li>You can get a Windows Installer at:
|
||||
<a href="http://www.dropline.net/jade/download.html">here</a> </li>
|
||||
<li>or get the separate binary and dev/lib packages at
|
||||
at <a href="http://www.gimp.org/~tml/gimp/win32/downloads.html">here</a> </li>
|
||||
<li>or binary package from Dev-C++ site <a href="http://www.bloodshed.net/dev/packages/gtk.html">here</a> </li>
|
||||
<li>or get Gtk4Win <a href="http://wingtk.sourceforge.net/index.html">here</a> </li>
|
||||
<li>or the source at <a href="http://www.gtk.org/">here</a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>binary distriubtion of a current web browser
|
||||
like Internet Explorer 4.0, Mozilla 1.0, or Netscape 7.0 which
|
||||
includes things like msvcrt.dll.</li>
|
||||
<li>Microsoft .NET Framework at
|
||||
<a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a> </li>
|
||||
|
||||
<p>If you are running Windows 95/98/ME, then you will need Unicode support.
|
||||
Look in
|
||||
mono-list archives for information about how to get
|
||||
Mono to work on Windows 9x.
|
||||
<a href="http://lists.ximian.com/archives/public/mono-list/2002-December/004158.html">here</a>
|
||||
|
||||
<p>Environment Variables to set:
|
||||
<ul>
|
||||
<li>PATH - set to your mono installation bin and lib path.
|
||||
For example, my mono installation prefix is:
|
||||
<pre>
|
||||
F:/cygwin/home/DanielMorgan/mono/install
|
||||
</pre>
|
||||
<p>So, I would set my PATH in the Windows Control Panel as:
|
||||
<pre>
|
||||
F:/cygwin/home/DanielMorgan/mono/install/bin;F:/cygwin/home/DanielMorgan/mono/install/lib</li>
|
||||
</pre>
|
||||
</li>
|
||||
<li>LD_LIBRARY_PATH - set to your mono installation lib path</li>
|
||||
<li>PKG_CONFIG_PATH - set to your mono installation lib/pkgconfig path, such
|
||||
as,
|
||||
<pre>
|
||||
F:/cygwin/home/DanielMorgan/mono/install/lib/pkgconfig</li>
|
||||
</pre>
|
||||
|
||||
<p>If you got the gtk-sharp source, cd to the gtk-sharp directory, type:
|
||||
<pre>
|
||||
./autogen.sh --prefix=~/mono/install
|
||||
</pre>
|
||||
|
||||
<p>Set your --prefix= to whatever your mono installation prefix is located.
|
||||
This will take awhile to go through the ./autogen.sh and ./configure...
|
||||
|
||||
<p>After that it finishes succesfully, you run make with the makefile.win32
|
||||
like:
|
||||
<pre>
|
||||
make -f makefile.win32
|
||||
</pre>
|
||||
|
||||
<p>After that finishes succesfully, you can copy to your mono installation lib
|
||||
path like:
|
||||
<pre>
|
||||
cp */*.dll ~/mono/install/lib
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
<p>The pkg-config files for
|
||||
gtk+ 2.0 and dependencies will need to be set correctly if they haven't
|
||||
already been.
|
||||
|
||||
<p>Look in your mono installation/lib/pkgconfig, such as,
|
||||
<pre>
|
||||
F:/cygwin/home/DanielMorgan/mono/install/lib/pkgconfig
|
||||
</pre>
|
||||
|
||||
<p>You will find files like: gtk+-2.0.pc
|
||||
|
||||
<p>Edit the line that says
|
||||
|
||||
<pre>
|
||||
prefix=something
|
||||
</pre>
|
||||
|
||||
<p>And set it to your mono installation prefix, such as,
|
||||
|
||||
<pre>
|
||||
prefix=F:/cygwin/home/DanielMorgan/mono/install
|
||||
</pre>
|
||||
|
||||
<p>Do this for all the .pc files in that directory. If there are not any, then
|
||||
you will need to create them. Or get them from somewhere like the dev
|
||||
packages at
|
||||
<a href="http://www.gimp.org/~tml/gimp/win32/downloads.html">here</a>
|
||||
|
||||
** GTK# On FreeBSD
|
||||
|
||||
TODO. Any volunteers?
|
||||
|
||||
** GTK# On Solaris
|
||||
|
||||
TODO. Any volunteers?
|
||||
|
||||
** GTK# On AIX
|
||||
|
||||
TODO. Any volunteers?
|
||||
@@ -13,14 +13,6 @@ Some of them may start contributing because they want a mention in the
|
||||
|
||||
* Mono Hackers
|
||||
|
||||
** Zoltan Varga
|
||||
|
||||
Zoltan has contributed significantly to Mono, with bug reports and bug
|
||||
fixes as well as pushing the envelope of the things that can be done in
|
||||
and with the mono runtime: the gcc-based ngen compiler, code coverage
|
||||
and more recently his work with Reflection.Emit that got mono to the
|
||||
point of running the IKVM Java virtual machine.
|
||||
|
||||
** Sergey Chaban
|
||||
|
||||
Sergey has been a long time contributor to the project, from the early
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
* IBM DB2 Data Provider
|
||||
<ul>
|
||||
<li>ADO.NET Data Provider for <a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
|
||||
|
||||
<li>Exists in namespace DB2ClientCS and assembly Mono.Data.DB2Client</li>
|
||||
|
||||
<li>The source code exists at mcs/class/Mono.Data.DB2Client</li>
|
||||
|
||||
<li>Requires the Call Level Interface to IBM DB2 shared library. This
|
||||
is db2cli.dll on Windows. The IBM DB2 CLI API is very similar to the ODBC API. If
|
||||
you take a look at Mono's <a href="http://www.go-mono.com/odbc.html">System.Data.Odbc</a> ODBC provider, you will see the
|
||||
DllImport's have similiar function names.</li>
|
||||
|
||||
<li>IBM DB2 Provider created by Christopher Bockner.</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Compiles on Windows and Linux. Works on Windows. Still needs to be tested on Linux.</li>
|
||||
|
||||
<li>Able to connect to IBM DB2</li>
|
||||
|
||||
<li>Able to execute DML, such as, CREATE TABLE via ExecuteNonQuery()</li>
|
||||
|
||||
<li>Christopher says it can retrieve data via the DB2ClientDataReader</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Still needs work to get it to retrieve data via ExecuteReader() and
|
||||
use the data reader to read data.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
In order to test.
|
||||
<ul>
|
||||
<li>Have working mono and mcs setup</li>
|
||||
|
||||
<li>Have access to an IBM DB2 database. If you do not have access, download the
|
||||
<a href="http://www-3.ibm.com/software/data/db2/">IBM DB2</a> software. There
|
||||
are versions for Windows, Linux, AIX, and Sun Solaris.</li>
|
||||
|
||||
<li>Make sure the assembly Mono.Data.DB2Client.dll was built and installed
|
||||
where the other class libraries are installed.</li>
|
||||
|
||||
<li>If you do not have the source to mcs, get the source from
|
||||
<a href="http://www.go-mono.com/download">here</a></li>
|
||||
|
||||
<li>Has a ConnectionString format like ODBC</li>
|
||||
|
||||
<li>Here is a ConnectionString format if you have a DSN setup:
|
||||
<pre>
|
||||
"DSN=dataSetName;UID=myuserid;PWD=mypassword"
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>Here is a ConnectionString format if you do not have a DSN (have not
|
||||
gotten this to work though, so, I am open to suggestions):
|
||||
<pre>
|
||||
"DRIVER={DB2 Driver};SERVER=localhost;DATABASE=test;UID=myuserid;PASSWORD=mypassword"
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>In mcs/class/Mono.Data.DB2Client/Test/DBConnTest, you will find
|
||||
a DBConnTest.cs.</li>
|
||||
|
||||
<li>To build DBConnTest:
|
||||
<ul>
|
||||
<li>On Unix:</li>
|
||||
<pre>
|
||||
mcs DBConnTest.cs -r System.Data.dll -r Mono.Data.DB2Client.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>On Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe DBConnTest.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.DB2Client.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>To run it on mono:
|
||||
<pre>
|
||||
mono DBConnTest.exe database userid password
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.DB2Client;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"DSN=sample;UID=db2admin;PWD=mypass";
|
||||
IDbConnection dbcon = new DB2ClientConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql =
|
||||
"CREATE TABLE mono_db2_test1 ( " +
|
||||
" testid varchar(2), " +
|
||||
" testdesc varchar(16) " +
|
||||
")";
|
||||
dbcmd.CommandText = sql;
|
||||
dbcmd.ExecuteNonQuery();
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.DB2Client.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.DB2Client.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -56,7 +56,11 @@ TODO=multimedia
|
||||
<a name="projects">
|
||||
** Projects
|
||||
|
||||
This list of projects ideas is outdated
|
||||
<ul>
|
||||
TODO=xmlStorage,
|
||||
* Implement an xmlStorageSystem for the CLI:
|
||||
<a href="http://www.soapware.org/xmlStorageSystem">
|
||||
http://www.soapware.org/xmlStorageSystem</a>
|
||||
|
||||
TODO=guavac,Java compiler for .NET
|
||||
* You could take one of the existing Java compilers
|
||||
@@ -69,8 +73,19 @@ TODO=guavac,Java compiler for .NET
|
||||
it could be compiled with the Microsoft Managed C++
|
||||
compiler and produce a .NET executable with it.
|
||||
|
||||
TODO=CORBA,CORBA implementation
|
||||
* Build a CORBA interoperability engine for the CLR.
|
||||
You do not need to do all of the work, just talking
|
||||
the protocol will get us a long way (<a
|
||||
href="http://www.omg.org">The OMG site</a> has the
|
||||
CORBA specs).
|
||||
|
||||
Get in touch with David Taylor (dtaylo11 at bigpond
|
||||
dot net dot au) as he has been working on this
|
||||
project.
|
||||
|
||||
TODO=Bonobo,Bonobo for Mono
|
||||
* Once <a href="http://remoting-corba.sourceforge.net/">CORBA</a> is done, implement the Bonobo interfaces
|
||||
* Once CORBA is done, implement the Bonobo interfaces
|
||||
to allow people to use Bonobo components in Mono and
|
||||
Mono components with Bonobo. The best of both worlds!
|
||||
|
||||
|
||||
@@ -1,41 +1,184 @@
|
||||
* Debugging information
|
||||
* How to debug your C# application with the JIT engine
|
||||
|
||||
Compile your programs using the `-g' flag in MCS, that will all a special
|
||||
resource containing debugging information to your executable.
|
||||
To debug a C# application you need to run the JIT in your debugger.
|
||||
|
||||
To get stack traces with line number information, you need to run your
|
||||
program like this:
|
||||
Before you can do anything useful in a debugger, you need a symbol
|
||||
file which tells your debugger about functions, types, line numbers
|
||||
and such. Unfortunately, this symbol file needs to be recreated each
|
||||
time the JIT compiles a new method since it doesn't know anything
|
||||
about this method (especially not its memory address) before actually
|
||||
compiling it.
|
||||
|
||||
<b>
|
||||
mono --debug program.exe
|
||||
</b>
|
||||
You have two ways of creating a symbol file:
|
||||
|
||||
Notice that the program will need to be compiled with the -g
|
||||
flag and that running with --debug will slow down the execution.
|
||||
** Letting the JIT dynamically create the symbol file
|
||||
|
||||
* Mono Debugger
|
||||
This'll give you a symbol file which is suitable for debugging IL byte
|
||||
code - you won't see your C# source code.
|
||||
|
||||
The Mono debugger is written in C# and can debug both managed
|
||||
and unmanaged applications, support for multiple-threaded
|
||||
applications and should be relatively easy to port to new
|
||||
platforms.
|
||||
However, this method has the advantage that it works with every assembly,
|
||||
no matter whether it has been compiled with Mono's C# compiler (MCS) or
|
||||
with any other compiler. It's currently the only way to debug
|
||||
<tt>corlib.dll</tt> or any other library which cannot be compiled with
|
||||
our compiler yet.
|
||||
|
||||
Details of the release are available in <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-January/011415.html">post</a>.
|
||||
|
||||
The debugger contains both Gtk# and command line interfaces.
|
||||
The debugging file format used in Dwarf (its already supported
|
||||
by our class libraries and the Mono C# compiler; To debug C
|
||||
applications, you need a recent GCC, or to pass the -gdwarf-2
|
||||
flag to gcc).
|
||||
All that you need is a dump of the IL bytecode for each assembly (including
|
||||
all assemblies this assembly is referencing). This is done by using the
|
||||
<tt>monodis</tt> utility:
|
||||
|
||||
The debugger is available now, you can get it from <a
|
||||
href="http://primates.ximian.com/~martin/debugger/mono-debugger-0.2.0.tar.gz">here</a>
|
||||
<pre>
|
||||
monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il<br>
|
||||
monodis /home/export/martin/MONO-LINUX/lib/System.dll > System.il<br>
|
||||
monodis /home/export/martin/MONO-LINUX/bin/mcs.exe > mcs.il
|
||||
</pre>
|
||||
|
||||
This is normally done automatically, but you can also disable
|
||||
it and create them by hand. See the <tt>mono</tt> manual page
|
||||
for details.
|
||||
|
||||
Make sure that all the .il files have the same name as their corresponding
|
||||
assembly and that they're all created in the current directory.
|
||||
|
||||
The JIT supports two different debugging file formats:
|
||||
|
||||
<ul>
|
||||
* STABS: This is a very simple debugging format, but it may be the only one
|
||||
which is supported on your system. It is limited to source files of no more
|
||||
than 65.535 lines and it's type support is also very limited. You should only
|
||||
use this if your debugger doesn't support DWARF 2.
|
||||
|
||||
To generate STABS output, use the <tt>--debug=stabs</tt> command line argument.
|
||||
|
||||
|
||||
* DWARF 2: The DWARF 2 debugging format is a very powerful debugging format
|
||||
which can handle source files of arbitrary size and has a highly sophisticated
|
||||
type support. It's the recommended format unless you need to use STABS because
|
||||
your debugger doesn't support DWARF 2.
|
||||
|
||||
To generate DWARF 2 output, use the <tt>--debug=dwarf</tt> command line argument.
|
||||
</ul>
|
||||
|
||||
You need to regenerate the symbol file each time the JIT compiled a new
|
||||
method and each time you restart the JIT. You cannot reuse your symbol file
|
||||
if you start the JIT a second file, not even if you're running the same
|
||||
application with the same input data a second time.
|
||||
|
||||
Regenerating the symbol file is done by calling the JIT's
|
||||
<tt>mono_debug_make_symbols ()</tt> function from within your debugger and
|
||||
then reloading the symbol files. This function creates a <tt>filename-dwarf.s</tt>
|
||||
(or <tt>filename-stabs.s</tt>) assembler input file in the current directory and
|
||||
an object file in <tt>/tmp/filename.o</tt> - you need to tell your debugger to
|
||||
add this object file as symbol file.
|
||||
|
||||
If you're using the GNU debugger, this is done like this:
|
||||
|
||||
<pre>
|
||||
call mono_debug_make_symbols ()
|
||||
add-symbol-file /tmp/corlib.o
|
||||
add-symbol-file /tmp/mcs.o
|
||||
add-symbol-file /tmp/Mono.CSharp.Debugger.o
|
||||
</pre>
|
||||
|
||||
You can also write a GDB macro like this:
|
||||
|
||||
<pre>
|
||||
define reload
|
||||
call mono_debug_make_symbols ()
|
||||
add-symbol-file /tmp/corlib.o
|
||||
add-symbol-file /tmp/mcs.o
|
||||
add-symbol-file /tmp/Mono.CSharp.Debugger.o
|
||||
end
|
||||
</pre>
|
||||
|
||||
Then you can just say <tt>reload</tt> to have GDB recreate the symbol file.
|
||||
|
||||
There's also an <a href="jit-debug-sample.html">example debugging session</a> using
|
||||
the GNU debugger.
|
||||
|
||||
** Using a symbol file which have been created by the Mono C# compiler
|
||||
|
||||
If you compiled your application with Mono's C# compiler (MCS), you can tell it to
|
||||
create a symbol file which is then processed and rewritten by the JIT engine.
|
||||
|
||||
To do this, you must give MCS the <tt>-g</tt> option:
|
||||
|
||||
<pre>
|
||||
$ mcs -g Foo.cs
|
||||
</pre>
|
||||
|
||||
This creates a <tt>Foo-debug.s</tt> assembler input file.
|
||||
|
||||
To use this in the JIT, you must first copy it to the target machine (the machine
|
||||
where you want to run the JIT to debug your application) and run it through the
|
||||
assembler to produce an object file <tt>Foo-debug.o</tt>. This object file must be
|
||||
in the current directory.
|
||||
|
||||
Then start the JIT in your debugger and give it the <tt>--debug=dwarf-plus</tt> command
|
||||
line argument.
|
||||
|
||||
Each time you call <tt>mono_debug_make_symbols ()</tt> from withing your debugger,
|
||||
the JIT will read this <tt>Foo-debug.o</tt>, fix some machine dependent things like
|
||||
memory addresses etc. in it and write it back to disk.
|
||||
|
||||
If you're using the GNU debugger, you'll want to use a macro like this:
|
||||
|
||||
<pre>
|
||||
define relocate
|
||||
call mono_debug_make_symbols ()
|
||||
add-symbol-file /tmp/corlib.o
|
||||
add-symbol-file mcs-debug.o
|
||||
add-symbol-file Mono.CSharp.Debugger-debug.o
|
||||
end
|
||||
</pre>
|
||||
|
||||
If there is no <tt>assembly-debug.o</tt> file, but an <tt>assembly.il</tt> one, the
|
||||
JIT will fall back to normal DWARF 2 (in the example above, <tt>corlib.dll</tt> was
|
||||
compiled with Microsoft's compiler and the JIT is thus using DWARF to debug it).
|
||||
|
||||
This debugging method only works if you compiled your assembly with MCS, but it'll
|
||||
allow you to actually debug your C# source code :-)
|
||||
|
||||
Here's an <a href="jit-debug-sample2.html">example debugging session</a> using
|
||||
the GNU debugger.
|
||||
|
||||
** Breakpoints and single stepping
|
||||
|
||||
The JIT has a <tt>--break</tt> command line argument to insert a breakpoint at the
|
||||
beginning of this method. It takes a <tt>Namespace.Class:Method</tt> argument which
|
||||
is the method. This argument can be given multiple times.
|
||||
|
||||
However, once your application is stopped in GDB you may want to insert a breakpoint
|
||||
the next time the JIT compiles a method. There's a global variable
|
||||
<tt>mono_debug_insert_breakpoint</tt> which you can modify in your debugger.
|
||||
|
||||
If this variable is set to a non-zero value, the JIT's <tt>arch_compile_method</tt>
|
||||
will insert a breakpoint the next time it is called, ie. at the top of the next
|
||||
method it compiles. If this value has a positive value, it acts as a counter and is
|
||||
decremented after inserting the breakpoint - setting it to a negative value will let
|
||||
the JIT insert the breakpoint each time it compiles a new method.
|
||||
|
||||
There's also global variable <tt>mono_debug_last_breakpoint_address</tt> which always
|
||||
contains the address of the last inserted breakpoint. You may manually override this
|
||||
address with a <tt>nop</tt> instruction to delete the breakpoint.
|
||||
|
||||
For instance, I have a GDB macro called <tt>enter</tt> which I use to enter a method
|
||||
rather than stepping over it:
|
||||
|
||||
<pre>
|
||||
define enter
|
||||
set mono_debug_insert_breakpoint = 1
|
||||
continue
|
||||
set *mono_debug_last_breakpoint_address = 0x90
|
||||
relocate
|
||||
frame
|
||||
</pre>
|
||||
|
||||
Btw. speaking of single stepping - you should use your debuggers <tt>next</tt> command,
|
||||
not its <tt>step</tt> command for single stepping unless you compiled the JIT without
|
||||
debugging support. The reason for this is that the JIT creates machine code which contains
|
||||
calls to JIT methods such as <tt>mono_object_new_wrapper</tt> at places where you don't
|
||||
expect them - so unless the JIT is compiled at least without line numbers, your debugger
|
||||
will enter such methods if you use <tt>step</tt> rather than <tt>next</tt>.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
* A debugging session using a dynamically generated symbol file.
|
||||
|
||||
Let's assume we have the following C# application which we want to debug:
|
||||
|
||||
<pre>
|
||||
using System;
|
||||
|
||||
public class Foo
|
||||
{
|
||||
public struct MyStruct {
|
||||
int a;
|
||||
long b;
|
||||
double c;
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
Int32 value = 5;
|
||||
long test = 512;
|
||||
|
||||
MyStruct my_struct;
|
||||
my_struct.a = 5;
|
||||
my_struct.b = test;
|
||||
my_struct.c = 23323.5235;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
First of all, we need to compile it and create the .il files:
|
||||
|
||||
<pre>
|
||||
$ mcs ./Foo.cs
|
||||
$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
|
||||
$ monodis Foo.exe > Foo.il
|
||||
</pre>
|
||||
|
||||
Now we can start the JIT in the debugger:
|
||||
|
||||
<pre>
|
||||
$ gdb ~/monocvs/mono/mono/jit/mono
|
||||
(gdb) r --debug=dwarf --break Foo:Main ./Foo.exe
|
||||
Starting program: /home/martin/monocvs/mono/mono/jit/mono --debug=dwarf --break Foo:Main ./Foo.exe
|
||||
0x081e8911 in ?? ()
|
||||
(gdb) call mono_debug_make_symbols ()
|
||||
(gdb) add-symbol-file /tmp/Foo.o
|
||||
Reading symbols from /tmp/Foo.o...done.
|
||||
Current language: auto; currently c++
|
||||
(gdb) frame
|
||||
#0 Foo.Main () at Foo.il:26
|
||||
26 // method line 2
|
||||
(gdb) n
|
||||
Foo.Main () at Foo.il:38
|
||||
38 IL_0000: ldc.i4.5
|
||||
(gdb) list
|
||||
33 .maxstack 2
|
||||
34 .locals (
|
||||
35 int32 V_0,
|
||||
36 int64 V_1,
|
||||
37 valuetype MyStruct V_2)
|
||||
38 IL_0000: ldc.i4.5
|
||||
39 IL_0001: stloc.0
|
||||
40 IL_0002: ldc.i4 512
|
||||
41 IL_0007: conv.i8
|
||||
42 IL_0008: stloc.1
|
||||
43 IL_0009: ldloca.s 2
|
||||
44 IL_000b: ldc.i4.5
|
||||
45 IL_000c: stfld int32 .MyStruct::a
|
||||
46 IL_0011: ldloca.s 2
|
||||
47 IL_0013: ldloc.1
|
||||
48 IL_0014: stfld int64 .MyStruct::b
|
||||
49 IL_0019: ldloca.s 2
|
||||
50 IL_001b: ldc.r8 23323.5
|
||||
51 IL_0024: stfld float64 .MyStruct::c
|
||||
52 IL_0029: ret
|
||||
(gdb) until 52
|
||||
Foo.Main () at Foo.il:53
|
||||
53 }
|
||||
(gdb) info locals
|
||||
V_0 = 5
|
||||
V_1 = 512
|
||||
V_2 = {a = 5, b = 512, c = 23323.523499999999}
|
||||
</pre>
|
||||
|
||||
As you see in this example, you need to know IL code to use this debugging method - but
|
||||
it may be the only way to debug a library.
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
* A debugging session using a symbol file which has been created by MCS.
|
||||
|
||||
Let's assume we have the following C# application which we want to debug:
|
||||
|
||||
<pre>
|
||||
using System;
|
||||
|
||||
public class Foo
|
||||
{
|
||||
public struct MyStruct {
|
||||
int a;
|
||||
long b;
|
||||
double c;
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
Int32 value = 5;
|
||||
long test = 512;
|
||||
|
||||
MyStruct my_struct;
|
||||
my_struct.a = 5;
|
||||
my_struct.b = test;
|
||||
my_struct.c = 23323.5235;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
First of all, we need to compile it with MCS, assemble the generated .s file and
|
||||
create the .il files for all referenced assemblies which were not compiled with MCS:
|
||||
|
||||
<pre>
|
||||
$ mcs -g ./Foo.cs
|
||||
$ as -o Foo-debug.o Foo-debug.s
|
||||
$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
|
||||
</pre>
|
||||
|
||||
Now we can start the JIT in the debugger:
|
||||
|
||||
<pre>
|
||||
$ gdb ~/monocvs/mono/mono/jit/mono
|
||||
(gdb) r --debug=dwarf-plus --break Foo:Main ./Foo.exe
|
||||
Starting program: /home/martin/monocvs/mono/mono/jit/mono --debug=dwarf-plus --break Foo:Main ./Foo.exe
|
||||
Program received signal SIGTRAP, Trace/breakpoint trap.
|
||||
0x081e8681 in ?? ()
|
||||
(gdb) call mono_debug_make_symbols ()
|
||||
(gdb) add-symbol-file Foo-debug.o
|
||||
(gdb) add-symbol-file /tmp/corlib.o
|
||||
` (gdb) frame
|
||||
#0 Main () at ./Foo.cs:11
|
||||
11 public static void Main ()
|
||||
(gdb) n
|
||||
Main () at ./Foo.cs:13
|
||||
13 Int32 value = 5;
|
||||
(gdb)
|
||||
14 long test = 512;
|
||||
(gdb)
|
||||
17 my_struct.a = 5;
|
||||
(gdb)
|
||||
18 my_struct.b = test;
|
||||
(gdb)
|
||||
19 my_struct.c = 23323.5235;
|
||||
(gdb)
|
||||
20 }
|
||||
(gdb) info locals
|
||||
value = 5
|
||||
test = 512
|
||||
my_struct = { a = 5, b = 512, c = 23323.5235 }
|
||||
</pre>
|
||||
|
||||
@@ -8,14 +8,6 @@
|
||||
* <a href="#MonoLogo">MonoLogo</a>
|
||||
* <a href="#Oberon">Oberon</a>
|
||||
* <a href="#Forth">Forth</a>
|
||||
* <a href="#mbas">Mono Basic</a> (Mono's VB.NET compiler)
|
||||
</ul>
|
||||
|
||||
Languages which are known to run, but we have not done a
|
||||
complete ran of all their regression tests to validate it:
|
||||
|
||||
<ul>
|
||||
* Kylix.NET.
|
||||
</ul>
|
||||
|
||||
Languages we would like to have supported, with links to resources:
|
||||
@@ -30,22 +22,14 @@
|
||||
|
||||
<ul>
|
||||
* <a href="#Tachy">Tachy</a> (scheme-like)
|
||||
* <a href="#python">Python</a>
|
||||
</ul>
|
||||
|
||||
<a name="Java">
|
||||
** Java
|
||||
|
||||
There is a very interesting project to make a JavaVM for .NET
|
||||
<a href="http://radio.weblogs.com/0109845/">here</a>.
|
||||
<a href="http://radio.weblogs.com/0109845/">here</a>
|
||||
|
||||
Zoltan has got IKVM to work with Mono.
|
||||
|
||||
<a name="PHP">
|
||||
** PHP
|
||||
|
||||
Sterling has code to allow PHP developers to use Mono code, in
|
||||
his <a href="http://www.php.net/~sterling/mono/">site</a>
|
||||
|
||||
<a name="MonoLogo">
|
||||
** MonoLogo
|
||||
@@ -56,13 +40,6 @@
|
||||
hosted in the <a href="ccvs.html">Mono CVS</a> repository
|
||||
and also available on the <a href="anoncvs.html">AnonCVS</a> mirrors.
|
||||
|
||||
<a name="mbas">
|
||||
** Mono Basic (Mono's VB.NET compiler)
|
||||
|
||||
Work has resumed on the Mono Visual Basic compiler (currently
|
||||
called mbas). It is part of the standard Mono distribution,
|
||||
but its still an early compiler.
|
||||
|
||||
<a name="Oberon">
|
||||
** Oberon
|
||||
|
||||
@@ -104,16 +81,6 @@
|
||||
A subset of Scheme language called <a
|
||||
href="http://radio.weblogs.com/0101156/stories/2002/03/19/tachy.html">Tachy</a>
|
||||
|
||||
<a name="Python">
|
||||
** Python
|
||||
|
||||
<a href="mailto:[email protected]">Brian Lloyd</a> is
|
||||
working on linking the Python runtime with the .NET runtime.
|
||||
More information on the PS.NET project can be found <a
|
||||
href="http://www.zope.org/Members/Brian/PythonNet/index_html">here</a>.
|
||||
An FAQ document is available <a
|
||||
href="http://www.zope.org/Members/Brian/PythonNet/FAQ.html">here</a>.
|
||||
|
||||
* Missing languages
|
||||
|
||||
Here is a list of a few languages that we would like to see
|
||||
|
||||
@@ -2,20 +2,11 @@
|
||||
|
||||
Most of the mailing lists are in english, but there is also
|
||||
Mono Hispano that has lists in Spanish. <a
|
||||
href="http://www.monohispano.org/mailman/listinfo/mono-hispano">Mono Hispano list</a>
|
||||
href="http://mono.es.gnome.org/mailman/listinfo/mono-hispano">Mono Hispano list</a>
|
||||
|
||||
There are a number of mailing lists for Mono in English:
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<b><a
|
||||
href="http://lists.ximian.com/mailman/listinfo/mono-announce-list">mono-announce-list</a></b>
|
||||
</td>
|
||||
<td>
|
||||
Announcements of Mono developments.
|
||||
</td>
|
||||
</tr>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<b><a
|
||||
@@ -28,39 +19,11 @@
|
||||
<tr>
|
||||
<td>
|
||||
<b><a
|
||||
href="http://lists.ximian.com/mailman/listinfo/mono-devel-list">mono-devel-list</a></b>
|
||||
</td>
|
||||
<td>
|
||||
A mailing list specifically dedicated to discussions
|
||||
about developing Mono and programming *with* Mono.
|
||||
Programmers that work on Mono are _strongly_ encouraged
|
||||
to join this list. Third-party programmers interested
|
||||
in running or compiling their managed applications with
|
||||
Mono or that are interested in using mono-specific
|
||||
technologies should join the list as well.
|
||||
<p>
|
||||
Examples of on-topic arguments are:
|
||||
<ul>
|
||||
<li>proposals and patches for new features for the mono runtime and programs
|
||||
<li>discussions about bugs in the mono runtime and programs
|
||||
<li>discussions about future directions
|
||||
<li>embedding API, scripting language bridges
|
||||
<li>mono/mcs build issues
|
||||
<li>programming with mono-specific assemblies
|
||||
<li>discussions about third-party compilers that target and/or use directly the CLR
|
||||
<li>discussions about getting a managed application run with mono
|
||||
</ul>
|
||||
|
||||
<p>Topics that are better discussed on other mailing lists:
|
||||
<ul>
|
||||
<li> general C# questions (use the specific lists at develop.com)
|
||||
<li> issues that are already covered by a more specific mono
|
||||
mailing list (like System.Windows.Forms or Gtk#)
|
||||
<li> success reports about new apps running on mono, including
|
||||
runtime/buildtime support for new programming languages (use
|
||||
mono-list to reach a wider audience)
|
||||
</ul>
|
||||
href="http://lists.ximian.com/mailman/listinfo/mono-announce-list">mono-announce-list</a></b>
|
||||
</td>
|
||||
<td>
|
||||
Announcements of Mono developments.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -77,7 +40,7 @@
|
||||
href="http://lists.ximian.com/mailman/listinfo/mono-patches">mono-patches</a></b>
|
||||
</td>
|
||||
<td>
|
||||
Track the CVS activity of Mono on this mailing list (patches are sent to recipients). <p>
|
||||
Track the CVS activity of Mono on this mailing list (patches are sent to recipients).
|
||||
You can get <a href="http://www.go-mono.com/snapshots">daily snapshots</a> as well.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -108,24 +71,6 @@
|
||||
in <a href="http://bugzilla.ximian.com">Bugzilla.ximian.com</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b><a
|
||||
href="http://lists.ximian.com/mailman/listinfo/mono-winforms-list">mono-winforms-list</a></b>
|
||||
</td>
|
||||
<td>
|
||||
Used to discuss the Windows.Forms implementatation for Mono using Wine.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b><a
|
||||
href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">gtk-sharp-list</a></b>
|
||||
</td>
|
||||
<td>
|
||||
Used to discuss the Gtk bindings for Mono (<a href="http://gtk-sharp.sf.net">Gtk#</a>).
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Other mailing lists of interest:
|
||||
@@ -138,11 +83,6 @@
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
* Alternative archive site
|
||||
|
||||
An alternate site that archives Mono List is available <a
|
||||
href="http://archive.neotonic.com/archive/mono-list">http://archive.neotonic.com/archive/mono-list</a>
|
||||
|
||||
* Google search of the archives
|
||||
|
||||
<!-- Google Search with mods -->
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
* mbas: Mono's Basic.NET Compiler.
|
||||
|
||||
MBAS is a CIL compiler for the Visual Basic language, an extended
|
||||
version of VisualBasic.NET. It's based on the MCS compiler
|
||||
and still in heavy development, though many language features are
|
||||
already supported.
|
||||
|
||||
** What works
|
||||
|
||||
<ul>
|
||||
|
||||
* Classes, Fields and Methods. Properties are still
|
||||
being worked on.
|
||||
|
||||
* Module definition and Sub functionality (TODO: Function's)
|
||||
|
||||
* Namespace Import, so can you reference, instantiate
|
||||
and call external assemblies
|
||||
|
||||
* Parameter passing between Sub's. ByVal and ByRef
|
||||
parameters are being worked on.
|
||||
|
||||
* Delegates
|
||||
|
||||
* Object creation
|
||||
|
||||
* Events - to a limited extent. You can declare a
|
||||
Class-Field as 'WithEvents' and dynamic events (i.e
|
||||
AddHandler MyButton.Click, Button1_OnClick). Please
|
||||
beware: just after committing the code, I discovered
|
||||
that the handler field in the AddHandler call is
|
||||
case-sensitive, a remnant of mBas' mcs heritage)
|
||||
|
||||
* Statements supported are 'If..Then..Else' ,
|
||||
'While..End While' and assignment statements. Simple
|
||||
operators (+, -, *, /, >, <, =) should also
|
||||
work. Other statements (For..Next, etc.) should be
|
||||
quite trivial to implement.
|
||||
</ul>
|
||||
|
||||
A lot of this stuff is implemented rebuilding proper expressions and
|
||||
statements on top of the classes provided by mcs (look at the grammar -
|
||||
mb-parser.jay - and compare it with cs-parser.jay, if interested).
|
||||
|
||||
** TODO-list
|
||||
|
||||
At this stage almost every element of the language must be still checked for
|
||||
conformance to MS'implementation. Help is particularly needed for those areas
|
||||
I know little of (mcs internals are still quite obscure to me). I'd like to
|
||||
implement class properties, the missing statements, exception handling,
|
||||
structures and actual event support (not necessarily in this order). Once we
|
||||
have all this stuff set up and reasonably bug-free, more work could be done
|
||||
on helper functions and Object-vars handling.
|
||||
|
||||
@@ -11,19 +11,22 @@
|
||||
|
||||
For <a href="mono-beginning/t1.html">RPM Linux based systems</a>
|
||||
|
||||
For <a href="http://monoevo.sourceforge.net/mono-windows/mono-beginning-windows/t1.html">Microsoft Windows</a>
|
||||
For <a href="http://geneura.ugr.es/~jaime/mono-beginning-windows/t1.html">Microsoft Windows</a>
|
||||
|
||||
|
||||
PDF Format
|
||||
|
||||
For <a href="mono-beginning.pdf">RPM Linux based systems</a>
|
||||
|
||||
For <a href="http://geneura.ugr.es/~jaime/mono-beginning-windows/mono-beginning-windows.pdf">Microsoft Windows</a>
|
||||
|
||||
|
||||
|
||||
XML Source
|
||||
|
||||
For <a href="mono-beginning.xml">RPM Linux based systems</a>
|
||||
|
||||
For <a href="http://monoevo.sourceforge.net/mono-windows/mono-beginning-windows.xml">Microsoft Windows</a>
|
||||
For <a href="http://geneura.ugr.es/~jaime/mono-beginning-windows/mono-beginning-windows.xml">Microsoft Windows</a>
|
||||
|
||||
|
||||
Currently Hinne is working on a Mono Tools HOWTO. Which will be
|
||||
|
||||
@@ -155,37 +155,15 @@ export PKG_CONFIG_PATH
|
||||
# /usr/local/include and /usr/local/lib to CPPFLAGS and LDFLAGS. We could
|
||||
# skip this if it would add /usr/include and /usr/lib, but leaving it
|
||||
# shouldnt break anything.
|
||||
#
|
||||
# Actually, it does break stuff :-( gcc 3.2 prints gratuitous warnings
|
||||
# and configure fails to find header files because of this cpp output.
|
||||
iconvh=`locate include/iconv.h`
|
||||
iconvh_dir=`dirname $iconvh`
|
||||
iconvlib_dir=`echo $iconvh_dir | sed -e 's/include/lib/'`
|
||||
|
||||
if [ ! -f /usr/include/iconv.h ]; then
|
||||
iconvdirs="/usr/local/include"
|
||||
for i in $iconvdirs
|
||||
do
|
||||
if [ -f $i/iconv.h ]; then
|
||||
iconvh_dir=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$iconvh_dir" ]; then
|
||||
echo "Can't find iconv headers (looked in $iconvdirs)"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
iconvlib_dir=`echo $iconvh_dir | sed -e 's/include/lib/'`
|
||||
|
||||
echo "Adding $iconvh_dir to CPPFLAGS"
|
||||
echo "Adding $iconvlib_dir to LDFLAGS"
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -I$here/install/include -I$iconvh_dir"
|
||||
LDFLAGS="$LDFLAGS -L$here/install/lib -L$iconvlib_dir"
|
||||
else
|
||||
CPPFLAGS="$CPPFLAGS -I$here/install/include"
|
||||
LDFLAGS="$LDFLAGS -L$here/install/lib"
|
||||
fi
|
||||
echo "Adding $iconvh_dir to CPPFLAGS"
|
||||
echo "Adding $iconvlib_dir to LDFLAGS"
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -I$here/install/include -I$iconvh_dir"
|
||||
LDFLAGS="$LDFLAGS -L$here/install/lib -L$iconvlib_dir"
|
||||
export CPPFLAGS
|
||||
export LDFLAGS
|
||||
|
||||
|
||||
@@ -1,329 +0,0 @@
|
||||
* MySQL Data Provider
|
||||
|
||||
<p>There are two ADO.NET providers in Mono
|
||||
for a <a href="http://www.mysql.com/">MySQL</a> database:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://sourceforge.net/projects/mysqlnet/">ByteFX.Data.MySQLClient</a>
|
||||
<ul>
|
||||
<li>Written in 100% C#</li>
|
||||
<li>Does not require a client library</li>
|
||||
<li>Works on Mono and Microsoft .NET</li>
|
||||
<li>Requires at least Mono 0.18 and MySQLNet 0.65 for it to work on Mono</li>
|
||||
<li>Works in the SQL# command-line and GTK# GUI version</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Mono.Data.MySql (deprecated)
|
||||
<ul>
|
||||
<li>Deprecated in favor of ByteFX.Data.MySQLClient
|
||||
|
||||
<li>Written in C# and uses
|
||||
the MySQL C Client Library</li>
|
||||
|
||||
<li>Exists in namespace Mono.Data.MySql and assembly Mono.Data.MySql</li>
|
||||
|
||||
<li>Works on Windows and Linux via the MySQL client shared library
|
||||
(libmySQL.dll on Windows and libmysqlclient.so on Linux).</li>
|
||||
|
||||
<li>Started by Daniel Morgan using
|
||||
<a href="http://www.cybercom.net/~zbrad/DotNet/MySql/">C# Bindings to MySQL</a> from <a href="mailto:[email protected]">Brad Merill</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><a href="http://www.mysql.com/articles/dotnet/">Exploring MySQL
|
||||
in the Microsoft .NET Environment</a> is an article
|
||||
by Mr. Venu who is a MySQL AB developer.</li>
|
||||
|
||||
<p>Testing for Mono's Mono.Data.MySql and ByteFX's ByteFX.Data.MySQLClient is below.
|
||||
|
||||
** Current Status
|
||||
|
||||
Current Status of the MySQL providers:
|
||||
|
||||
<ul>
|
||||
|
||||
<li>ByteFX.Data.MySQLClient
|
||||
<ul>
|
||||
<li>Build and Runs on Microsoft .NET and Mono</li>
|
||||
<li>Works with SQL# (command-line and GTK# GUI versions)</li>
|
||||
<li>MySQLCommandBuilder now implemented</li>
|
||||
<li>Transaction support now implemented (not all table types support this)</li>
|
||||
<li>GetSchemaTable fixed to not use xsd (for Mono)</li>
|
||||
<li>Driver is now Mono-compatible</li>
|
||||
<li>TIME data type now supported</li>
|
||||
<li>More work to improve Timestamp data type handling</li>
|
||||
<li>Changed signatures of all classes to match corresponding SqlClient classes</li>
|
||||
<li>Protocol compression using <a href="http://www.icsharpcode.net/OpenSource/SharpZipLib/default.asp">SharpZipLib</a></li>
|
||||
<li>Named pipes on Windows now working properly</li>
|
||||
<li>Work done to improve Timestamp data type handling</li>
|
||||
<li>Implemented IEnumerable on DataReader so DataGrid would work</li>
|
||||
<li>Speed increased dramatically by removing bugging network sync code</li>
|
||||
<li>Driver no longer buffers rows of data (more ADO.Net compliant)</li>
|
||||
<li>Conversion bugs related to TIMESTAMP and DATETIME fields fixed</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Mono.Data.MySql (deprecated)
|
||||
<ul>
|
||||
<li>Currently, only works with version 3.23.x of MySQL</li>
|
||||
|
||||
<li>can connect</li>
|
||||
|
||||
<li>can execute non-queries via ExecuteNonQuery()</li>
|
||||
|
||||
<li>can execute aggregates via ExecuteScalar() and retrieve the
|
||||
single row/single column result</li>
|
||||
|
||||
<li>can execute queries and retrieve results using a data reader.</li>
|
||||
|
||||
<li>a schema DataTable has been partially
|
||||
implemented which is returned from GetSchemaTable() in MySqlDataReader.</li>
|
||||
|
||||
<li>a DataTable in a DataSet can be filled via a MySqlDataAdapter</li>
|
||||
|
||||
<li>The shared client libraries
|
||||
between windows version and linux are different: windows has libmySQL.dll
|
||||
while linux has libmysqlclient.so. This is handled by the
|
||||
file etc/mono/config which is mapped by the mono runtime in knowing
|
||||
which native shared library to load. In cvs, this file is mono/config.in and
|
||||
can be modified with a text editor.</li>
|
||||
|
||||
<li>Works in the SQL# command-line and GTK# GUI version</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Action plan
|
||||
|
||||
The current plan for the MySQL data providers:
|
||||
|
||||
<ul>
|
||||
<li>ByteFX.Data.MySQLClient
|
||||
<ul>
|
||||
<li>Testing and fixes</li>
|
||||
<li>Implement missing features</li>
|
||||
<li>Only fixes for bugs to build and run MySQLClient on Mono
|
||||
will be accepted in mono-cvs. Most bugs and any new features will
|
||||
go into sourceforge cvs. Anytime there is a release of MySQLClient,
|
||||
the source code will be copied from sourceforge cvs to mono-cvs</li>
|
||||
<li>Releases of MySQLClient are determined by Reggie Burnett and releases
|
||||
of Mono are determined by Miguel de Icaza</li>
|
||||
<li>Implement any missing features or fix any bugs in Mono to get new
|
||||
features all of MySQLClient to work on Mono</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Mono.Data.MySql (deprecated)
|
||||
<ul>
|
||||
<li>Testing and bug fixes</li>
|
||||
<li>Mono.Data.MySql is deprecated and therefore maybe removed
|
||||
at a later date. It will stay in Mono for now because other
|
||||
programs maybe using it now.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
** Testing for MySQLNet provider (ByteFX.Data.MySQLClient)
|
||||
|
||||
<ul>
|
||||
<li>Have access to a MySQL database or download it from
|
||||
<ul>
|
||||
<li><a href="http://www.mysql.com/downloads/index.html">MySQL AB</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>MySQLNet can be gotten from <a href="http://sourceforge.net/projects/mysqlnet/">here</a> and the
|
||||
binary assembly ByteFX.Data.dll needs to be installed
|
||||
in the same place as the mono class libraries.</li>
|
||||
|
||||
<li>MySQLNet requires <a href="http://www.icsharpcode.net/OpenSource/SharpZipLib/default.asp">SharpZipLib</a> which is
|
||||
a Zip Library written in 100% C#. This is used for compression/decompression of data
|
||||
sent/received over the network. The SharpZipLib binary assembly SharpZipLib.dll should
|
||||
be installed in the same place as the mono class libraries.</li>
|
||||
|
||||
<li>Has a ConnectionString format:
|
||||
<pre>
|
||||
"Server=hostname;" +
|
||||
"Database=database;" +
|
||||
"User ID=username;" +
|
||||
"Password=password"
|
||||
</pre>
|
||||
</li>
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using ByteFX.Data.MySQLClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=test;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new MySQLConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = (string) reader["firstname"];
|
||||
string LastName = (string) reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r ByteFX.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r ByteFX.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing for Mono's MySQL provider (Mono.Data.MySql)
|
||||
|
||||
<ul>
|
||||
<li>Have access to a MySQL database or download it from
|
||||
<ul>
|
||||
<li><a href="http://www.mysql.com/downloads/index.html">MySQL AB</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Take a look at MySqlTest.cs in mcs/class/Mono.Data.MySql/Test</li>
|
||||
<li>On Linux, you may need to make a symbolic link from libmySQL.dll to libmysqlclient.dll</li>
|
||||
|
||||
<li>Has a ConnectionString format:
|
||||
<pre>
|
||||
"Server=hostname;Database=database;User ID=username;Password=password"
|
||||
(or)
|
||||
"Host=hostname;Dbname=database;User=username;Passwd=password"
|
||||
</pre>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.MySql;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=test;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new MySqlConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.MySql.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.MySql.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1,218 +0,0 @@
|
||||
* ODBC Data Provider
|
||||
|
||||
<ul>
|
||||
|
||||
<li>ADO.NET Data Provider for Data Sources
|
||||
that have <a href="http://www.microsoft.com/data/odbc/">ODBC</a> support.</li>
|
||||
|
||||
<li>Exists in namespace System.Data.Odbc and assembly System.Data</li>
|
||||
|
||||
<li>Works on Windows and Linux. Should have no problems working on UNIX too.</li>
|
||||
|
||||
<li>Works on Windows via the native Windows odbc32.dll</li>
|
||||
|
||||
<li>Works on Linux via:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.unixodbc.org/">unixODBC</a> which has
|
||||
commercial support
|
||||
from <a href="http://www.easysoft.com/">Easysoft</a></li>
|
||||
|
||||
<li><a href="http://www.iodbc.org/">iODBC</a> which has
|
||||
commercial support
|
||||
from <a href="http://oplweb.openlinksw.com:8080/download/">OpenLink Software</a></li>
|
||||
</ul>
|
||||
|
||||
<li>List of unixODBC <a href="http://www.unixodbc.org/drivers.html">drivers</a>
|
||||
|
||||
<li>List of <a href="http://ourworld.compuserve.com/homepages/Ken_North/odbcvend.htm">ODBC Vendors</a>
|
||||
|
||||
<li>ODBC can connect to various databases which has an ODBC driver installed:
|
||||
<ul>
|
||||
<li><a href="http://www.mysql.com/">MySQL</a></li>
|
||||
<li><a href="http://www.postgresql.org/">PostgreSQL</a></li>
|
||||
<li><a href="http://www.oracle.com/">Oracle</a></li>
|
||||
<li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a></li>
|
||||
<li><a href="http://www.sybase.com/downloads">Sybase</a> (
|
||||
via <a href="http://www.freetds.org/">FreeTDS</a> on UNIX)</li>
|
||||
<li><a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a> (
|
||||
via <a href="http://www.freetds.org/">FreeTDS</a> on UNIX)</li>
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
|
||||
<li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a>
|
||||
(via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a> on UNIX)</li>
|
||||
</ul>
|
||||
|
||||
<li>ODBC Provider created by Brian Ritchie.</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Can Connect on:
|
||||
<ul>
|
||||
<li>Windows via native Windows odbc32.dll</a></li>
|
||||
<li>Linux via:
|
||||
<ul>
|
||||
<li>unixODBC's libodbc.so</li>
|
||||
<li>iODBC's libiodbc.so</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Various databases have been tested using their
|
||||
ODBC drivers: MySQL, PostgreSQL, Oracle, IBM DB2, and Microsoft SQL Server</li>
|
||||
|
||||
<li>Can execute non-query commands via ExecuteNonQuery of a OdbcCommand</li>
|
||||
|
||||
<li>Can execute aggreates and retrieve a single row single column result via
|
||||
ExecuteScalar of a OdbcCommand</li>
|
||||
|
||||
<li>Can execute queries via ExecuteReader of a OdbcCommand and
|
||||
retrieve results using an OdbcDataReader</li>
|
||||
|
||||
<li>Can get a DataTable containing schema info via GetSchemaTable() in a OdbcDataReader</li>
|
||||
|
||||
<li>Can Fill a DataTable in a DataSet via an OdbcDataAdapter</li>
|
||||
|
||||
<li>Works in SQL#, but Column names don't show up correctly.</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Fixing bugs
|
||||
|
||||
<li>Testing with other setups
|
||||
</ul>
|
||||
|
||||
** Testing ODBC provider with IBM DB2 Universal Database
|
||||
|
||||
<ul>
|
||||
<li>You need a working mono and mcs</li>
|
||||
|
||||
<li>For Unix, you will need unixODBC or iODBC installed</li>
|
||||
|
||||
<li>Have acess to a <a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a> or
|
||||
you can download from IBM</li>
|
||||
|
||||
<li>Read these web pages about Unix, ODBC, and IBM DB2
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.unixodbc.com/doc/db2.html">unixODBC web page about IBM DB2</a></li>
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/udb/ad/v8/cli/t0010406">IBM web page about unixODBC and DB2</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>The ODBC provider is similar to the <a href="http://www.go-mono.com/ibmdb2.html">IBM DB2</a> provider.</li>
|
||||
</ul>
|
||||
|
||||
** Testing ODBC provider with MySQL
|
||||
|
||||
<p>You can test Mono's ODBC provider System.Data.Odbc with the MySQL ODBC driver MyODBC
|
||||
|
||||
<p><ul>
|
||||
<li>Take a look at OdbcTest.cs in mcs/class/System.Data/Test</li>
|
||||
|
||||
<li>Here is a ConnectionString format if you have a DSN setup:
|
||||
<pre>
|
||||
"DSN=dataSetName;UID=myuserid;PWD=mypassword"
|
||||
</pre>
|
||||
</li>
|
||||
<li>Here is a ConnectionString format if you do not have a DSN (have not
|
||||
gotten this to work though):
|
||||
<pre>
|
||||
"DRIVER={MySQL ODBC 3.51 Driver};" +
|
||||
"SERVER=localhost;DATABASE=test;" +
|
||||
"UID=myuserid;PASSWORD=mypassword;" +
|
||||
"OPTION=3";
|
||||
|
||||
</pre>
|
||||
</li>
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Odbc;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
// have an ODBC DSN setup named MYSQLDSN
|
||||
// that accesses a MySQL database via
|
||||
// MyODBC driver for ODBC with a
|
||||
// hostname of localhost and database test
|
||||
string connectionString =
|
||||
"DSN=MYSQLDSN;" +
|
||||
"UID=myuserid;" +
|
||||
"PWD=mypassword";
|
||||
IDbConnection dbcon;
|
||||
dbcon.Open();
|
||||
dbcon = new OdbcConnection(connectionString);
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1,153 +0,0 @@
|
||||
* OLE DB Provider
|
||||
|
||||
<ul>
|
||||
<li> Provides a OleDb-like provider for Mono
|
||||
using <a href="http://www.gnome-db.org/">GDA</a> as the data access layer.</li>
|
||||
|
||||
<li> Exists in namespace System.Data.OleDb and assembly System.Data</li>
|
||||
|
||||
<li>Created by Rodrigo Moya</li>
|
||||
|
||||
<li>LibGDA has providers for:</li>
|
||||
<ul>
|
||||
<li><a href="http://www.mysql.com/">MySQL</a></li>
|
||||
<li><a href="http://www.postgresql.org/">PostgreSQL</a></li>
|
||||
<li>XML</li>
|
||||
<li>ODBC (via <a href="http://www.unixodbc.org/">unixODBC</a>)</li>
|
||||
<li><a href="http://www.oracle.com/">Oracle</a></li>
|
||||
<li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a></li>
|
||||
<li><a href="http://www.sybase.com/downloads">Sybase</a> and
|
||||
<a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a> (
|
||||
via <a href="http://www.freetds.org/">FreeTDS</a>)</li>
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
|
||||
<li><a href="http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a></li>
|
||||
<li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a></li>
|
||||
(via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a>)</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
<ul>
|
||||
<li>The OleDb provider is working with libgda (an OLE-DB/ADO data access for Unix).
|
||||
The C-Sharp bindings to libgda currently work - meaning they can compile, run,
|
||||
and you can connect to a
|
||||
PostgreSQL database via libgda via the C-Sharp bindings to libgda.</li>
|
||||
|
||||
<li>Basic
|
||||
functionality (execution of commands, data retrieval, transactions, etc) are
|
||||
now working.</li>
|
||||
|
||||
<li>An inital implementation of GetSchemaTable() for
|
||||
the OleDbDataReader has been checked into cvs. GetSchemaTable() isn't correct for OleDb,
|
||||
but the foundation is there.</li>
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
<ul>
|
||||
<li>Current focus is on filling up the missing pieces (Data adapters
|
||||
mainly) and schema support.</li>
|
||||
|
||||
<li>We need help building libgda on Windows though. libgda
|
||||
builds find on linux though.</li>
|
||||
|
||||
<li>Need to make the OleDb provider compatible with the OleDb provider in Microsoft .NET</li>
|
||||
</ul>
|
||||
|
||||
** Testing OleDb with libgda's PostgreSQL provider
|
||||
|
||||
<ul>
|
||||
<li>Requires a working mono and mcs</li>
|
||||
<li>Requires Linux because the OleDb provider uses libgda and libgda only
|
||||
works on Linux.</li>
|
||||
<li>Connection String format: "Provider=providerName;...". providerName is the
|
||||
name of the Provider you use, such as, PostgreSQL, MySQL, etc. The elipsis ...
|
||||
means that the connection parameters are dependent upon the provider being used and
|
||||
are passed to libgda for connecting. Such paramters, can be: Database, User ID, Password,
|
||||
Server, etc...</li>
|
||||
<li>See the test TestOleDb.cs found at mcs/class/System.Data/System.Data.OleDb</li>
|
||||
<li>C# Example for Mono's System.Data.OleDb:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
// there is a libgda PostgreSQL provider
|
||||
string connectionString =
|
||||
"Provider=PostgreSQL;" +
|
||||
"Addr=127.0.0.1;" +
|
||||
"Database=test;" +
|
||||
"User ID=postgres;" +
|
||||
"Password=fun2db";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new OleDbConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
* Oracle Data Provider
|
||||
|
||||
<ul>
|
||||
|
||||
<li>ADO.NET Data Provider for <a href="http://www.oracle.com/">Oracle</a> databases</li>
|
||||
|
||||
<li>Exists in namespace System.Data.OracleClient and assembly System.Data.OracleClient</li>
|
||||
|
||||
<li>Works on Windows and Linux</li>
|
||||
|
||||
<li>Works with Oracle 8i</li>
|
||||
|
||||
<li>Untested, but should work with Oracle 9i</li>
|
||||
|
||||
<li>Uses the Oracle CLI (Call Level Interface) which is a C library (API) for the Oracle Client
|
||||
software</li>
|
||||
|
||||
<li>Internally, the OracleClient provider has OCI abstracted to an object-oriented programming model</li>
|
||||
|
||||
<li>Created by Daniel Morgan and Tim Coleman</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>OracleConnection can connect and disconnect to an Oracle 8i database on
|
||||
Windows and Linux via OCI (Oracle Call-level Interface)</li>
|
||||
|
||||
<li>No longer uses a glue library (a library between the System.Data.OracleClient.dll
|
||||
assembly and the oci library). In Current Mono cvs, System.Data.OracleClient
|
||||
directly platform invokes into the oci library thanks to Tim Coleman.</li>
|
||||
|
||||
<li>Can have multiple connections with different transactions where each transaction is
|
||||
separated from the others, so a rollback or commit in one transaction
|
||||
does not affect the other.</li>
|
||||
|
||||
<li>Can execute simple DML SQL statements, such as,
|
||||
INSERT a row into the EMP table via the OracleCommand's ExecuteNonQuery method</li>
|
||||
|
||||
<li>The System.Data.OracleClient.dll assembly can be built with mcs/mono via
|
||||
the makefile.gnu for System.Data.OracleClient or csc/.net via the
|
||||
System.Data.OracleClient.build nant build file.</li>
|
||||
|
||||
<li>Can retrieve data via ExecuteReader and OracleDataReader. Currently,
|
||||
supports character, numeric, some date data types. ExecuteScalar
|
||||
also works.</li>
|
||||
|
||||
<li>Simple input parameters (character and numeric data) can now
|
||||
be used in SQL queries. Output parameters do not yet work.</li>
|
||||
|
||||
<li>OracleException and Error handling exists now.</li>
|
||||
|
||||
<li>Message handling needs to be added for non-critical messages
|
||||
received from Oracle</li>
|
||||
|
||||
<li>Handling of various data types need to be added.</li>
|
||||
|
||||
<li>Data Adapter exists, and a DataSet can be filled using it. The
|
||||
Data Adapter is abstract enough that it should work as expected.</li>
|
||||
|
||||
<li>Lots of missing functionality and bugs.</li>
|
||||
|
||||
<li>Works with SQL# command-line and GTK# versions in cvs. Only works with
|
||||
simple character data though. SQL# For GTK# can only show the results to
|
||||
the TextView because the Data Adapter is not yet available</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Be able to retrieve results via a data reader (WORKING)</li>
|
||||
<li>Parameters support (IN PROGRESS)</li>
|
||||
<li>transactions (WORKING)</li>
|
||||
<li>Stored Procedures, Functions, and Packages support</li>
|
||||
<li>Be able to fill a DataTable in a DataSet via a data adapter (IN PROGRESS)</li>
|
||||
<li>Support for Oracle 8i and 9i (UNKNOWN)</li>
|
||||
<li>Support LOBs</li>
|
||||
<li>Support all the data types</li>
|
||||
<li>Implement Connection pooling</li>
|
||||
<li>Security</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing System.Data.OracleClient
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs</li>
|
||||
|
||||
<li>Have access to an Oracle 8i database or download it from
|
||||
<a href="http://www.oracle.com/">Oracle</a>. If you are connecting
|
||||
remotely to an Oracle database, you need the Oracle client software.
|
||||
Registration to the <a href="http://technet.oracle.com/">Oracle Technology Network</a> is free. If installing on Linux,
|
||||
I suggest you do a lot of searching to see how others installed Oracle on Linux.</li>
|
||||
|
||||
<li>Make sure System.Data.OracleClient.dll assembly is built, if not, go
|
||||
into System.Data.OracleClient and do a make -f makefile.gnu (on Linux) or
|
||||
../../nant/NAnt.exe (on Windows using Cygwin).</li>
|
||||
|
||||
<li>Take a look at TestOracleClient.cs found at mcs/class/System.Data.OracleClient/Test</li>
|
||||
|
||||
<li>The Data Source is an Oracle TNSNAME</li>
|
||||
|
||||
<li>Has a connection string format:
|
||||
<pre>
|
||||
"Data Source=tnsname;User ID=userid;Password=password"
|
||||
</pre>
|
||||
</li>
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.OracleClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main (string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Data Source=testdb;" +
|
||||
"User ID=scott;" +
|
||||
"Password=tiger;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new OracleConnection (connectionString);
|
||||
dbcon.Open ();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand ();
|
||||
string sql = "SELECT ename, job FROM scott.emp";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader ();
|
||||
while (reader.Read ()) {
|
||||
string employeeName = reader["ename"];
|
||||
string job = reader["job"];
|
||||
Console.WriteLine ("Employee Name: {0} Job: {1}",
|
||||
employeeName, job);
|
||||
}
|
||||
// clean up
|
||||
reader.Close ();
|
||||
reader = null;
|
||||
dbcmd.CommandText = sql;
|
||||
dbcmd.ExecuteNonQuery ();
|
||||
dbcmd.Dispose ();
|
||||
dbcmd = null;
|
||||
dbcon.Close ();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r System.Data.OracleClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r System.Data.OracleClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
* International sites
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="http://www.monohispano.org">Mono
|
||||
Hispano</a>: The spanish-speaking community of Mono
|
||||
developers and users. They have quite a number of
|
||||
unique documents and tutorials.
|
||||
|
||||
<li><a href="http://www.go-mono.pl">Mono Poland</a>:
|
||||
Mono site for polish users.
|
||||
|
||||
</ul>
|
||||
|
||||
* User sites
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Alp Toker's <a
|
||||
href="http://www.atoker.com/mono/">site</a>: He is an
|
||||
active Mono developer (gsirc, platano) and produces
|
||||
very nice Debian packages of Mono.
|
||||
|
||||
<li>Brian Ritchie's <a
|
||||
href="http://www12.brinkster.com/brianr/">site</a>:
|
||||
Brian is a contributor to Mono's class library (ODBC
|
||||
provider and the database multiplexing assembly), and
|
||||
has built an application server for .NET and Mono.
|
||||
His site contains news, software, as well as his
|
||||
weblog.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -100,11 +100,6 @@
|
||||
available, means that trojans or worms could be built
|
||||
into the products by malicious engineers.
|
||||
|
||||
Various government officials in non-US countries also
|
||||
have a policy that no state sensitive information can
|
||||
be held by foreign companies in foreign soil. A natural
|
||||
matter of national security to some.
|
||||
|
||||
* <b>Security:</b> With a centralized system like
|
||||
Passport, imagine the repercussions of a malicious
|
||||
hacker gaining access to the Passport database.
|
||||
|
||||
@@ -1,578 +0,0 @@
|
||||
* PostgreSQL Data Provider
|
||||
|
||||
There are two ADO.NET data providers for <a href="http://www.postgresql.org/">PostgreSQL</a> in Mono:
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a>
|
||||
<ul>
|
||||
<li>a .NET Managed Data Provider for PostgreSQL
|
||||
|
||||
<li>Written in 100% C#</li>
|
||||
|
||||
<li>does not require a client library</li>
|
||||
|
||||
<li>works on Mono and Microsoft .NET</li>
|
||||
|
||||
<li>created by Francisco Figueiredo jr. and has many developers working on it
|
||||
|
||||
<li>works in the SQL# (command-line and GTK# GUI versions)</li>
|
||||
|
||||
<li>in namespace Npgsql and assembly Npgsql and is found in mcs
|
||||
at mcs/class/Npgsql</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Mono.Data.PostgreSQL (deprecated)
|
||||
<ul>
|
||||
<li>Deprecated in favor of Npgsql</li>
|
||||
|
||||
<li>Exists in namespace Mono.Data.PostgreSql and assembly Mono.Data.PostgreSql</li>
|
||||
|
||||
<li>Is a Mono Data Provider for the <a href="http://www.postgresql.org/">PostgreSQL</a>
|
||||
client/server database management system.</li>
|
||||
|
||||
<li>Written in C# and has C# bindings to the PostgreSQL C Client library pq.dll on Windows
|
||||
and libpq.so on Linux.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
Below, see separate Testing sections for Npgsql and Mono.Data.PostgreSqlClient.
|
||||
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Npgsql
|
||||
<ul>
|
||||
<li>Builds and Runs on both Microsoft .NET and Mono.</li>
|
||||
<li>Works using SQL# (command-line and GTK# versions)</li>
|
||||
<li>You can send insert, update, delete queries
|
||||
through NpgsqlCommand.ExecuteNonQuery() method.</li>
|
||||
<li>You can send queries like, select count(*) from table, select version()
|
||||
with NpgsqlCommand.ExecuteScalar() method.</li>
|
||||
<li>There is logging support. (Thanks Dave Page)
|
||||
To use it, place code like that in your program:</li>
|
||||
|
||||
<pre>
|
||||
// Enable logging.
|
||||
NpgsqlEventLog.Level = LogLevel.Debug; // LogLevel.
|
||||
NpgsqlEventLog.LogName = "NpgsqlTests.LogFile"; // LogFile.
|
||||
</pre>
|
||||
|
||||
<li>You can use Npgsql with Mono (Thanks Kristis Makris). It is not working perfectly.</li>
|
||||
<li>There is a winforms test suite (Thanks Dave Page).</li>
|
||||
<li>Clearer code in NpgsqlConnection removing *magic* numbers and constants. (Thanks Kristis Makris)</li>
|
||||
<li>Better support of ODBC-like ConnectionString in NpgsqlConnection (Thanks Dave Page)</li>
|
||||
<li>Thanks Ulrich Sprick for all discussion and ideas.</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li>Mono.Data.PostgreSQL status
|
||||
<ul>
|
||||
|
||||
<li>Deprecated in favor of Npgsql</li>
|
||||
|
||||
<li>We are able to do simple CREATE TABLE, DROP TABLE, UPDATE, INSERT, and
|
||||
DELETE SQL commands using the ExecuteNonQuery method in PgSqlCommand.</li>
|
||||
|
||||
<li>We can execute multiple queries and do a NextResult() in PgSqlDataReader()
|
||||
to get the next result set.</li>
|
||||
|
||||
<li>We are also able to do simple aggregate functions,
|
||||
ie, count(), sum(), min(), and max()
|
||||
in a simple SELECT SQL query using the ExecuteScalar() now.</li>
|
||||
|
||||
<li>We are also able to retrieve data with a simple SELECT SQL query
|
||||
using ExecuteReader() which returns a PgSqlDataReader. We are able to
|
||||
use GetSchemaTable() to get the meta data about the table columns.
|
||||
We are able to Read() to get each row from the result set.</li>
|
||||
|
||||
<li>We are able to get
|
||||
String data (char, character, text, varchar), Int16 (smallint),
|
||||
Int32 (integer), Int64 (bigint), DateTime (time, date, timestamp),
|
||||
Boolean (boolean), Single (float), and Double (double).
|
||||
More data types will come later. Note, the types that do work still
|
||||
need thorough testing.</li>
|
||||
|
||||
<li>Rows that are returned which contain columns that are NULL are handled now.
|
||||
The PgSqlDataReader method IsDBNull() needs to be called to determine
|
||||
if a field IS NULL before trying to read data from that field.</li>
|
||||
|
||||
<li>Calling PostgreSQL stored procedures works. It does not work perfectly.
|
||||
It may not
|
||||
even work to specification - yet. If you want to test it yourself, look at
|
||||
TestSqlDataReader.cs or PostgresTest.cs in
|
||||
mcs/class/System.Data/Test.</li>
|
||||
|
||||
<li>Below, I have some sample code you can
|
||||
use to call a PostgreSQL stored procedure named "version". This stored
|
||||
procedure returns a string containing the PostgreSQL server version. Notice
|
||||
the CommandType is StoredProcedure and the method ExecuteScalar() is called.</li>
|
||||
|
||||
<li>ExecuteScalar() is a lightweight method in class PgSqlCommand that only returns
|
||||
one row and one column as one object - even if there is more than row or column.</li>
|
||||
|
||||
<li>We have the beginnings of Parameters support PostgreSQL. Only
|
||||
Input Parameters are currently supported. Output, Input/Output,
|
||||
and Return parameters still need to be done.</li>
|
||||
|
||||
<li>A lot of Exceptions need to be thrown for various exceptions. However,
|
||||
PgSqlException, PgSqlErrorCollection, and PgSqlError have been partially
|
||||
implemented.</li>
|
||||
|
||||
<li>Tim Coleman and Rodrigo Moya got the beginnings of the
|
||||
PgSqlDataAdapter/DataSet/DataTable/DataRow to work. Currently,
|
||||
the PgSqlDataAdapter can Fill() relational data into a DataTable in a DataSet.
|
||||
See the test mcs/class/System.Data/Test/TestSqlDataAdapter.cs to see it in action.</li>
|
||||
|
||||
<li>Works in the SQL# command-line version
|
||||
and the GTK# version on Linux. It only works in SQL# command-line version
|
||||
on Windows.</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
<ul>
|
||||
<li>More testing and fixing bugs</li>
|
||||
|
||||
<li>Better error handling</li>
|
||||
|
||||
<li>More Data Types to use</li>
|
||||
|
||||
<li>Any features for Npgsql should be implemented in Npgsql's main cvs repository at
|
||||
gborg.postgresql.org. Most bugs should be fixed in gborg.postgresql.org's cvs.
|
||||
Only bugs neccessary for building and running of Npgsql on Mono can be done in Mono cvs,
|
||||
but once applied they should be sent to Npgsql's mailing list
|
||||
at gborg.postgresql.org for inclusion into cvs there. Whenever there is
|
||||
a release of Npgsql (determined by Francisco Figueiredo jr. or a release
|
||||
of Mono (determined by Miguel de Icaza), then the Npgsql source
|
||||
in gborg.postgresql.org's cvs will be used to update the Npgsql source in
|
||||
Mono's cvs.
|
||||
</li>
|
||||
|
||||
<li>Mono.Data.PostgreSqlClient even though deprecated can still
|
||||
accept bug fixes. This is because other areas, such as, ASP.NET examples
|
||||
may still use this provider.</li>
|
||||
|
||||
<li>Add any missing functionality to Npgsql. If this funtionality works on
|
||||
.NET but not on Mono, implement the missing features or fix the bugs in Mono</li>
|
||||
|
||||
<li>Npgsql has replaced Mono.Data.PostgreSqlClient as the provider of
|
||||
choice to use. However, Mono.Data.PostgreSqlClient will remain in a
|
||||
deprecated state until nobody uses it anymore - then it can be removed</li>
|
||||
|
||||
<li>Implement more of PostgreSQL 7.3 features in Npgsql</li>
|
||||
</ul>
|
||||
|
||||
** Testing Mono.Data.PostgreSqlClient
|
||||
|
||||
<ul>
|
||||
* <p>In order to test Mono.Data.PostgreSqlClient, you will need to have
|
||||
access to a remote PostgreSQL DBMS, or you will have to install
|
||||
one locally. PostgreSQL was the first ADO.NET provider created in Mono.
|
||||
|
||||
<p>Why use PostgreSQL? Because it is free software, has a client
|
||||
library that is easy to use, PostgreSQL is easy to install on
|
||||
Unix and Windows (using the Cygwin install program), not difficult to setup after
|
||||
installation, and it runs under: Linux,
|
||||
Windows (via cygwin and ipc-daemon), Unix, and
|
||||
others. This allowed us to create the
|
||||
System.Data functionality in Mono much quicker.
|
||||
|
||||
<p>If you plan on using a remote PostgreSQL DBMS Server,
|
||||
than you will need to have the PostgreSQL client software on your
|
||||
local computer that includes libpq.so (pq.dll on Windows).
|
||||
|
||||
<p>The System.Data tests use this connection string to connect
|
||||
to the PostgreSQL database named "test" at host "localhost" as
|
||||
user "postgres".
|
||||
|
||||
<pre>
|
||||
"Server=localhost;Database=test;User ID=postgres;Password=fun2db"
|
||||
(or)
|
||||
"host=localhost;dbname=test;user=postgres;password=fun2db"
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
<p>Installation instructions for PostgreSQL DBMS:
|
||||
|
||||
<b>On Unix</b>
|
||||
|
||||
<ul>
|
||||
* Read the PostgreSQL Installation Instructions
|
||||
at \usr\doc\postgresql-x.x.x\html\installation.html
|
||||
|
||||
* Depending on your Unix system,
|
||||
PostgreSQL maybe already installed, a database user 'postgres' created,
|
||||
a linux user 'postgres' created and initdb ran. Or maybe not.
|
||||
|
||||
<pre>
|
||||
su
|
||||
adduser postgres
|
||||
mkdir /usr/local/pgsql/data
|
||||
chown postgres /usr/local/pgsql/data
|
||||
su - postgres
|
||||
initdb -D /usr/local/pgsql/data
|
||||
postmaster -i -D /usr/local/pgsql/data
|
||||
createdb test
|
||||
psql test
|
||||
</pre>
|
||||
|
||||
* Make sure you have a database user named postgres. It is best to install
|
||||
the PostgreSQL DBMS under linux user postgres. When you run the postmaster,
|
||||
run it under the user postgres as well. If this was not done, then you
|
||||
will need to create a user named postgres for the System.Data tests.
|
||||
|
||||
* If you already installed PostgeSQL and you do not have a database
|
||||
user named postgres, then you can create user postgres using psql:
|
||||
|
||||
<pre>
|
||||
psql test
|
||||
create user postgres with password 'fun2db';
|
||||
</pre>
|
||||
|
||||
* The postmaster must be run with -i option.
|
||||
|
||||
* In the /usr/local/pgsql/data/pg_hba.conf file, you need
|
||||
to have the AUTH_TYPE set to md5. You can read more on this at
|
||||
/usr/doc/postgresql-7.2.1/html/client-authentication.html
|
||||
or wherever your
|
||||
PostgreSQL html docs are located. See the 2nd line below,
|
||||
host 127.0.0.1 has an AUTH_TYPE md5 in pg_hba.conf.
|
||||
|
||||
<pre>
|
||||
# TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE
|
||||
|
||||
local all trust
|
||||
host all 127.0.0.1 255.255.255.255 md5
|
||||
</pre>
|
||||
|
||||
* If you can not find your PostgreSQL documentation locally or you
|
||||
did not install it, then you
|
||||
can get it <a href="http://www.postgresql.org/idocs/">here</a>.
|
||||
|
||||
</ul>
|
||||
|
||||
<b>On Windows</b>
|
||||
|
||||
<ul>
|
||||
* Use the <a href="http://www.cygwin.com/">Cygwin</a> installer to
|
||||
install the PostgreSQL DBMS. It is
|
||||
found in the database category.
|
||||
|
||||
* <p>Read the file postgres-x.x.README at /usr/doc/Cygwin and read
|
||||
the requirements to install PostgreSQL. Those requirements
|
||||
are included with cygwin except cygipc. A default installtion
|
||||
of cygwin does not install everything you will need, so on the
|
||||
safe side, just include everything when installing cygwin.
|
||||
|
||||
* <p>The -x.x in postgres-x.x is the version of your PostgreSQL DBMS.
|
||||
|
||||
* <p>Once Cygwin has installed the PostgreSQL DBMS on your computer,
|
||||
read the file FAQ_MSWIN which is available
|
||||
in /usr/doc/postgres-x.x
|
||||
|
||||
* <p>Important notes from this file are:
|
||||
|
||||
<ul>
|
||||
<p><b>2.</b> - Install the latest <a href="http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/index.html">CygIPC</a> package.
|
||||
Cygwin includes a utility bunzip2 which can be used to unzip it. Now, change to
|
||||
the root directory by
|
||||
typing "cd /" then
|
||||
you can use "tar xvf cygipc.xxx.tar" to untar it
|
||||
in the root directory in cygwin.
|
||||
|
||||
<p>The cygipc package contains the support to run ipc-daemon
|
||||
that you will need
|
||||
to run before you can
|
||||
run the PostgreSQL DBMS Server daemon (postmaster) or run
|
||||
initdb which initializes the PostgreSQL database.
|
||||
|
||||
<p><b>3.</b> The Cygwin bin directory has to be placed in
|
||||
the path before the Windows program directories,
|
||||
for example, C:\cygwin\bin
|
||||
|
||||
<p><b>My own note.</b> In the Windows control panel, I set
|
||||
the environment variables PATH to my cygwin /usr/local/bin,
|
||||
/usr/bin, and /bin. I also set my LD_LIBRARY_PATH to
|
||||
/usr/local/lib and /usr/lib. For example:
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
PATH=c:\cygwin\usr\local\bin;c:\cygwin\usr\bin;c:\cygwin\bin;
|
||||
LD_LIBRARY_PATH=c:\cygwin\usr\local\lib;c:\cygwin\usr\lib;
|
||||
</pre>
|
||||
|
||||
<p><b>4.</b> Start the ipc-daemon that came with the cygipc
|
||||
package. There
|
||||
are two ways to do this: run it from the command line as:
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
ipc-daemon &
|
||||
</pre>
|
||||
<p>or you can set it up as a Windows service. See the
|
||||
file cygrunsrv.README at /usr/doc/Cygwin on how to do this
|
||||
for ipc-daemon and postmaster. Note the
|
||||
troubleshooting section at the end of
|
||||
the cygrunsrv.README file.
|
||||
|
||||
<p>To install ipc-daemon as a service,
|
||||
you just have to run
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
ipc-daemon --install-as-service' (--remove-as-service)
|
||||
</pre>
|
||||
|
||||
<p>and then run
|
||||
|
||||
<pre>
|
||||
net start ipc-daemon
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
<p>Read the installation.html file
|
||||
at /usr/doc/postgresql-x.x/html/installation.html
|
||||
|
||||
<p>You will see in this file that you will need to
|
||||
run the following commands:
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
mkdir /usr/local/pgsql/data
|
||||
initdb -D /usr/local/pgsql/data
|
||||
postmaster -D /usr/local/pgsql/data
|
||||
createdb test
|
||||
psql test
|
||||
</pre>
|
||||
|
||||
<p>When you need to connect to the database,
|
||||
you will need ipc-daemon and postmaster running. Start ipc-daemon
|
||||
before any of the command above. If you restart your computer, you
|
||||
need to start ipc-daemon and postmaster either manually or as a
|
||||
service.
|
||||
|
||||
<p>psql is a command-line PostgreSQL client tool to
|
||||
enter and run SQL commands and queries.
|
||||
|
||||
<p>If there is no database user named postgres, create a user named
|
||||
postgres with the following SQL command in the client tool psql:
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
psql test
|
||||
create user postgres with password 'fun2db';
|
||||
</pre>
|
||||
<p>The only reason I say this is so you can easily use the System.Data tests
|
||||
without having to change the database, userid, etc.
|
||||
</ul>
|
||||
|
||||
<p>In the path mcs/class/System.Data/Test
|
||||
there is a test for Mono.Data.PostgreSqlClient named
|
||||
PostgreTest.cs. Thanks goes to Gonzalo for creating the original
|
||||
PostgreSQL test.
|
||||
|
||||
<p>
|
||||
To compile the PostgresTest.cs program, do:
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
mcs PostgresTest.cs \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.PostgreSqlClient.dll
|
||||
</pre>
|
||||
|
||||
<p>If there are compile errors, such as, can not convert IDbConnection
|
||||
to PgSqlConnection, then you need to run mcs like:
|
||||
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
PostgresTest.cs \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.PostgreSqlClient.dll
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
To run using mint, do:
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
mint PostgresTest.exe
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
To run using mono, do:
|
||||
<pre>
|
||||
mono PostgresTest.exe
|
||||
</pre>
|
||||
|
||||
<p>C# Example for Mono.Data.PostgreSqlClient:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.PostgreSqlClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=test;" +
|
||||
"User ID=postgres;" +
|
||||
"Password=fun2db;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new PgConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname" +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.PostgreSqlClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.PostgreSqlClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
** Testing Npgsql
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs</li>
|
||||
|
||||
<li>Get <a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a>
|
||||
and make sure the binary assembly Npgsql.dll is installed in the same place that the
|
||||
mono class libraries are located.
|
||||
|
||||
<li>Read the Testing notes for Mono.Data.PostgreSqlClient too
|
||||
|
||||
<li>C# Example for Npgsql:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Npgsql;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=test;" +
|
||||
"User ID=postgres;" +
|
||||
"Password=fun2db;";
|
||||
IDbConnection dbcon;
|
||||
dbcon.Open();
|
||||
dbcon = new NpgsqlConnection(connectionString);
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Npgsql.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Npgsql.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
MANAGED_CALLS=`gdb -silent $1 -pid $2 << EOF | awk '/.* in \?\? \(\)/ {printf("call print_method_from_ip(%s)\n", $2);}'
|
||||
set height 0
|
||||
thread apply all bt
|
||||
quit
|
||||
EOF`
|
||||
|
||||
gdb -silent $1 -pid $2 << EOF
|
||||
set height 0
|
||||
thread apply all bt
|
||||
$MANAGED_CALLS
|
||||
quit
|
||||
EOF
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
* Provider Factory
|
||||
|
||||
<p>Brian Ritchie contributed a Provider Factory and Data Tools for Mono ADO.NET<br>
|
||||
which gives us a foundation for abstract data provider access within Mono
|
||||
|
||||
** Here are the deails:
|
||||
|
||||
<ul>
|
||||
<li>The Provider information is seperate from the connection string information.<br>
|
||||
This allows the list of providers to be stored in the machine.config file.</li>
|
||||
<li>Provider and ProviderCollection objects are available to access <br>
|
||||
the list of providers and modify them at runtime.</li>
|
||||
<li>The ProviderFactory object is used to create new connections, commands,<br>
|
||||
dataadapters, parameters, etc.</li>
|
||||
</ul>
|
||||
|
||||
** Overview of the ProviderFactory object model:
|
||||
|
||||
<ul>
|
||||
<li><b>ProviderFactory</b>: used to create new Connections, Commands,<br>
|
||||
DataAdapters, or Commands. All objects are returned using <br>
|
||||
the provider interfaces such as IDbConnection, IDbCommand,<br>
|
||||
IDbDataAdapter, or IDataParamter</li>
|
||||
|
||||
<li><b>DataTools</b>: static methods for doing <br>
|
||||
common tasks like filling a DataSet <br>
|
||||
with the contents of a select statement.</li>
|
||||
|
||||
<li><b>ProviderCollection</b>: list of providers configured <br>
|
||||
in the system. Initially loaded from app.config, but can <br>
|
||||
be modified at run-time.</li>
|
||||
|
||||
<li><b>Provider</b>: represents a given provider (factory) <br>
|
||||
and holds information needed to <br>
|
||||
create the types.</li>
|
||||
|
||||
<li><b>ProviderSectionHandler</b>: works behind the <br>
|
||||
scenes to load the list of <br>
|
||||
providers from the app.config into a ProviderCollection.</li>
|
||||
</ul>
|
||||
|
||||
** C# source code samples for creating a connection:
|
||||
|
||||
<pre>
|
||||
// Create connection using enhanced connection string
|
||||
// The factory attribute specifies which provider
|
||||
// to use. The factory attribute is parsed out, the
|
||||
// object is created, and then the rest of the
|
||||
// connection string is passed into the provider. The
|
||||
// providers are defined in
|
||||
// the app.config (or machine.config).
|
||||
IDbConnection conn;
|
||||
string connectionString =
|
||||
"factory=System.Data.SqlClient;" +
|
||||
"server=speedy;database=pubs;uid=sa";
|
||||
conn = ProviderFactory.CreateConnection(connectionString);
|
||||
|
||||
// Create connection specifying provider
|
||||
// and standard connection string
|
||||
IDbConnection conn;
|
||||
string provider = "System.Data.SqlClient";
|
||||
string connectionString = "server=speedy;database=pubs;uid=sa";
|
||||
conn = ProviderFactory.CreateConnection(provider,connectionString);
|
||||
|
||||
// Create connection using connection string stored
|
||||
// in app.config under <appSettings>
|
||||
IDbConnection conn;
|
||||
string appSetting = "PubsConnStr";
|
||||
conn = ProviderFactory.CreateConnectionFromConfig(appSetting);
|
||||
</pre>
|
||||
|
||||
|
||||
<p>C# Sample for Creating a DataAdapter and filling a DataSet.
|
||||
|
||||
<pre>
|
||||
// Create Connection
|
||||
IDbConnection conn =
|
||||
ProviderFactory.CreateConnectionFromConfig("PubsConnStr");
|
||||
|
||||
// Select command
|
||||
IDbCommand cmd=conn.CreateCommand();
|
||||
cmd.Text="select * from author";
|
||||
|
||||
// Data Adapter
|
||||
DataSet ds=new DataSet();
|
||||
IDbDataAdapter adapter=ProviderFactory.CreateDataAdapter(cmd);
|
||||
adapter.Fill(ds, "Table1");
|
||||
</pre>
|
||||
|
||||
<p>Creating a DataAdapter and filling a DataSet. <br>
|
||||
The super lazy method for people like me.
|
||||
<pre>
|
||||
// Create Connection
|
||||
IDbConnection conn =
|
||||
ProviderFactory.CreateConnectionFromConfig("TdsPubsConnStr");
|
||||
|
||||
// Data Adapter
|
||||
DataSet ds=DataTools.FillDataSet(conn, "select * from author");
|
||||
</pre>
|
||||
|
||||
|
||||
<p>Here's some sample code on displaying a list <br>
|
||||
of configured ADO.NET providers:
|
||||
<pre>
|
||||
Console.WriteLine("Configured Providers:");
|
||||
foreach (Provider p in ProviderFactory.Providers)
|
||||
Console.WriteLine(p.Description);
|
||||
</pre>
|
||||
|
||||
<p>A Super lazy overload to the FillDataSet method (in <br>
|
||||
DataTools.cs) that will fill a dataset in one line of code.
|
||||
|
||||
<pre>
|
||||
DataSet ds=DataTools.FillDataSet("PubsConnStr", "select * from authors");
|
||||
</pre>
|
||||
|
||||
** About Configuration Files
|
||||
|
||||
<p>Information about <a href="http://msdn.microsoft.com/library/en-us/vbcon/html/vboriintroductiontoapplicationsettingstorage.asp?frame=true">app.config</a> files
|
||||
can be found at <a href="http://msdn.microsoft.com/">MSDN</a>.
|
||||
|
||||
<p>See the mcs/class/Mono.Data/app.config for sample configuration file in<br>
|
||||
mcs source. Basically, if your application is named blah.exe, <br>
|
||||
you would create an app.config file named blah.exe.config
|
||||
|
||||
<p>Here's a sample app.config file showing the provider <br>
|
||||
declarations along with sample connection strings:
|
||||
|
||||
<pre>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="mono.data">
|
||||
<section name="providers" type="Mono.Data.ProviderSectionHandler,Mono.Data" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<appSettings>
|
||||
<add key="PubsConnStr" value="factory=System.Data.SqlClient;server=speedy;database=pubs;uid=sa;pwd=" />
|
||||
</appSettings>
|
||||
<mono.data>
|
||||
<providers>
|
||||
<provider name="System.Data.SqlClient" connection="System.Data.SqlClient.SqlConnection" adapter="System.Data.SqlClient.SqlDataAdapter" assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<provider name="System.Data.OleDb" connection="System.Data.OleDb.OleDbConnection" adapter="System.Data.OleDb.OleDbDataAdapter" assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<provider name="System.Data.Odbc" connection="System.Data.Odbc.OdbcConnection" adapter="System.Data.OleDb.OdbcDataAdapter" assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<provider name="Mono.Data.TdsClient" connection="Mono.Data.TdsClient.TdsConnection" adapter="Mono.Data.TdsClient.TdsDataAdapter" assembly="Mono.Data.TdsClient" />
|
||||
<provider name="Mono.Data.MySql" connection="Mono.Data.MySql.MySqlConnection" adapter="Mono.Data.MySql.MySqlDataAdapter" assembly="Mono.Data.MySql" />
|
||||
<provider name="Mono.Data.PostgreSqlClient" connection="Mono.Data.PostgreSqlClient.PgSqlConnection" adapter="Mono.Data.PostgreSqlClient.PgSqlDataAdapter" assembly="Mono.Data.PostgreSqlClient" />
|
||||
<provider name="Mono.Data.SqliteClient" connection="Mono.Data.SqliteClient.SqliteConnection" adapter="Mono.Data.SqliteClient.SqliteDataAdapter" assembly="Mono.Data.SqliteClient" />
|
||||
<provider name="Mono.Data.SybaseClient" connection="Mono.Data.SybaseClient.SybaseConnection" adapter="Mono.Data.SybaseClient.SybaseDataAdapter" assembly="Mono.Data.SybaseClient" />
|
||||
</providers>
|
||||
</mono.data>
|
||||
</configuration>
|
||||
|
||||
</pre>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
standard GNOME interfaces for easily creating reusable,
|
||||
language independent components, controls and compound
|
||||
documents. This technology is known as <a
|
||||
href="http://developer.ximian.com/articles/whitepapers/bonobo">Bonobo</a>.
|
||||
href="http://developer.ximian.com/tech/bonobo.html">Bonobo</a>.
|
||||
Interfaces to Bonobo exist for C, Perl, Python, and
|
||||
Java.
|
||||
|
||||
@@ -134,51 +134,25 @@
|
||||
|
||||
** What makes up Mono?
|
||||
|
||||
There are various pieces that make up Mono today:
|
||||
There are various pieces that will make up Mono:
|
||||
|
||||
<ul>
|
||||
* A C# compiler.
|
||||
|
||||
* The Virtual Execution System: that has the
|
||||
* The Virtual Execution System: that will have the
|
||||
Just-in-Time compiler, garbage collector, loader,
|
||||
threading engine.
|
||||
|
||||
A byte code interpreter is provided for quickly
|
||||
A byte code interpreter will be provided for quickly
|
||||
porting Mono to new systems and debugging the JIT
|
||||
purposes, but it is not intended to be the ideal
|
||||
execution environment.
|
||||
|
||||
* An implemenation of the .NET class libraries:
|
||||
Remoting, Reflection, Reflection.Emit, Xml, Xpath,
|
||||
Xslt, Xml Serialization, Web Services support.
|
||||
* An implemenation of the .NET class library.
|
||||
|
||||
* Cross platform class libraries for data access:
|
||||
Postgress, MySQL, DB2, TDS, Sybase, Oracle, ODBC and
|
||||
Gnome's GDA.
|
||||
* Visual development tools.
|
||||
|
||||
* Unix class libraries: Mono.Posix
|
||||
|
||||
* Gnome-specific class libraries: The Gtk# family.
|
||||
|
||||
* A code pre-compiler to generate native code ahead of
|
||||
time.
|
||||
|
||||
* Gtk# a toolkit to develop GNOME applications on Unix
|
||||
and Windows.
|
||||
|
||||
* An implementation of the Remoting infrastructure in
|
||||
.NET
|
||||
</ul>
|
||||
|
||||
Other work-in-progress components:
|
||||
|
||||
<ul>
|
||||
* A VB.NET compiler and JScript compilers are in the works.
|
||||
|
||||
* Web services on the server side.
|
||||
|
||||
* We are planning to include Remoting.CORBA as part of
|
||||
Mono standard distribution.
|
||||
* A CIL GCC frontend.
|
||||
</ul>
|
||||
|
||||
** Why use GNOME components?
|
||||
|
||||
@@ -11,13 +11,9 @@
|
||||
|
||||
The <a href="http://msdn.microsoft.com/net">Microsoft.NET site.</a>
|
||||
|
||||
The Microsoft .NET Framework 1.0 can be downloaded <a
|
||||
href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a>
|
||||
The Microsoft .NET Framework 1.0 can be downloaded <a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a>
|
||||
|
||||
New methods that are not documented in 1.0, are documented <a
|
||||
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/framewrkaddend.asp">here</a>
|
||||
|
||||
The changes between .NET 1.0 and .NET 1.1 are available <a href="http://www.csharphelp.com/archives2/archive406.html">here</a>
|
||||
New methods that are not documented in 1.0, are documented <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/framewrkaddend.asp">here</a>
|
||||
|
||||
** IRC
|
||||
|
||||
@@ -26,19 +22,6 @@
|
||||
|
||||
** Mono related sites.
|
||||
|
||||
The Mono Tutorial:
|
||||
|
||||
<a href="http://go-mono.com/tutorial/">GNOME.NET Tutorial</a>
|
||||
|
||||
and other useful tutorials (Gtk#, Glade#, Embeded, etc) (in Spanish) at
|
||||
|
||||
<a href="http://www.monohispano.org">The Mono Hispano site</a>.
|
||||
|
||||
Community site for Mono at <a href="http://www.gotmono.com">Got Mono</a>
|
||||
|
||||
Wikis: <a href="http://www.nullenvoid.com/gtksharp/wiki">Gtk# Wiki</a>
|
||||
and <a href="http://www.nullenvoid.com/mono/wiki">Mono Wiki</a>.
|
||||
|
||||
Sergey's web page on Mono resources:
|
||||
|
||||
<a href="http://mono.eurosoft.od.ua">http://mono.eurosoft.od.ua</a>
|
||||
@@ -47,10 +30,6 @@
|
||||
|
||||
<a href="http://www.gotdotnet.com">Got Dot Net</a>
|
||||
|
||||
Got Mono:
|
||||
|
||||
<a href="http://www.gotmono.com">Got Mono</a>
|
||||
|
||||
MonoMail:
|
||||
|
||||
<a href="http://sourceforge.net/projects/monomail/">http://sourceforge.net/projects/monomail/</a>
|
||||
@@ -66,14 +45,6 @@
|
||||
href="http://www.foundstone.com/pdf/dotnet-security-framework.pdf">.NET
|
||||
security architecture</a>.
|
||||
|
||||
** Development Tools
|
||||
|
||||
A tool to compare two assemblies:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=winchurn">http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=winchurn</a>
|
||||
</ul>
|
||||
|
||||
** Presentations
|
||||
|
||||
Currently the <a href="Presentations/O-Reilly">O'Reilly</a>
|
||||
@@ -132,57 +103,31 @@
|
||||
|
||||
There are a number of related projects to Mono:
|
||||
|
||||
<li><b>Development tools</b></li>
|
||||
<ul>
|
||||
* <a
|
||||
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
|
||||
Develop:</a> an IDE for the C# language written in C#.
|
||||
|
||||
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
|
||||
testing framework for .NET classes.
|
||||
|
||||
* <a
|
||||
href="http://xmarks.sourceforge.net/doc.html">XMarks DOC.NET:</a> For
|
||||
creating online documentation you can browse for your own classes.
|
||||
|
||||
* <a
|
||||
href="http://www.cl.cam.ac.uk/~jds31/research/gccnet/">GCC .NET backend</a>.
|
||||
|
||||
Jeremy Singer has developed a .NET backend for GCC. This is research work.
|
||||
</ul>
|
||||
|
||||
<li><b>Class Libraries</b></li>
|
||||
<ul>
|
||||
* <a href="http://9mm.com/~ogl/sdldotnet/">SDL for
|
||||
.NET:</a> Bindings for the popular SDL graphics library.
|
||||
|
||||
|
||||
* C# bindings for OpenGL and SDL are available here: <a
|
||||
href="http://csgl.sourceforge.net">http://csgl.sourceforge.net</a>
|
||||
|
||||
|
||||
* <a
|
||||
href="http://qtcsharp.sourceforge.net">Qt#:</a>
|
||||
C# bindings for the Qt toolkit.
|
||||
|
||||
* <a
|
||||
href="http://codigolivre.org.br/projects/monoqle">Project MonoQLE:</a> a C# Message Queue Server.
|
||||
Sorry only in portuguese, for now.
|
||||
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
|
||||
Develop:</a> an IDE for the C# language written in C#.
|
||||
|
||||
</ul>
|
||||
* <a
|
||||
href="http://www.improve-technologies.com/alpha/esharp/">Eclipse
|
||||
Plugin for C#</a>
|
||||
|
||||
<li><b>Programming languages:</b></li>
|
||||
<ul>
|
||||
* <a
|
||||
href="http://janet-js.sourceforge.net/">Janet:</a>
|
||||
an implemention of ECMAScript (the standarized
|
||||
version of JavaScript) in C#
|
||||
</ul>
|
||||
|
||||
<li><b>Other projects</b></li>
|
||||
<ul>
|
||||
* <a
|
||||
href="http://www.improve-technologies.com/alpha/esharp/">Eclipse
|
||||
Plugin for C#</a>
|
||||
href="http://xmarks.sourceforge.net/doc.html">XMarks DOC.NET:</a> For
|
||||
creating online documentation you can browse for your own classes.
|
||||
|
||||
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
|
||||
testing framework for .NET classes.
|
||||
|
||||
* <a href="http://www.kaffe.org">Kaffe:</a> A popular
|
||||
Free Software JIT engine for Java.
|
||||
@@ -190,13 +135,15 @@
|
||||
* <a href="http://www.intel.com/research/mrl/orp">ORP:</a> A research
|
||||
JIT/VM/GC system from Intel.
|
||||
|
||||
* C# bindings for OpenGL and SDL are available here: <a
|
||||
href="http://csgl.sourceforge.net">http://csgl.sourceforge.net</a>
|
||||
|
||||
* <a
|
||||
href="http://www.southern-storm.com.au/portable_net.html">Portable.NET:</a>
|
||||
Another implementation of the CLI and C# compiler.
|
||||
|
||||
* A Free (GFDL) tutorial on C# in Spanish with
|
||||
examples, slides, and extras (under development). Get it <a
|
||||
href="http://geneura.ugr.es/~jaime/csharp/">here</a>.
|
||||
* A Free (GFDL) tutorial on C# in Spanish with examples, slides, and extras (under development). Get it <a href="http://geneura.ugr.es/~jaime/csharp/">here</a>.
|
||||
|
||||
</ul>
|
||||
|
||||
** GNOME Documentation
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
* The Mono runtime
|
||||
|
||||
The Mono runtime engine is considered feature complete.
|
||||
|
||||
It implements a Just-in-Time compiler engine for the CIL
|
||||
virtual machine, the class loader, the garbage collector,
|
||||
threading system and metadata access libraries.
|
||||
The Mono runtime implements a JIT engine for the CIL virtual
|
||||
machine (as well as a byte code interpreter, this is to
|
||||
quickly port it to new systems), the class loader, the garbage
|
||||
collector, threading system and metadata access libraries.
|
||||
|
||||
We currently have two runtimes:
|
||||
|
||||
@@ -17,21 +16,50 @@
|
||||
easy-to-port runtime engine.
|
||||
</ul>
|
||||
|
||||
We are using the Boehm conservative garbage collector.
|
||||
Currently we are using the Bohem conservative garbage
|
||||
collector, but we working on incorporating the ORP GC engine.
|
||||
|
||||
The Mono runtime can be used as a stand-alone process, or it
|
||||
can be <a href="embedded-api">embedded into applications</a> (see
|
||||
the documentation in mono/samples/embed for more details).
|
||||
** Executing MSIL/CIL images
|
||||
|
||||
Embedding the Mono runtime allows applications to be extended
|
||||
in C# while reusing all of the existing C and C++ code.
|
||||
The code will load an executable and map the references to
|
||||
external assemblies to our own version of the assemblies on
|
||||
Linux.
|
||||
|
||||
Paolo Molaro did a presentation on the current JIT engine and
|
||||
the new JIT engine. You can find his <a
|
||||
href="http://primates.ximian.com/~lupus/slides/jit/">slides
|
||||
here</a>
|
||||
Our roadmap looks like this, this has been updated as of
|
||||
<b>Dec 18, 2001</b>:
|
||||
|
||||
** Current JIT Engine: technical details (<b>updated, July 8th, 2002</b>)
|
||||
<ul>
|
||||
|
||||
* Milestone 1: <b>Done</b> Fully read and parse all CIL byte-codes
|
||||
and metadata tokens (ie, a disassembler).
|
||||
|
||||
* Milestone 2: <b>Done</b> Complete an interpreter for CIL byte
|
||||
codes. This interpreter can be used temporarly to
|
||||
run CIL byte code on a system where no JIT is
|
||||
available.
|
||||
|
||||
* Milestone 3: <b>Done</b>Define an <i>lburg</i>-like
|
||||
instruction selector for the JITer for Intel.
|
||||
|
||||
* Milestone 4: <b>Done</b> Implement JITer. This is where our
|
||||
current efforts are focused on, the JITer currently runs
|
||||
all of the code we have tested on it. The major limitation
|
||||
is that our class libraries are not complete, and hence not
|
||||
every application can be ran.
|
||||
|
||||
* Milestone 5: Port of the JITer to non IA32 systems.
|
||||
</ul>
|
||||
|
||||
A setup similar to the Kaffe JIT engine will be used to
|
||||
layout the code to support non-IA32 architectures. Our work
|
||||
will be focused on getting a IA32 version running first.
|
||||
|
||||
The JIT engine works on Linux and Win32, although you
|
||||
will need to install the CygWin32 development tools to get a
|
||||
Unix-like compilation environment (mostly we use GNU make in
|
||||
a few of the makefiles).
|
||||
|
||||
** JIT Engine (<b>updated, July 8th, 2002</b>)
|
||||
|
||||
The JIT engine uses a code-generator generator approach for
|
||||
compilation. Given the properties of CIL byte codes, we can
|
||||
@@ -74,21 +102,30 @@
|
||||
|
||||
</ul>
|
||||
|
||||
** New JIT engine.
|
||||
** Future plans
|
||||
|
||||
We are working on a new JIT engine. The new JIT engine
|
||||
focuses on portability and in two intermediate representations
|
||||
that simplify the development of optimizations. This together
|
||||
with the Ahead-of-Time compilation will allow developers to
|
||||
deploy applications that match the speed of natively compiled code.
|
||||
We are evaluating the future directions for the JIT engine:
|
||||
both from our needs (optimizations like inlining, better register allocation,
|
||||
instruction scheduling, and porting to other CPUs).
|
||||
|
||||
We have not yet decided how we will evolve the JIT engine. We
|
||||
might just upgrade our current architecture, and provide optimizations as
|
||||
an extra layer.
|
||||
|
||||
** Garbage Collection
|
||||
|
||||
We are using the Boehm conservative GC. We might consider
|
||||
adopting other GC engines in the future, like the Intel ORP GC
|
||||
engine. The Intel ORP GC engine as it provides a precise
|
||||
Currently we are using the Boehm conservative GC. Although our plans
|
||||
are to move to the Intel ORP GC engine, our plans on a next generation
|
||||
dual-JIT engine have to be taken into account.
|
||||
|
||||
We will be using the Intel ORP GC engine as it provides a precise
|
||||
garbage collector engine, similar to what is available on the
|
||||
.NET environment.
|
||||
.NET environment.
|
||||
|
||||
Although using a conservative garbage collector like Bohem's
|
||||
would work, all the type information is available at runtime,
|
||||
so we can actually implement a better collector than a
|
||||
conservative collector.
|
||||
|
||||
<ul>
|
||||
* Garbage collection list and FAQ:<br>
|
||||
@@ -112,7 +149,7 @@
|
||||
The ECMA runtime and the .NET runtime assume an IO model and a
|
||||
threading model that is very similar to the Win32 API.
|
||||
|
||||
Dick Porter has developed WAPI: the Mono abstraction layer
|
||||
Dick Porter has been working on the Mono abstraction layer
|
||||
that allows our runtime to execute code that depend on this
|
||||
behaviour.
|
||||
|
||||
@@ -141,8 +178,7 @@
|
||||
as well as talking to system libraries.
|
||||
|
||||
Initially we used libffi, but it was fairly slow, so we have
|
||||
reused parts of the JIT work to create efficient PInvoke
|
||||
trampolines.
|
||||
reused parts of the JIT work to create efficient PInvoke trampolines.
|
||||
|
||||
** Remoting
|
||||
|
||||
|
||||
@@ -1,196 +0,0 @@
|
||||
* Screenshots
|
||||
|
||||
** Mono Debugger
|
||||
|
||||
Some shots of the <a href="jit-debug.html">Mono Debugger</a>
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/Screenshot-Debugger-1.png"><img src="images/Screenshot-Debugger-1-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Debugger showing the source code view.
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/Screenshot-Debugger-2.png"><img src="images/Screenshot-Debugger-2-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Debugger showing the CPU view.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** Mono Documentation Browser
|
||||
|
||||
The Mono Documentation Browser is available from <a
|
||||
href="anoncvs.html">CVS</a>, module `monodoc'.
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/Screenshot-B2.png"><img src="images/Screenshot-B2-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Mono Documentation Browser rendering a method description.
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/Screenshot-MethodSummary.png"><img src="images/Screenshot-MethodSummary-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Mono Documentation Browser rendering the class method summary
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** Eclipse running with Mono
|
||||
|
||||
Zoltan Varga made the Java VM for .NET <a
|
||||
href="http://www.ikvm.net">IKVM</a> run <a
|
||||
href="http://www.eclipse.org">Eclipse</a>, the IBM Open Source IDE.
|
||||
|
||||
<a href="images/ikvm-screenshot.png"><img src="images/ikvm-screenshot-thumb.png"></a>
|
||||
|
||||
** Mono Basic
|
||||
|
||||
The Mono Basic compiler ships with the Mono distribution.
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/gtk-vb.png"><img src="images/gtk-vb-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Mono Basic running a sample Gtk# application.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** Platano Media Player
|
||||
|
||||
Alp's <a href="http://www.atoker.com/platano/">Platano</a>
|
||||
Media Player is written with Gtk# (with GStreamer support):
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="images/platano_s.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Platano startup.
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="images/platano-playing_s.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Platano playing the <a
|
||||
href="http://developer.ximian.com/projects/third_party/codemonkey/index.html">Code
|
||||
Monkey At Work</a> video.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** GSIRC
|
||||
|
||||
Alp's <a href="http://www.atoker.com/gsirc/">GSIRC</a>
|
||||
Gtk-Sharp IRC written with Gtk#
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://go-mono.com/images/gsirc-0.2a_overview.jpg"><img src="images/gsirc-0.2a_overview-thumb.jpg"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
GSIRC is shown with the preferences dialog and chatting on some channels (rooms).
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** SQL# For GTK#
|
||||
|
||||
Daniel Morgan's SQL query tool that runs on Mono on Linux and Windows. It is
|
||||
written in C# and allows you to connect to various Mono ADO.NET providers and
|
||||
enter SQL commands.
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="http://go-mono.com/images/sqlsharp.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
SQL# For GTK# is shown retrieving data from a Microsoft SQL Server 2000 database.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** SkyNET
|
||||
|
||||
SkyNET is written in C# and uses GTK# for displaying a star chart.
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="http://go-mono.com/images/skynet.png">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** Windows.Forms
|
||||
|
||||
Windows.Forms running with Wine on Linux:
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://go-mono.com/images/WINESWF.JPG"><img src="http://go-mono.com/images/WINESWF-thumb.JPG"></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** Mono running on the iPaq
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="images/familiar-mint-hello.png">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
** Mono Certificate Viewer
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="images/swf-certview.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
running on Windows using SWF
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="images/gtk-certview.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
running on Linux (RH9) using GTK#
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1,214 +0,0 @@
|
||||
* Microsoft SQL Server Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Provider for Microsoft SQL Server 7/2000 databases</li>
|
||||
|
||||
<li>Exists in namespace System.Data.SqlClient and assembly System.Data</li>
|
||||
|
||||
<li>Created by Tim Coleman</li>
|
||||
|
||||
<li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
|
||||
|
||||
<li>Implemented in 100% C#</li>
|
||||
|
||||
<li>Is similar to the Mono.Data.TdsClient and Mono.Data.SybaseClient providers.</li>
|
||||
|
||||
<li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
|
||||
|
||||
<li>Uses TDS Protocol Version 7.0</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
** Current Status
|
||||
|
||||
|
||||
<ul>
|
||||
<li>Able to connect to Microsoft SQL Server 7/2000 databases</li>
|
||||
|
||||
<li>Connection pooling works.</li>
|
||||
|
||||
<li>Stored Procedures work</li>
|
||||
|
||||
<li>Parameters work.</li>
|
||||
|
||||
<li>Prepare works.</li>
|
||||
|
||||
<li>SQL commands can be executed
|
||||
via ExecuteNonQuery() of a SqlCommand.</li>
|
||||
|
||||
<li>SQL aggregates can be executed and a single row and single column
|
||||
result can be retrieved via ExecuteScalar() of a SqlCommand</li>
|
||||
|
||||
<li>SQL queries can be executed via ExecuteReader() and results
|
||||
can be retrieved via SqlDataReader.</li>
|
||||
|
||||
<li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
|
||||
in a SqlDataReader</li>
|
||||
|
||||
<li>XML can be read via ExecuteXmlReader in a SqlCommand.</li>
|
||||
|
||||
<li>Data can be filled in a DataTable in a DataSet via a SqlDataAdapter</li>
|
||||
|
||||
<li>Uses TDS Protocol Version 7.0</li>
|
||||
|
||||
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a></li>
|
||||
|
||||
<li>Works in the SQL# command-line and GTK# GUI version</li>
|
||||
</ul>
|
||||
|
||||
** Action plan
|
||||
|
||||
<ul>
|
||||
<li>Connection timeouts is being developed now</li>
|
||||
|
||||
<li>Needs more testing</li>
|
||||
|
||||
<li>Would like to figure out how to connect via Trusted_Connection or Integrated Security</li>
|
||||
|
||||
<li>Start work on TDS Protocol Version 8.0 support</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs installed</li>
|
||||
|
||||
<li>Have access to a Microsoft SQL Server database
|
||||
or either download it:
|
||||
<ul>
|
||||
<li><a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>If using Microsoft SQL Server 2000, make sure
|
||||
you are using at least Service Pack 3 for Microsoft SQL Server 2000. If using
|
||||
MSDE 2000, make sure you have the special Service Pack 3 for MSDE 2000.</li>
|
||||
|
||||
<li>For those that only have MSDE installed. You can change the authentication mode
|
||||
from Windows Only Authentication to SQL Server and Windows Authentications (also knows as Mixed-mode authentication)
|
||||
via the <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q322336&sd=tech#4">registry</a></li>. It is
|
||||
the LoginMode you need to change. By default,
|
||||
MSDE is installed with Windows Only Authentication. For SqlClient to work with MSDE, you will
|
||||
need to change the setting.</a>
|
||||
|
||||
<li>If using MSDE, you might need to create a new user with password. Give
|
||||
this user access to various databases in this MSDE instance. Also, for each
|
||||
database, give this new user at least SELECT access to the various tables you want
|
||||
to retrieve data from.</li>
|
||||
|
||||
<li>If you have Enterprise Manager, you can easily change the authentication mode
|
||||
for both MSDE and Microsoft SQL Server. To change the authentication mode in
|
||||
Enterprise Mananger, select the instance, right-click on it, and select properites.
|
||||
The SQL Server properties dialog for that instance will pop up. Choose the Security
|
||||
tab. Change the authentication from Windows Only to SQL Server and Windows. If
|
||||
the instance of your database does not show up in Enterprise Manager, Register first
|
||||
by selecting the Action menu and choosing New SQL Server Registration.</li>
|
||||
|
||||
<li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
|
||||
named SqlTest.cs and you could use this as a basis for your test.</li>
|
||||
|
||||
<li>Mono's SqlClient does not support trusted connections
|
||||
nor integrated security. You can not use this when connecting. You need
|
||||
to explicitly use a User ID and Password
|
||||
authenticated by SQL Server.</li>
|
||||
|
||||
<li>Has a connection string format:
|
||||
<pre>
|
||||
Server=hostname;Database=databaseName;User ID=userid;Password=password
|
||||
</pre>
|
||||
</li>
|
||||
<li>The Server part can be used three ways:
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td><b>Server Definition</b></td> <td><b>Example</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>hostname</td> <td>Server=MYHOST</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>hostname,port</td> <td>Server=MYHOST,1433</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>hostname\\instance</td> <td>Server=MYHOST\\NETSDK</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=pubs;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new SqlConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql =
|
||||
"SELECT fname, lname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["fname"];
|
||||
string LastName = reader["lname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs -r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
* SQL Lite Data Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Data Provider for
|
||||
the <a href"http://www.hwaci.com/sw/sqlite/">SQL Lite</a> which
|
||||
is an embeddable SQL database engine</li>
|
||||
|
||||
<li>From the SQL Lite web page: SQLite is a C library that
|
||||
implements an embeddable SQL database engine. Programs that link with
|
||||
the SQLite library can have SQL database access without
|
||||
running a separate RDBMS process. The distribution
|
||||
comes with a standalone command-line access program (sqlite) that
|
||||
can be used to administer an SQLite database and which serves
|
||||
as an example of how to use the SQLite library. SQLite is not a client library
|
||||
used to connect to a big database server. SQLite is the server. The SQLite
|
||||
library reads and writes directly to and from the database files on disk.</li>
|
||||
|
||||
<li>SQL Lite can be downloaded
|
||||
from <a href"http://www.hwaci.com/sw/sqlite/download.html">here</a>.
|
||||
binaries exist for Linux and Windows. sqlite.dll on Windows
|
||||
and sqlite.so on Linux. The source code is available too.</li>
|
||||
|
||||
<li>Exists in namespace and assembly Mono.Data.SqliteClient</li>
|
||||
|
||||
<li>Created by Vladimir Vukicevic so he could have a database of
|
||||
thumbnail images for mPhoto. mPhoto is GUI application
|
||||
for cataloging images. mPhoto runs on Mono
|
||||
and uses <a href="http:www.go-mono.com/gtk-sharp.html">GTK#</a> for its GUI.</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Able to connect, execute commands, and retrieve data...</li>
|
||||
|
||||
<li>Works in mPhoto by providing access to a SQL Lite database to store images.</li>
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Create a DataAdapter for SQL Lite named SqliteDataAdapter that can be used to
|
||||
Fill a DataTable in a DataSet</li>
|
||||
|
||||
<li>Get the method GetSchemaTable() in class SqliteDataReader to return a DataTable
|
||||
that works</li>
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Have a working mcs and mono</li>
|
||||
|
||||
<li>Make sure Mono.Data.SqliteClient.dll was built and is installed
|
||||
in the same place as the mono class libraries.</li>
|
||||
|
||||
<li>If you do not have <a href"http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a>,
|
||||
download it. There are binaries for Windows and Linux.</li>
|
||||
|
||||
<li>There is a test named SqliteTest.cs found at mcs/class/Mono.Data.SqliteTest/Test</li>
|
||||
|
||||
<li>Has a connection string format of "URI=file:some/path". For example,
|
||||
the connection string "URI=file:SqliteTest.db" will use the database file
|
||||
named SqliteTest.db, if it does not exist, the file will be created.</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.SqliteClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString = "URI=file:SqliteTest.db";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new MySQLConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader[0];
|
||||
string LastName = reader[1];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.SqliteClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.SqliteClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
* Sybase Data Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Provider for Sybase SQL Server databases</li>
|
||||
|
||||
<li>Exists in namespace Mono.Data.SybaseClient and assembly Mono.Data.SybaseClient</li>
|
||||
|
||||
<li>Created by Tim Coleman</li>
|
||||
|
||||
<li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
|
||||
|
||||
<li>Implemented in 100% C#</li>
|
||||
|
||||
<li>Is similar to the Mono.Data.TdsClient and System.Data.SqlClient providers.</li>
|
||||
|
||||
<li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
|
||||
|
||||
<li>Uses TDS Protocol Version 5.0</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Able to connect to Sybase databases</li>
|
||||
|
||||
<li>SQL commands can be executed
|
||||
via ExecuteNonQuery() of a SybaseCommand.</li>
|
||||
|
||||
<li>SQL aggregates can be executed and a single row and single column
|
||||
result can be retrieved via ExecuteScalar() of a SybaseCommand</li>
|
||||
|
||||
<li>SQL queries can be executed via ExecuteReader() and results
|
||||
can be retrieved via SybaseDataReader.</li>
|
||||
|
||||
<li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
|
||||
in a SybaseDataReader</li>
|
||||
|
||||
<li>Data can be filled in a DataTable in a DataSet via a SybaseDataAdapter</li>
|
||||
</ul>
|
||||
|
||||
** Action plan
|
||||
|
||||
<ul>
|
||||
<li>Connection timeouts is being developed now.
|
||||
|
||||
<li>Needs more testing...
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs installed</li>
|
||||
|
||||
<li>Have access to a Sybase database
|
||||
or either download it:
|
||||
<ul>
|
||||
<li><a href="http://www.sybase.com/downloads">Sybase</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
|
||||
named SqlTest.cs and you could use this as a basis for your test.</li>
|
||||
|
||||
<li>Has a connection string format:
|
||||
<pre>
|
||||
Server=hostname;Database=databaseName;User ID=userid;Password=password
|
||||
</pre>
|
||||
</li>
|
||||
<li>The Server part can be used two ways:
|
||||
<ul>
|
||||
<li>hostname - "Server=MYHOST"</li>
|
||||
<li>hostname,port - "Server=MYHOST,1533"</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.SybaseClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=pubs;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new SybaseConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql =
|
||||
"SELECT fname, lname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["fname"];
|
||||
string LastName = reader["lname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.SybaseClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.SybaseClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -1,164 +0,0 @@
|
||||
* Design of the Microsoft SQL Server, Sybase, and TDS Data Providers in Mono
|
||||
|
||||
<ul>
|
||||
* After much discussion among the Mono ADO.NET developers,
|
||||
we have come up with the design of implementing a Sybase, Microsoft
|
||||
SQL Server, and TDS Generic ADO.NET providers. These providers have
|
||||
been created and are actively developed by Tim Coleman.
|
||||
|
||||
* Since Sybase and Microsoft SQL Server databases both
|
||||
use the TDS protocol for data access, and other implementations
|
||||
of TDS (FreeTDS and jTDS) have included support for multiple
|
||||
versions of the TDS, we have decided to do the same.
|
||||
|
||||
* The TdsClient ADO.NET provider will be Mono's first provider
|
||||
written completely in C# without any dependencies except
|
||||
the usual suspects: corlib.dll, System.dll, and System.Xml.dll.
|
||||
</ul>
|
||||
|
||||
* New ADO.NET Providers
|
||||
|
||||
<p>There will be three ADO.NET providers that will use TDS.
|
||||
|
||||
<ol>
|
||||
<li><p>Mono.Data.SybaseClient namepace and assembly will
|
||||
hold the ADO.NET provider for Sybase SQL Server database.
|
||||
This provider uses TDS version 5.0 which
|
||||
can only be used with Sybase databases.
|
||||
|
||||
<li><p>System.Data.SqlClient namespace and System.Data assembly
|
||||
will hold the ADO.NET provider
|
||||
for Microsoft SQL Server 7.0/2000 databases. This provider is to be
|
||||
compatible with SqlClient in Microsoft .NET and uses TDS version 7.0
|
||||
which only supports Microsoft SQL Server 7.0/2000.
|
||||
There is TDS version 8.0
|
||||
which we will need to support as well, but it is used for
|
||||
Microsoft SQL Server 2000 databases.
|
||||
|
||||
<li><p>Mono.Data.TdsClient namespace and assembly is a generic
|
||||
provider for older TDS databases. This provider will default to
|
||||
using TDS version 4.2 which can be used by older Sybase and
|
||||
Microsoft SQL Server databases.
|
||||
</ol>
|
||||
|
||||
* Building The New Providers
|
||||
|
||||
<p> All three providers will use common internal code
|
||||
at Mono.Data.TdsClient.Internal. Any classes in
|
||||
Mono.Data.TdsClient.Internal will have the internal
|
||||
keyword and will be built with the assembly of that provider.
|
||||
<ol>
|
||||
<li><p>SqlClient will build its assembly System.Data using files
|
||||
from System.Data, System.Data.SqlClient, System.Data.SqlTypes,
|
||||
System.Data.Common, and Mono.Data.TdsClient.Internal.
|
||||
|
||||
<p>SqlClient
|
||||
will only reference the usual
|
||||
suspects: corlib.dll, System.dll, and System.Xml.dll. SqlClient will be
|
||||
a wrapper around TdsClient.Internal, but provide specific functionality to
|
||||
Microsoft SQL Server 7.0/2000 databases.
|
||||
|
||||
<p>SqlClient build example:
|
||||
|
||||
<pre>
|
||||
mcs -target:library -out:System.Data.dll \
|
||||
System.Data.SqlClient/*.cs \
|
||||
..\Mono.Data.TdsClient\Mono.Data.TdsClient.Internal\*.cs \
|
||||
[any other classes in System.Data assembly...] \
|
||||
-r corlib.dll -r System.dll -r System.Xml.dll
|
||||
</pre>
|
||||
|
||||
<li><p>SybaseClient will build its assembly Mono.Data.SybaseClient using
|
||||
files from Mono.Data.SybaseClient and Mono.Data.TdsClient.Internal.
|
||||
SybaseClient will reference
|
||||
the usual suspects plus System.Data.dll SybaseClient will
|
||||
be a wrapper around TdsClient.Internal, but provide specific
|
||||
functionality to Sybase.
|
||||
|
||||
<p>SybaseClient build example:
|
||||
|
||||
<pre>
|
||||
mcs -target:library -out:Mono.Data.SybaseClient.dll \
|
||||
Mono.Data.SybaseClient\*.cs \
|
||||
..\Mono.Data.TdsClient\Mono.Data.TdsClient.Internal\*.cs
|
||||
-r corlib.dll -r System.dll -r System.Xml.dll -r System.Data.dll
|
||||
</pre>
|
||||
|
||||
<li><p>TdsClient will build its assembly Mono.Data.TdsClient
|
||||
using files from Mono.Data.TdsClient
|
||||
and Mono.Data.TdsClient.Internal. TdsClient will reference the
|
||||
usual suspects plus System.Data.dll TdsClient is a wrapper
|
||||
provider around TdsClient.Internal used for generic
|
||||
unit tests. TdsClient will a wrapper around TdsClient.Internal
|
||||
as a generic TDS provider
|
||||
and allow TDS configuration options not exposed in SqlClient
|
||||
nor SybaseClient, such as, TdsVersion will be exposed in TdsClient
|
||||
but not in SqlClient nor SybaseClient.
|
||||
|
||||
<p>TdsClient build example:
|
||||
|
||||
<pre>
|
||||
mcs -target:library -out:Mono.Data.TdsClient.dll \
|
||||
Mono.Data.TdsClient\*.cs \
|
||||
Mono.Data.TdsClient.Internal\*.cs \
|
||||
-r corlib.dll -r System.dll -r System.Xml.dll -r System.Data.dll
|
||||
</pre>
|
||||
</ol>
|
||||
|
||||
* Classes in Mono.Data.TdsClient.Internal will:
|
||||
|
||||
<ul>
|
||||
<li>use the internal keyword to prevent exposing these classes
|
||||
to the System.Data.dll assembly.
|
||||
|
||||
<li> implement the ADO.NET interfaces just like any other ADO.NET provider, such as,
|
||||
IDbConnection, IDbCommand, IDataReader, IDataRecord, IDataAdapter, etc...
|
||||
|
||||
<li> be sealed just like other providers
|
||||
|
||||
<li> provide features to be directly used by the SqlClient and SybaseClient
|
||||
providers, such
|
||||
as, setting the default TDS version: SqlClient to 7.0 and SybaseClient
|
||||
to 5.0 and TdsClient to 4.2.
|
||||
|
||||
<li> be written completely in C# or IL assembly language (if need be).
|
||||
|
||||
<li> implement the TDS protocol version 4.2, 5.0, 7.0, and 8.0. This
|
||||
is where most of the
|
||||
work will take place.
|
||||
|
||||
<li> be an internal ADO.NET provider to the public ADO.NET providers:
|
||||
System.Data.SqlClient, Mono.Data.SybaseClient, and Mono.Data.TdsClient.
|
||||
</ul>
|
||||
|
||||
* Implementation Details of the TDS Protocol
|
||||
|
||||
<ul>
|
||||
* will be implemented in pure C# from scratch
|
||||
|
||||
* will reside in Mono.Data.TdsClient.Internal
|
||||
|
||||
* will use FreeTDS and jTDS as rerferences.
|
||||
</ul>
|
||||
|
||||
* More Information
|
||||
|
||||
<ul>
|
||||
* <a href="http://www.freetds.org/">FreeTDS</a> is C API that implements
|
||||
the TDS protocol. Has libraries for tds, ctlib, and dblib. It builds
|
||||
and runs on Windows, Linux, and other platforms. FreeTDS provides
|
||||
data access to Microsoft SQL Server and Sybase databases.
|
||||
|
||||
* <a href="http://jtds.sf.net/">jTDS</a> is a 100% Java JDBC provider
|
||||
for Microsoft SQL Server and Sybase databases.
|
||||
|
||||
* <a href="http://www.freetds.org/tds.html">TDS Protocol</a>
|
||||
</ul>
|
||||
|
||||
* Contribute
|
||||
|
||||
<p>Anybody willing to help? If so,
|
||||
contact any of the people working on the ADO.NET support
|
||||
in Mono: Rodrigo Moya, Tim Coleman, Daniel Morgan, Brian Ritchie,
|
||||
Vladimir Vukicevic, Ville Palo, Franklin Wise, and others.
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
* TDS Generic Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Provider for older Sybase and Microsoft SQL Server databases</li>
|
||||
|
||||
<li>Exists in namespace Mono.Data.TdsClient and assembly Mono.Data.TdsClient</li>
|
||||
|
||||
<li>Created by Tim Coleman</li>
|
||||
|
||||
<li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
|
||||
|
||||
<li>Implemented in 100% C#</li>
|
||||
|
||||
<li>Is similar to the Mono.Data.SybaseClient and System.Data.SqlClient providers.</li>
|
||||
|
||||
<li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
|
||||
|
||||
<li>Uses TDS Protocol Version 4.2 by default</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
|
||||
|
||||
<ul>
|
||||
<li>Only builds on Windows currently due to mcs does not support modules and mcs
|
||||
has problems with code that is internal.</li>
|
||||
|
||||
<li>Able to connect to Microsoft SQL Server and Sybase databases</li>
|
||||
|
||||
<li>SQL commands can be executed
|
||||
via ExecuteNonQuery() of a TdsCommand.</li>
|
||||
|
||||
<li>SQL aggregates can be executed and a single row and single column
|
||||
result can be retrieved via ExecuteScalar() of a TdsCommand</li>
|
||||
|
||||
<li>SQL queries can be executed via ExecuteReader() and results
|
||||
can be retrieved via TdsDataReader.</li>
|
||||
|
||||
<li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
|
||||
in a TdsDataReader</li>
|
||||
|
||||
<li>Data can be filled in a DataTable in a DataSet via a TdsDataAdapter</li>
|
||||
</ul>
|
||||
|
||||
** Action plan
|
||||
|
||||
<ul>
|
||||
<li>Connection timeouts is being developed now.</li>
|
||||
|
||||
<li>TODO</li>
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs installed</li>
|
||||
|
||||
<li>Have access to a Sybase or Microsoft SQL Server database
|
||||
or either download it:
|
||||
<ul>
|
||||
<li><a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a></li>
|
||||
<li><a href="http://www.sybase.com/downloads">Sybase</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>If using Microsoft SQL Server 2000, make sure
|
||||
you are using at least Service Pack 3 for Microsoft SQL Server 2000</li>
|
||||
|
||||
<li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
|
||||
named SqlTest.cs and you could use this as a basis for your test.</li>
|
||||
|
||||
<li>Has a connection string format:
|
||||
<pre>
|
||||
Server=hostname;Database=databaseName;User ID=userid;Password=password
|
||||
</pre>
|
||||
</li>
|
||||
<li>The Server part can be used two ways:
|
||||
<ul>
|
||||
<li>hostname - "Server=MYHOST"</li>
|
||||
<li>hostname,port - "Server=MYHOST,1533"</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.TdsClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=pubs;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new TdsConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql =
|
||||
"SELECT fname, lname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["fname"];
|
||||
string LastName = reader["lname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.TdsClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.TdsClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -9,114 +9,13 @@
|
||||
** Class Library Tests
|
||||
|
||||
All classes in Mono libraries should have comprehensive unit test
|
||||
suites to go with them. Unit testing is a software engineering
|
||||
methodology that makes it easier to build correct code. Every
|
||||
suites to go with them. Unit testing is a software engineering
|
||||
methodology that makes it easier to build correct code. Every
|
||||
method in every class should have a set of tests to verify
|
||||
that they work correctly. Mono also needs a testing framework
|
||||
that they work correctly. Mono also needs a testing framework
|
||||
to make it easy to write and run lots of tests.
|
||||
|
||||
|
||||
** Getting started
|
||||
|
||||
If you are new to writing NUnit tests, there is a template you may use
|
||||
to help get started. The file is:
|
||||
|
||||
<b>mcs/class/doc/TemplateTest.cs</b>
|
||||
|
||||
Save a copy of this file in the appropriate test subdirecty
|
||||
(see below), and replace all the {text} markers with
|
||||
appropriate code. Comments in the template are there to guide
|
||||
you. You should also look at existing tests to see how other
|
||||
people have written them.
|
||||
mcs/class/corlib/Test/System.Collections/CollectionBaseTest.cs
|
||||
is a small one that might help.
|
||||
|
||||
The directory that will contain your new file depends on the
|
||||
assembly/namespace of the class for which you are creating the
|
||||
tests. Under mcs/class there is a directory for each
|
||||
assembly. In each assembly there is a Test directory,
|
||||
e.g. mcs/class/corlib/Test. In the Test directory there are
|
||||
sub-directories for each namespace in the assembly,
|
||||
e.g. mcs/class/corlib/Test/Sytem. Put your new test file in
|
||||
the appropriate sub-directory under Test for the class you are
|
||||
testing.
|
||||
|
||||
Once all of that is done, you can do a 'make test' from the top mcs
|
||||
directory. Your test class will be automagically included in the
|
||||
build and the tests will be run along with all the others.
|
||||
|
||||
* Tips on writing Unit tests.
|
||||
|
||||
You should look at the <a href="http://nunit.org">NUnit documentation</a>,
|
||||
as it is a fantastic product, and includes fantastic documentation,
|
||||
but here are some tips for those of you who are already reading
|
||||
this web page.
|
||||
|
||||
|
||||
** Provide an unique error message for Assert()
|
||||
|
||||
Include an unique message for each Assert() so that when the assert
|
||||
fails, it is trivial to locate it in the source. Otherwise, it may be
|
||||
difficult to determine which part of the test is failing. A good way
|
||||
to ensure unique messages is to use something like #A01, #A02 etc.
|
||||
|
||||
Ok:
|
||||
<pre>
|
||||
|
||||
AssertEquals("array match", compare[0], i1[0]);
|
||||
AssertEquals("array match", compare[1], i1[1]);
|
||||
AssertEquals("array match", compare[2], i1[2]);
|
||||
AssertEquals("array match", compare[3], i1[3]);
|
||||
</pre>
|
||||
|
||||
Excellent:
|
||||
<pre>
|
||||
AssertEquals("#A01", compare[0], i1[0]);
|
||||
AssertEquals("#A02", compare[1], i1[1]);
|
||||
AssertEquals("#A03", compare[2], i1[2]);
|
||||
AssertEquals("#A04", compare[3], i1[3]);
|
||||
</pre>
|
||||
|
||||
Once you used such a number in an Assert(), don't change it later on -
|
||||
people might use it it identify the test in bug reports or in mailing
|
||||
lists.
|
||||
|
||||
** Use AssertEquals() to compare things, not Assert().
|
||||
|
||||
Do not compare two values with Assert() - if the test fails,
|
||||
people have no idea what went wrong while AssertEquals()
|
||||
reports the failed value.
|
||||
|
||||
Ok:
|
||||
<pre>
|
||||
Assert ("A01", myTicks[0] == t1.Ticks);
|
||||
</pre>
|
||||
|
||||
Excellent:
|
||||
<pre>
|
||||
AssertEquals ("A01", myTicks[0], t1.Ticks);
|
||||
</pre>
|
||||
|
||||
** Test your test with the Microsoft runtime
|
||||
|
||||
If possible, try to run your testsuite with the Microsoft runtime on
|
||||
.NET on Windows and make sure all tests in it pass. This is especially
|
||||
important if you're writing a totally new testcase - without this
|
||||
check you can never be sure that your testcase contains no bugs ....
|
||||
|
||||
Don't worry if you're writing your test on Linux, other people can
|
||||
test it for you on Windows.
|
||||
|
||||
Sometimes you may discover that a test doesn't show the expected
|
||||
result when run with the Microsoft runtime - either because there is a
|
||||
bug in their runtime or something is misleading or wrong in their
|
||||
documentation. In this case, please put a detailed description of the
|
||||
problem to mcs/class/doc/API-notes and do also report it to the
|
||||
<a href="mailing-lists">mailing list</a> - we'll forward this to the
|
||||
Microsoft people from time to time to help them fix their documentation
|
||||
and runtime.
|
||||
|
||||
** Unit tests.
|
||||
Try <a href="http://nunit.sourceforge.net">NUnit</a>
|
||||
|
||||
Why do unit testing? It becomes simple to run automated tests
|
||||
for the whole library. Unit tests are a safety net - you can
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
0,Home,index.html,index.src
|
||||
1,FAQ,faq.html,faq.src
|
||||
1,News archive,http://monoevo.sf.net/mwn/archives.html
|
||||
1,Screenshots,screenshots.html,screenshots.src
|
||||
1,Team,team.html,team.src
|
||||
1,Other sites,other.html,other.src
|
||||
1,Old News,oldnews.html,oldnews.src
|
||||
0,Mono,rationale.html,rationale.src
|
||||
1,Runtime,runtime.html,runtime.src
|
||||
2,Embedding,embedded-api.html,embedded-api.src
|
||||
1,Classes,class-library.html,class-library.src
|
||||
1,Gtk#,gtk-sharp.html,gtk-sharp.src
|
||||
1,ASP.NET,asp-net.html,asp-net.src
|
||||
1,ADO.NET,ado-net.html,ado-net.src
|
||||
1,Gtk#,http://gtk-sharp.sourceforge.net
|
||||
1,Class Status,class-status.html,class-status.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,corlib,class-status-corlib.html,class-status-corlib.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,System,class-status-System.html,class-status-System.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Xml,class-status-System.Xml.html,class-status-System.Xml.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Drawing,class-status-System.Drawing.html,class-status-System.Drawing.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Web.Services,class-status-System.Web.Services.html,class-status-System.Web.Services.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Microsoft.VisualBasic,class-status-Microsoft.VisualBasic.html,class-status-Microsoft.VisualBasic.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,EnterpriseServices,class-status-System.EnterpriseServices.html,class-status-System.EnterpriseServices.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Formatters.Soap,class-status-System.Runtime.Serialization.Formatters.Soap.html,class-status-System.Runtime.Serialization.Formatters.Soap.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,C# Compiler,c-sharp.html,c-sharp.src
|
||||
1,VB Compiler,mbas.html,mbas.src
|
||||
1,Status,status.html,status.src
|
||||
0,Download,download.html,download.src
|
||||
1,CVS access,ccvs.html,ccvs.src
|
||||
1,AnonCVS access,anoncvs.html,anoncvs.src
|
||||
@@ -21,11 +24,17 @@
|
||||
1,Hackers,hackers.html,hackers.src
|
||||
1,Documentation,documentation.html,documentation.src
|
||||
1,Class Docs,classlib-doc.html,classlib-doc.src
|
||||
1,Doc format,monodoc-xml.html,monodoc-xml.src
|
||||
1,Test Suite,testing.html,testing.src
|
||||
1,Tools,tools.html,tools.src
|
||||
1,Porting,porting.html,porting.src
|
||||
2,PowerPC,ppc.html,ppc.src
|
||||
1,HOWTO,mono-contribution-howto.html,mono-contribution-howto.src
|
||||
0,Plans,plans.html,plans.src
|
||||
1,ADO.NET,ado-net.html,ado-net.src
|
||||
1,ASP.NET,asp-net.html,asp-net.src
|
||||
1,Java,java.html,java.src
|
||||
1,Windows.Forms,winforms.html,winforms.src
|
||||
0,Resources,resources.html,resources.src
|
||||
1,Beginning,mono-beginning.html,mono-beginning.src
|
||||
1,Mailing Lists,mailing-lists.html,mailing-lists.src
|
||||
@@ -35,35 +44,6 @@
|
||||
1,Papers,papers.html,papers.src
|
||||
1,Languages,languages.html,languages.src
|
||||
1,Debugging,jit-debug.html,jit-debug.src
|
||||
0,Plans,plans.html,plans.src
|
||||
1,ADO.NET,ado-net.html,ado-net.src
|
||||
2,ProviderFactory,provider-factory.html,provider-factory.src
|
||||
2,Firebird Interbase,firebird.html,firebird.src
|
||||
2,IBM DB2,ibmdb2.html,ibmdb2.src
|
||||
2,Microsft SQL Server,sqlclient.html,sqlclient.src
|
||||
2,MySQL,mysql.html,mysql.src
|
||||
2,ODBC,odbc.html,odbc.src
|
||||
2,OLE DB,oledb.html,oledb.src
|
||||
2,Oracle,oracle.html,oracle.src
|
||||
2,PostgreSQL,postgresql.html,postgresql.src
|
||||
2,SQL Lite,sqlite.html,sqlite.src
|
||||
2,Sybase,sybase.html,sybase.src
|
||||
2,TDS Generic,tdsclient.html,tdsclient.src
|
||||
1,Crypto,crypto.html,crypto.src
|
||||
1,Java,java.html,java.src
|
||||
1,Windows.Forms,winforms.html,winforms.src
|
||||
0,Class Status,class-status.html,class-status.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,corlib,class-status-corlib.html,class-status-corlib.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,System,class-status-System.html,class-status-System.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Xml,class-status-System.Xml.html,class-status-System.Xml.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Drawing,class-status-System.Drawing.html,class-status-System.Drawing.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Web.Services,class-status-System.Web.Services.html,class-status-System.Web.Services.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Microsoft.VisualBasic,class-status-Microsoft.VisualBasic.html,class-status-Microsoft.VisualBasic.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Windows.Forms,class-status-System.Windows.Forms.html,class-status-System.Windows.Forms.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,EnterpriseServices,class-status-System.EnterpriseServices.html,class-status-System.EnterpriseServices.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Formatters.Soap,class-status-System.Runtime.Serialization.Formatters.Soap.html,class-status-System.Runtime.Serialization.Formatters.Soap.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Cscompmgd,class-status-Cscompmgd.html,class-status-Cscompmgd.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,System.Security,class-status-System.Security.html,class-status-System.Security.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Example 1,jit-debug-sample.html,jit-debug-sample.src
|
||||
2,Example 2,jit-debug-sample2.html,jit-debug-sample2.src
|
||||
0,Contact,contact.html,contact.src
|
||||
@@ -212,7 +212,7 @@ function clickHandler (evt)
|
||||
if (evt.ctrlKey)
|
||||
{
|
||||
var strRoot = 'http://cvs.hispalinux.es/cgi-bin/cvsweb/mcs/class/';
|
||||
var strExtra = '?cvsroot=mono';
|
||||
var strExtra = '?cvsroot=Mono';
|
||||
|
||||
if (strAssembly)
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 14 KiB |
@@ -1,85 +1,59 @@
|
||||
ifeq ($(findstring CYGWIN,$(shell uname)),)
|
||||
CSC=mcs
|
||||
RUN_MONO=mono
|
||||
else
|
||||
CSC=csc /nologo
|
||||
endif
|
||||
CSCRIPT = $(SYSTEMROOT)/system32/cscript.exe
|
||||
CSC=csc
|
||||
|
||||
CORCOMPARE=../../../mcs/tools/corcompare
|
||||
|
||||
OBJECTS= \
|
||||
deploy/ado-net.html \
|
||||
deploy/provider-factory.html \
|
||||
deploy/mysql.html \
|
||||
deploy/odbc.html \
|
||||
deploy/oledb.html \
|
||||
deploy/oracle.html \
|
||||
deploy/postgresql.html \
|
||||
deploy/sqlclient.html \
|
||||
deploy/sqlite.html \
|
||||
deploy/sybase.html \
|
||||
deploy/tdsclient.html \
|
||||
deploy/anoncvs.html \
|
||||
deploy/asp-net.html \
|
||||
deploy/books.html \
|
||||
deploy/contributing.html \
|
||||
deploy/contact.html \
|
||||
deploy/c-sharp.html \
|
||||
deploy/ccvs.html \
|
||||
deploy/documentation.html \
|
||||
deploy/download.html \
|
||||
deploy/crypto.html \
|
||||
deploy/embedded-api.html \
|
||||
deploy/faq.html \
|
||||
deploy/firebird.html \
|
||||
deploy/gcc-frontend.html \
|
||||
deploy/gtk-sharp.html \
|
||||
deploy/hackers.html \
|
||||
deploy/ideas.html \
|
||||
deploy/ibmdb2.html \
|
||||
deploy/index.html \
|
||||
deploy/oldnews.html \
|
||||
deploy/java.html \
|
||||
deploy/jit-debug.html \
|
||||
deploy/languages.html \
|
||||
deploy/mailing-lists.html \
|
||||
deploy/mbas.html \
|
||||
deploy/mono-beginning.html \
|
||||
deploy/mono-contribution-howto.html \
|
||||
deploy/monodoc-xml.html \
|
||||
deploy/other.html \
|
||||
deploy/papers.html \
|
||||
deploy/passport.html \
|
||||
deploy/plans.html \
|
||||
deploy/porting.html \
|
||||
deploy/ppc.html \
|
||||
deploy/rationale.html \
|
||||
deploy/resources.html \
|
||||
deploy/roadmap.html \
|
||||
deploy/runtime.html \
|
||||
deploy/screenshots.html \
|
||||
deploy/status.html \
|
||||
deploy/team.html \
|
||||
deploy/testing.html \
|
||||
deploy/tools.html \
|
||||
deploy/winforms.html \
|
||||
deploy/class-status.html \
|
||||
deploy/class-status-corlib.html \
|
||||
deploy/class-status-System.html \
|
||||
deploy/class-status-System.Xml.html \
|
||||
deploy/class-status-System.Drawing.html \
|
||||
deploy/class-status-System.Data.html \
|
||||
deploy/class-status-System.Web.html \
|
||||
deploy/class-status-System.Web.Services.html \
|
||||
deploy/class-status-Microsoft.VisualBasic.html \
|
||||
deploy/class-status-System.EnterpriseServices.html \
|
||||
OBJECTS= \
|
||||
deploy/ado-net.html \
|
||||
deploy/anoncvs.html \
|
||||
deploy/asp-net.html \
|
||||
deploy/books.html \
|
||||
deploy/contributing.html \
|
||||
deploy/class-status.html \
|
||||
deploy/class-status-corlib.html \
|
||||
deploy/class-status-System.html \
|
||||
deploy/class-status-System.Xml.html \
|
||||
deploy/class-status-System.Drawing.html \
|
||||
deploy/class-status-System.Data.html \
|
||||
deploy/class-status-System.Web.html \
|
||||
deploy/class-status-System.Web.Services.html \
|
||||
deploy/class-status-Microsoft.VisualBasic.html \
|
||||
deploy/class-status-System.EnterpriseServices.html \
|
||||
deploy/class-status-System.Runtime.Serialization.Formatters.Soap.html \
|
||||
deploy/class-status-System.Security.html \
|
||||
deploy/class-status-System.Windows.Forms.html \
|
||||
deploy/class-status-Cscompmgd.html \
|
||||
deploy/class-library.html \
|
||||
deploy/classlib-doc.html
|
||||
|
||||
deploy/class-library.html \
|
||||
deploy/classlib-doc.html \
|
||||
deploy/contact.html \
|
||||
deploy/c-sharp.html \
|
||||
deploy/ccvs.html \
|
||||
deploy/documentation.html \
|
||||
deploy/download.html \
|
||||
deploy/faq.html \
|
||||
deploy/gcc-frontend.html \
|
||||
deploy/hackers.html \
|
||||
deploy/index.html \
|
||||
deploy/ideas.html \
|
||||
deploy/java.html \
|
||||
deploy/jit-debug.html \
|
||||
deploy/jit-debug-sample.html \
|
||||
deploy/jit-debug-sample2.html \
|
||||
deploy/languages.html \
|
||||
deploy/mailing-lists.html \
|
||||
deploy/mono-beginning.html \
|
||||
deploy/mono-contribution-howto.html \
|
||||
deploy/monodoc-xml.html \
|
||||
deploy/papers.html \
|
||||
deploy/passport.html \
|
||||
deploy/plans.html \
|
||||
deploy/porting.html \
|
||||
deploy/ppc.html \
|
||||
deploy/rationale.html \
|
||||
deploy/resources.html \
|
||||
deploy/roadmap.html \
|
||||
deploy/runtime.html \
|
||||
deploy/status.html \
|
||||
deploy/testing.html \
|
||||
deploy/tools.html \
|
||||
deploy/winforms.html
|
||||
#2,Configuration.Install,class-status-System.Configuration.Install.html,class-status-System.Configuration.Install.src,cm/cormissing.css,cm/cormissing.js
|
||||
#2,Runtime.Remoting,class-status-System.Runtime.Remoting.html,class-status-System.Runtime.Remoting.src,cm/cormissing.css,cm/cormissing.js
|
||||
|
||||
@@ -90,10 +64,9 @@ NON_HTML_SOURCES= \
|
||||
../mono-build.sh \
|
||||
../mono-build-w32.sh
|
||||
|
||||
all: $(OBJECTS) deploy/index.rss ../team
|
||||
|
||||
all: $(OBJECTS) deploy/index.rss
|
||||
perl process.pl commands template.html.in deploy
|
||||
-mkdir deploy/team
|
||||
cp team/*png deploy/team
|
||||
|
||||
tutorial: mono-beginning.html.stamp mono-beginning.pdf
|
||||
cp -a mono-beginning mono-beginning.xml mono-beginning.pdf deploy
|
||||
@@ -109,24 +82,18 @@ mono-beginning.xml: ../mono-beginning.xml
|
||||
cp ../mono-beginning.xml .
|
||||
|
||||
deploy/index.rss: mono-rss.exe ../index
|
||||
$(RUN_MONO) ./mono-rss.exe ../index deploy/index.rss
|
||||
./mono-rss.exe ../index deploy/index.rss
|
||||
|
||||
mono-rss.exe: mono-rss.cs rss.cs
|
||||
$(CSC) mono-rss.cs rss.cs
|
||||
|
||||
../team: render-team-page.exe team.xml
|
||||
$(RUN_MONO) ./render-team-page.exe team.xml "../team"
|
||||
|
||||
render-team-page.exe: render-team-page.cs
|
||||
$(CSC) render-team-page.cs
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(patsubst deploy/%.html,src/%.src, $(OBJECTS)) src/*.xml src/*.html.in ../class-status-* ../class-status
|
||||
|
||||
push:
|
||||
cp -f $(NON_HTML_SOURCES) deploy
|
||||
echo scp -P 2200 -r deploy/* www@www.go-mono.com:/web/cvsmodules/mono
|
||||
(cd deploy; rsync --verbose --recursive --checksum --update --rsh='ssh' . www@www.go-mono.com:/web/cvsmodules/mono )
|
||||
echo scp -P 2200 -r deploy/* www@www.ximian.com:/web/cvsmodules/mono
|
||||
(cd deploy; rsync --verbose --recursive --checksum --update --rsh='ssh -p 2200' . www@www.ximian.com:/web/cvsmodules/mono )
|
||||
|
||||
push2:
|
||||
scp -r deploy/* primates:public_html/xxx
|
||||
@@ -135,34 +102,32 @@ $(OBJECTS): $(patsubst deploy/%.html,src/%.src, $(OBJECTS))
|
||||
|
||||
#.PRECIOUS: $(patsubst deploy/%.html,src/%.src, $(OBJECTS))
|
||||
|
||||
transform.exe: transform.cs
|
||||
$(CSC) transform.cs
|
||||
|
||||
|
||||
.PRECIOUS: src/%.src
|
||||
src/%.src: ../% commands template.html.in #makefile
|
||||
src/%.src: ../% commands makefile template.html.in
|
||||
perl htmlify $< > $@
|
||||
|
||||
|
||||
|
||||
.PRECIOUS: ../class-status-%
|
||||
../class-status-%: src/%.html.in ../class-status.in
|
||||
cat ../class-status.in $< > $@
|
||||
|
||||
|
||||
.PRECIOUS: src/%.html.in
|
||||
src/%.html.in: src/%.xml transform.exe $(CORCOMPARE)/cormissing.xsl
|
||||
$(RUN_MONO) ./transform.exe $< $(CORCOMPARE)/cormissing.xsl > $@
|
||||
src/%.html.in: src/%.xml $(CORCOMPARE)/transform.js $(CORCOMPARE)/cormissing.xsl
|
||||
$(CSCRIPT) /nologo $(CORCOMPARE)/transform.js $< $(CORCOMPARE)/cormissing.xsl > $@
|
||||
|
||||
|
||||
|
||||
.PRECIOUS: src/%.xml
|
||||
src/%.xml: ../../../mcs/class/lib/%.dll $(CORCOMPARE)/CorCompare.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/CorCompare.exe -x $@ $<
|
||||
$(CORCOMPARE)/CorCompare.exe -x $@ $<
|
||||
|
||||
src/corlib.xml: ../../../mcs/class/lib/corlib_cmp.dll $(CORCOMPARE)/CorCompare.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/CorCompare.exe -f corlib -ms mscorlib -x $@ $<
|
||||
$(CORCOMPARE)/CorCompare.exe -f corlib -ms mscorlib -x $@ $<
|
||||
|
||||
src/System.Security.xml: ../../../mcs/class/lib/System.Security_cmp.dll $(CORCOMPARE)/CorCompare.exe
|
||||
$(RUN_MONO) $(CORCOMPARE)/CorCompare.exe -f System.Security -ms System.Security -x $@ $<
|
||||
|
||||
../class-status: ../class-status.in
|
||||
cp -f $< $@
|
||||
|
||||
@@ -26,7 +26,7 @@ while (<COMMANDS>) {
|
||||
$menu .= "<tr><td valign=\"top\" class=\"navi" . $command[0];
|
||||
$menu .= "\"><a class=\"navi" . $command[0];
|
||||
$menu .= "\"";
|
||||
$menu .= " HREF=\"$command[2]\">$command[1]</A></td></tr>\n\n";
|
||||
$menu .= "HREF=\"$command[2]\">$command[1]</A></td></tr>\n\n";
|
||||
}
|
||||
}
|
||||
close COMMANDS;
|
||||
|
||||
@@ -1,352 +0,0 @@
|
||||
//
|
||||
// RenderTeamPage.cs - Renders an HTML page with team member information from an XML file
|
||||
//
|
||||
// Author: Duncan Mak ([email protected])
|
||||
//
|
||||
// (C) Copyright 2003, Ximian Inc.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
|
||||
class Write {
|
||||
|
||||
static Contributor [] list;
|
||||
static public XmlNamespaceManager nsmgr;
|
||||
|
||||
static void Main (string [] args)
|
||||
{
|
||||
if (args.Length != 2) {
|
||||
Console.WriteLine ("write.exe <input.xml> <output.html>");
|
||||
Environment.Exit (0);
|
||||
}
|
||||
|
||||
string input = args [0];
|
||||
string output = args [1];
|
||||
XmlDocument document = new XmlDocument ();
|
||||
document.Load (input);
|
||||
|
||||
nsmgr = new XmlNamespaceManager (document.NameTable);
|
||||
nsmgr.AddNamespace ("t", "http://go-mono.org/team.xsd");
|
||||
XmlNodeList contributors = document.SelectNodes ("/t:contributors/t:contributor", nsmgr);
|
||||
list = new Contributor [contributors.Count];
|
||||
|
||||
Page p = new Page ();
|
||||
|
||||
int count = 0;
|
||||
foreach (XmlNode n in contributors) {
|
||||
list [count] = new Contributor (n, p.Document);
|
||||
count ++;
|
||||
}
|
||||
|
||||
Array.Sort (list, new ContributorComparer ());
|
||||
|
||||
int length = list.Length % 2 == 0 ? list.Length : list.Length + 1;
|
||||
|
||||
int i = 0;
|
||||
while (i < length) {
|
||||
try {
|
||||
p.AddRow (list [i].RenderHtml (), list [i + 1].RenderHtml ());
|
||||
} catch (IndexOutOfRangeException) {
|
||||
p.AddRow (list [i].RenderHtml (), null);
|
||||
}
|
||||
i += 2;
|
||||
}
|
||||
|
||||
p.Write (output);
|
||||
}
|
||||
}
|
||||
|
||||
public class ContributorComparer : IComparer
|
||||
{
|
||||
public int Compare (object x, object y)
|
||||
{
|
||||
return String.Compare (x.ToString (), y.ToString ());
|
||||
}
|
||||
}
|
||||
|
||||
class Contributor {
|
||||
|
||||
public Name name;
|
||||
public string email;
|
||||
public string image;
|
||||
public string location;
|
||||
public string organization;
|
||||
public string description;
|
||||
public string[] tasks;
|
||||
|
||||
public XmlDocument document;
|
||||
|
||||
public Contributor (XmlNode node, XmlDocument document)
|
||||
{
|
||||
|
||||
name = GetName (node);
|
||||
image = GetImage (node);
|
||||
email = GetField (node, "t:e-mail");
|
||||
location = GetField (node, "t:location");
|
||||
organization = GetField (node, "t:organization");
|
||||
description = GetField (node, "t:description");
|
||||
tasks = GetTasks (node);
|
||||
|
||||
this.document = document;
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return name.ToString ();
|
||||
}
|
||||
|
||||
public static string GetImage (XmlNode node)
|
||||
{
|
||||
string result = GetField (node, "t:image");
|
||||
|
||||
if (result == String.Empty)
|
||||
return "none.png";
|
||||
|
||||
else
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string GetField (XmlNode node, string selector)
|
||||
{
|
||||
XmlNode result = node.SelectSingleNode (selector, Write.nsmgr);
|
||||
|
||||
if (result == null)
|
||||
return String.Empty;
|
||||
|
||||
return result.InnerText;
|
||||
}
|
||||
|
||||
public static Name GetName (XmlNode node)
|
||||
{
|
||||
string first_name = GetField (node, "t:name/t:first-name");
|
||||
string last_name = GetField (node, "t:name/t:last-name");
|
||||
|
||||
return new Name (first_name, last_name);
|
||||
}
|
||||
|
||||
public static string [] GetTasks (XmlNode node)
|
||||
{
|
||||
XmlNodeList nodes = node.SelectNodes ("t:tasks/t:task", Write.nsmgr);
|
||||
|
||||
string [] result = new string [nodes.Count];
|
||||
|
||||
int i = 0;
|
||||
foreach (XmlNode n in nodes) {
|
||||
result [i] = n.InnerText;
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public XmlElement RenderHtml ()
|
||||
{
|
||||
XmlElement root = document.CreateElement ("td");
|
||||
XmlElement table = document.CreateElement ("table");
|
||||
table.SetAttribute ("cellPadding", "0");
|
||||
table.SetAttribute ("border", "0");
|
||||
XmlElement tr = document.CreateElement ("tr");
|
||||
XmlElement td = document.CreateElement ("td");
|
||||
td.SetAttribute ("bgcolor", "#c3cda7");
|
||||
td.SetAttribute ("valign", "top");
|
||||
td.SetAttribute ("width", "1%");
|
||||
tr.AppendChild (td);
|
||||
table.AppendChild (tr);
|
||||
root.AppendChild (table);
|
||||
|
||||
XmlElement img = document.CreateElement ("img");
|
||||
img.SetAttribute ("align", "top");
|
||||
img.SetAttribute ("border", "0");
|
||||
img.SetAttribute ("height", "48");
|
||||
img.SetAttribute ("width", "48");
|
||||
img.SetAttribute ("src", "team/" + image);
|
||||
td.AppendChild (img);
|
||||
|
||||
td = document.CreateElement ("TD");
|
||||
td.SetAttribute ("bgcolor", "#c3cda7");
|
||||
td.SetAttribute ("valign", "bottom");
|
||||
td.SetAttribute ("width", "100%");
|
||||
tr.AppendChild (td);
|
||||
|
||||
td.AppendChild (name.ToXml (document));
|
||||
td.AppendChild (document.CreateElement ("br"));
|
||||
td.AppendChild (RenderEmail ());
|
||||
|
||||
tr = document.CreateElement ("tr");
|
||||
table.AppendChild (tr);
|
||||
td = document.CreateElement ("td");
|
||||
td.SetAttribute ("bgcolor", "#f5f8e4");
|
||||
td.SetAttribute ("valign", "top");
|
||||
tr.AppendChild (td);
|
||||
td.AppendChild (RenderLabel ("Location: "));
|
||||
|
||||
td = document.CreateElement ("td");
|
||||
td.SetAttribute ("bgcolor", "#f5f8e4");
|
||||
td.SetAttribute ("valign", "top");
|
||||
tr.AppendChild (td);
|
||||
td.AppendChild (document.CreateTextNode (location));
|
||||
|
||||
tr = document.CreateElement ("tr");
|
||||
table.AppendChild (tr);
|
||||
td = document.CreateElement ("td");
|
||||
td.SetAttribute ("bgcolor", "#f5f8e4");
|
||||
td.SetAttribute ("valign", "top");
|
||||
tr.AppendChild (td);
|
||||
td.AppendChild (RenderLabel ("Description: "));
|
||||
|
||||
td = document.CreateElement ("td");
|
||||
td.SetAttribute ("bgcolor", "#f5f8e4");
|
||||
td.SetAttribute ("valign", "top");
|
||||
tr.AppendChild (td);
|
||||
td.AppendChild (document.CreateTextNode (description));
|
||||
|
||||
tr = document.CreateElement ("tr");
|
||||
table.AppendChild (tr);
|
||||
td = document.CreateElement ("td");
|
||||
td.SetAttribute ("bgcolor", "#f5f8e4");
|
||||
td.SetAttribute ("valign", "top");
|
||||
tr.AppendChild (td);
|
||||
td.AppendChild (RenderLabel ("Tasks: "));
|
||||
|
||||
td = document.CreateElement ("td");
|
||||
td.SetAttribute ("bgcolor", "#f5f8e4");
|
||||
td.SetAttribute ("valign", "top");
|
||||
tr.AppendChild (td);
|
||||
td.AppendChild (RenderTasks ());
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
public XmlNode RenderTasks ()
|
||||
{
|
||||
|
||||
XmlElement element = document.CreateElement ("ol");
|
||||
element.SetAttribute ("type", "I");
|
||||
|
||||
foreach (string task in tasks) {
|
||||
XmlElement li = document.CreateElement ("li");
|
||||
li.AppendChild (document.CreateTextNode (task));
|
||||
element.AppendChild (li);
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
public XmlNode RenderEmail ()
|
||||
{
|
||||
XmlElement a = document.CreateElement ("a");
|
||||
a.SetAttribute ("href", "mailto:" + email);
|
||||
XmlElement font = document.CreateElement ("font");
|
||||
font.SetAttribute ("size", "3");
|
||||
XmlText t = document.CreateTextNode (email);
|
||||
a.AppendChild (font);
|
||||
font.AppendChild (t);
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
public XmlNode RenderLabel (string label)
|
||||
{
|
||||
string text = String.Format ("{0}: ", label);
|
||||
XmlElement element = document.CreateElement ("b");
|
||||
XmlText t = document.CreateTextNode (label );
|
||||
element.AppendChild (t);
|
||||
|
||||
return element;
|
||||
}
|
||||
}
|
||||
|
||||
class Page {
|
||||
|
||||
XmlDocument document;
|
||||
XmlElement tbody;
|
||||
|
||||
public Page ()
|
||||
{
|
||||
document = new XmlDocument ();
|
||||
|
||||
XmlElement table = document.CreateElement ("table");
|
||||
document.AppendChild (table);
|
||||
|
||||
tbody = document.CreateElement ("tbody");
|
||||
table.AppendChild (tbody);
|
||||
}
|
||||
|
||||
public XmlDocument Document {
|
||||
get { return document; }
|
||||
}
|
||||
|
||||
public void AddRow (XmlNode left, XmlNode right)
|
||||
{
|
||||
if (left == null && right == null)
|
||||
return;
|
||||
|
||||
XmlElement tr = document.CreateElement ("tr");
|
||||
tbody.AppendChild (tr);
|
||||
tr.AppendChild (left);
|
||||
|
||||
if (right == null)
|
||||
tr.AppendChild (document.CreateElement ("td"));
|
||||
else {
|
||||
tr.SetAttribute ("valign", "top");
|
||||
tr.AppendChild (right);
|
||||
}
|
||||
}
|
||||
|
||||
public void Write (TextWriter text_writer)
|
||||
{
|
||||
XmlTextWriter writer = new XmlTextWriter (text_writer);
|
||||
writer.Formatting = Formatting.Indented;
|
||||
|
||||
document.WriteContentTo (writer);
|
||||
|
||||
writer.Flush ();
|
||||
}
|
||||
|
||||
public void Write (string filename)
|
||||
{
|
||||
XmlTextWriter writer = new XmlTextWriter (filename, Encoding.Default);
|
||||
writer.Formatting = Formatting.Indented;
|
||||
|
||||
document.WriteContentTo (writer);
|
||||
writer.Flush ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Name {
|
||||
|
||||
string first_name;
|
||||
string last_name;
|
||||
|
||||
public Name (string a, string b)
|
||||
{
|
||||
this.first_name = a;
|
||||
this.last_name = b;
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
if (first_name == null && last_name == null)
|
||||
return String.Empty;
|
||||
|
||||
return first_name + " " + last_name;
|
||||
}
|
||||
|
||||
public XmlNode ToXml (XmlDocument document)
|
||||
{
|
||||
XmlElement element = document.CreateElement ("font");
|
||||
element.SetAttribute ("size", "3");
|
||||
XmlElement b = document.CreateElement ("B");
|
||||
XmlText t = document.CreateTextNode (ToString ());
|
||||
b.AppendChild (t);
|
||||
element.AppendChild (b);
|
||||
|
||||
return element;
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||
<xs:schema id="contributors" targetNamespace="http://go-mono.org/team.xsd" xmlns="http://go-mono.org/team.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="contributor">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="first-name" type="xs:string" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="last-name" type="xs:string" minOccurs="0" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="e-mail" type="xs:string" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="image" type="xs:string" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="location" type="xs:string" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="organization" type="xs:string" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="tasks" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="task" type="xs:string" nillable="true" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
@@ -2,13 +2,12 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>#TITLE#</title>
|
||||
<link rel="icon" href="../MonoIcon.png" type="image/png">
|
||||
<!-- background-image: url("images/bgsquares.gif"); -->
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body { font-family: "trebuchet ms", lucida, verdana, helvetica;
|
||||
|
||||
}
|
||||
background-attachment: fixed; }
|
||||
body, td, table { font-family: "trebuchet ms", lucida, verdana, helvetica;
|
||||
font-size: 14px; }
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.Xml.Xsl;
|
||||
|
||||
namespace Transform
|
||||
{
|
||||
class Transform
|
||||
{
|
||||
public static void Main (string [] rgstrArgs)
|
||||
{
|
||||
XmlDocument xml = new XmlDocument ();
|
||||
xml.Load (rgstrArgs [0]);
|
||||
|
||||
XslTransform xsl = new XslTransform ();
|
||||
xsl.Load (rgstrArgs [1]);
|
||||
|
||||
xsl.Transform (xml, null, Console.Out);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,66 +1,20 @@
|
||||
* System.Windows.Forms
|
||||
|
||||
Currently Windows.Forms support is not finished.
|
||||
|
||||
The System.Windows.Forms effort is taking two paths:
|
||||
|
||||
<ul>
|
||||
<li>Win32/Wine-based: This effort will use the Win32
|
||||
API, and use a stub program to run the with Wine.
|
||||
This allows applications that use P/Invoke to
|
||||
function, and event delivery through the Wndproc
|
||||
method to work for the most advanced and custom
|
||||
applications. This is the path of best compatibility.
|
||||
|
||||
Also, work on a Gtk-based rendered for Wine will be
|
||||
done, to make the user interface integrate with your
|
||||
desktop look.
|
||||
|
||||
<li>Gtk# based: This effort will build a subset of
|
||||
Windows.Forms that uses Gtk#. This gives a better
|
||||
integration with the desktop, but will not be
|
||||
completely compatible with the Windows edition. In
|
||||
particular code that uses P/Invoke to call into Win32
|
||||
or overwrite the Wndproc method to achieve special
|
||||
effects will not work.
|
||||
</ul>
|
||||
|
||||
* Win32/Wine edition.
|
||||
|
||||
Currently (May 21st, 2003) to get the Windows.Forms support
|
||||
working, you need a Mono installation from CVS, and you need
|
||||
to install Wine plus the <a
|
||||
href="http://www.openlinksw.com">OpenLink patch</a>, and
|
||||
define the environment variable "SWF" (export SWF=1 from your
|
||||
shell).
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
System.Windows.Forms is currently being implemented using the
|
||||
Win32 API, we will be using <a
|
||||
href="http://www.winehq.com">WineLib</a> on Unix systems to
|
||||
emulate the Win32 API.
|
||||
|
||||
This means that those who want to contribute to the effort can
|
||||
develop and test classes today using Windows and P/Invoke
|
||||
calls to Win32 and we will then just run the result on Unix.
|
||||
|
||||
Although the original plans were to use Gtk on X and Cocoa on
|
||||
MacOS X, it would be very hard to emulate the event model in
|
||||
which some Winforms applications depend, and it would be very
|
||||
hard to implement the Wndproc method.
|
||||
|
||||
In terms of integrating visually with the desktop, we are
|
||||
hoping to contribute to the Wine project an mechanism to make
|
||||
it use the Gtk+ themes on X11 and Cocoa on MacOS to render the
|
||||
widgets, and get the native look and feel on each of these
|
||||
platforms.
|
||||
</td>
|
||||
<td>
|
||||
<a href="images/WINESWF.JPG"><img src="images/WINESWF-mini.JPG"></a>
|
||||
</td>
|
||||
|
||||
</table>
|
||||
|
||||
* Gtk# based
|
||||
|
||||
The code is contained in CVS.
|
||||
|
||||
There are no current plans to support embedded devices, but
|
||||
Gtk/FrameBuffer is an option. If you have suggestions or
|
||||
@@ -69,23 +23,10 @@
|
||||
|
||||
* Contributing
|
||||
|
||||
The Winforms effort is being coordinated in the <a
|
||||
href="mailto:[email protected]:.com">[email protected]</a>.
|
||||
If you are interested in helping out with this effort,
|
||||
subscribe to it by sending an email message to <a
|
||||
href="mailto:[email protected]:.com">[email protected]</a>.
|
||||
|
||||
If you want to help, you can start by writing a control and
|
||||
testing it with Windows today (or you can also try to build
|
||||
the existing library on Linux, but this is a bit more
|
||||
complicated).
|
||||
|
||||
See the file mcs/class/System.Windows.Forms/CheckOutList for
|
||||
details on who is working on which class.
|
||||
|
||||
Please read the README document in the
|
||||
System.Windows.Forms/WINElib directory for details about how
|
||||
to build the Windows.Forms support for Mono.
|
||||
The Winforms effort is being coordinated by <a
|
||||
href="mailto:[email protected]">Dennis Hayes</a>. If you are
|
||||
interested in helping out with this effort, get in touch with
|
||||
him.
|
||||
|
||||
* System.Drawing
|
||||
|
||||
@@ -130,7 +71,6 @@
|
||||
|
||||
* Directory Layout
|
||||
|
||||
<pre>
|
||||
System.Drawing (assembly directory)
|
||||
System.Drawing.Blah
|
||||
Common code for "Blah"
|
||||
@@ -145,7 +85,6 @@
|
||||
WineLIB
|
||||
System.Drawing.Blah
|
||||
Win32 ports of "System.Drawing.Blah"
|
||||
</pre>
|
||||
|
||||
Notice that there is a proof of concept Gtk-backend for
|
||||
Windows.Forms, but nobody is working on it, and for the
|
||||
@@ -157,11 +96,3 @@
|
||||
can accept either libart-like rendering operations and
|
||||
X11-like rendering operations. This complicates matters, but
|
||||
I am not sure. Someone needs to investigate this.
|
||||
|
||||
* Historical
|
||||
|
||||
Although the original plans were to use Gtk on X and Cocoa on
|
||||
MacOS X, it would be very hard to emulate the event model in
|
||||
which some Winforms applications depend, and it would be very
|
||||
hard to implement the Wndproc method.
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
Mono Ahead Of Time Compiler
|
||||
===========================
|
||||
|
||||
The new mono JIT has sophisticated optimization features. It uses SSA and has a
|
||||
pluggable architecture for further optimizations. This makes it possible and
|
||||
efficient to use the JIT also for AOT compilation.
|
||||
|
||||
|
||||
* file format: We use the native object format of the platform. That way it is
|
||||
possible to reuse existing tools like objdump and the dynamic loader. All we
|
||||
need is a working assembler, i.e. we write out a text file which is then
|
||||
passed to gas (the gnu assembler) to generate the object file.
|
||||
|
||||
* file names: we simply add ".so" to the generated file. For example:
|
||||
basic.exe -> basic.exe.so
|
||||
corlib.dll -> corlib.dll.so
|
||||
|
||||
* staring the AOT compiler: mini --aot assembly_name
|
||||
|
||||
The following things are saved in the object file:
|
||||
|
||||
* version infos:
|
||||
|
||||
* native code: this is labeled with method_XXXXXXXX: where XXXXXXXX is the
|
||||
hexadecimal token number of the method.
|
||||
|
||||
* additional informations needed by the runtime: For example we need to store
|
||||
the code length and the exception tables. We also need a way to patch
|
||||
constants only available at runtime (for example vtable and class
|
||||
addresses). This is stored i a binary blob labeled method_info_XXXXXXXX:
|
||||
|
||||
PROBLEMS:
|
||||
|
||||
- all precompiled methods must be domain independent, or we add patch infos to
|
||||
patch the target doamin.
|
||||
|
||||
- the main problem is how to patch runtime related addresses, for example:
|
||||
|
||||
- current application domain
|
||||
- string objects loaded with LDSTR
|
||||
- address of MonoClass data
|
||||
- static field offsets
|
||||
- method addreses
|
||||
- virtual function and interface slots
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
MonoAssembly *assembly;
|
||||
|
||||
assembly = mono_domain_assembly_open (domain, "file.dll");
|
||||
assembly = mono_domain_assembly_open ("file.dll");
|
||||
if (!assembly)
|
||||
error ();
|
||||
|
||||
@@ -80,12 +80,6 @@
|
||||
|
||||
mono_jit_cleanup (domain);
|
||||
|
||||
** Applications that use threads.
|
||||
|
||||
The Boehm GC system needs to catch your calls to the pthreads
|
||||
layer, so in each file where you use pthread.h you should
|
||||
include the <gc/gc.h> file.
|
||||
|
||||
* Exposing C code to the CIL universe
|
||||
|
||||
The Mono runtime provides two mechanisms to expose C code to
|
||||
@@ -225,15 +219,6 @@
|
||||
It may not be possible to manage exceptions in that case,
|
||||
though. I need to think more about it.
|
||||
|
||||
** Threading issues
|
||||
|
||||
If your application creates threads on its own, and you want them to
|
||||
be able to call code into the CIL universe with Mono, you have to
|
||||
register the thread with Mono before issuing the call.
|
||||
|
||||
To do so, call the mono_thread_attach() function before you execute
|
||||
any managed code from the thread
|
||||
|
||||
* Samples
|
||||
|
||||
See the sample programs inmono/sample/embed for examples of
|
||||
|
||||
@@ -56,54 +56,15 @@ leave: is simply translated into a branch to the target. If the leave
|
||||
instruction is inside a finally block (but not inside another handler)
|
||||
we call the finally handler before we branch to the target.
|
||||
|
||||
finally/endfinally, filter/endfilter: is translated into subroutine ending with
|
||||
a "return" statement. The subroutine does not save EBP, because we need access
|
||||
to the local variables of the enclosing method. Its is possible that
|
||||
instructions inside those handlers modify the stack pointer, thus we save the
|
||||
stack pointer at the start of the handler, and restore it at the end. We have
|
||||
to use a "call" instruction to execute such finally handlers. This makes it
|
||||
also possible to execute them inside the stack unwinding code. The exception
|
||||
object for filters is passed in a local variable (cfg->exvar).
|
||||
finally/endfinally: is translated into subroutine ending with a "return"
|
||||
statement. The subroutine does not save EBP/ESP, because we need access to the
|
||||
local variables of the enclosing method. We have to use a "call"
|
||||
instruction to execute such finally handlers. This makes it possible to
|
||||
execute them inside the stack unwinding code.
|
||||
|
||||
throw: we first save all regs into a sigcontext struct and then call the stack
|
||||
unwinding code.
|
||||
throw: we first save all regs into a sigcontext struct (we pass the
|
||||
exception object in register ECX), and then call the stack unwinding
|
||||
code.
|
||||
|
||||
catch handler: catch hanlders are always called from the stack unwinding
|
||||
code. The exception object is passed in a local variable (cfg->exvar).
|
||||
|
||||
gcc support for Exceptions
|
||||
==========================
|
||||
|
||||
gcc supports exceptions in files compiled with the -fexception option. gcc
|
||||
generates DWARF exceptions tables in that case, so it is possible to unwind the
|
||||
stack. The method to read those exception tables is contained in libgcc.a, and
|
||||
in newer versions of glibc (glibc 2.2.5 for example), and it is called
|
||||
__frame_state_for(). Another usable glibc function is backtrace_symbols() which
|
||||
returns the function name corresponding to a code address.
|
||||
|
||||
We dynamically check if those features are available using g_module_symbol(),
|
||||
and we use them only when available. If not available we use the LMF as
|
||||
fallback.
|
||||
|
||||
Using gcc exception information prevents us from saving the LMF at each native
|
||||
call, so this is a way to speed up native calls. This is especially valuable
|
||||
for internal calls, because we can make sure that all internal calls are
|
||||
compiled with -fexceptions (we compile the whole mono runtime with that
|
||||
option).
|
||||
|
||||
All native function are able to call function without exception tables, and so
|
||||
we are unable to restore all caller saved registers if an exception is raised
|
||||
in such function. Well, its possible if the previous function already saves all
|
||||
registers. So we only omit the the LMF if a function has an exception table
|
||||
able to restore all caller saved registers.
|
||||
|
||||
One problem is that gcc almost never saves all caller saved registers, because
|
||||
it is just unnecessary in normal situations. But there is a trick forcing gcc
|
||||
to save all register, we just need to call __builtin_unwind_init() at the
|
||||
beginning of a function. That way gcc generates code to save all caller saved
|
||||
register on the stack.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
catch handler: receives the exception object in ECX. They store that
|
||||
object into a local variable, so that rethrow can access the object.
|
||||
@@ -1,208 +0,0 @@
|
||||
|
||||
* Proposal for the local register allocator
|
||||
|
||||
The local register allocator deals with allocating registers
|
||||
for temporaries inside a single basic block, while the global
|
||||
register allocator is concerned with method-wide allocation of
|
||||
variables.
|
||||
The global register allocator uses callee-saved register for it's
|
||||
purpouse so that there is no need to save and restore these registers
|
||||
at call sites.
|
||||
|
||||
There are a number of issues the local allocator needs to deal with:
|
||||
*) some instructions expect operands in specific registers (for example
|
||||
the shl instruction on x86, or the call instruction with thiscall
|
||||
convention, or the equivalent call instructions on other architectures,
|
||||
such as the need to put output registers in %oX on sparc)
|
||||
*) some instructions deliver results only in specific registers (for example
|
||||
the div instruction on x86, or the call instructionson on almost all
|
||||
the architectures).
|
||||
*) it needs to know what registers may be clobbered by an instruction
|
||||
(such as in a method call)
|
||||
*) it should avoid excessive reloads or stores to improve performance
|
||||
|
||||
While which specific instructions have limitations is architecture-dependent,
|
||||
the problem shold be solved in an arch-independent way to reduce code duplication.
|
||||
The register allocator will be 'driven' by the arch-dependent code, but it's
|
||||
implementation should be arch-independent.
|
||||
|
||||
To improve the current local register allocator, we need to
|
||||
keep more state in it than the current setup that only keeps busy/free info.
|
||||
|
||||
Possible state information is:
|
||||
|
||||
free: the resgister is free to use and it doesn't contain useful info
|
||||
freeable: the register contains data loaded from a local (there is
|
||||
also info about _which_ local it contains) as a result from previous
|
||||
instructions (like, there was a store from the register to the local)
|
||||
moveable: it contains live data that is needed in a following instruction, but
|
||||
the contents may be moved to a different register
|
||||
busy: the register contains live data and it is placed there because
|
||||
the following instructions need it exactly in that register
|
||||
allocated: the register is used by the global allocator
|
||||
|
||||
The local register allocator will have the following interfaces:
|
||||
|
||||
int get_register ();
|
||||
Searches for a register in the free state. If it doesn't find it,
|
||||
searches for a freeable register. Sets the status to moveable.
|
||||
Looking for a 'free' register before a freeable one should allow for
|
||||
removing a few redundant loads (though I'm still unsure if such
|
||||
things should be delegated entirely to the peephole pass).
|
||||
|
||||
int get_register_force (int reg);
|
||||
Returns 'reg' if it is free or freeable. If it is moveable, it moves it
|
||||
to another free or freeable register.
|
||||
Sets the status of 'reg' to busy.
|
||||
|
||||
void set_register_freeable (int reg);
|
||||
Sets the status of 'reg' to freeable.
|
||||
|
||||
void set_register_free (int reg);
|
||||
Sets the status of 'reg' to free.
|
||||
|
||||
void will_clobber (int reg);
|
||||
Spills the register to the stack. Sets the status to freeable.
|
||||
After the clobbering has occurred, set the status to free.
|
||||
|
||||
void register_unspill (int reg);
|
||||
Un-spills register reg and sets the status to moveable.
|
||||
|
||||
FIXME: how is the 'local' information represented? Maybe a MonoInst* pointer.
|
||||
|
||||
Note: the register allocator will insert instructions in the basic block
|
||||
during it's operation.
|
||||
|
||||
* Examples
|
||||
|
||||
Given the tree (on x86 the right argument to shl needs to be in ecx):
|
||||
|
||||
store (local1, shl (local1, call (some_arg)))
|
||||
|
||||
At the start of the basic block, the registers are set to the free state.
|
||||
The sequence of instructions may be:
|
||||
instruction register status -> [%eax %ecx %edx]
|
||||
start free free free
|
||||
eax = load local1 mov free free
|
||||
/* call clobbers eax, ecx, edx */
|
||||
spill eax free free free
|
||||
call mov free free
|
||||
/* now eax contains the right operand of the shl */
|
||||
mov %eax -> %ecx free busy free
|
||||
un-spill mov busy free
|
||||
shl %cl, %eax mov free free
|
||||
|
||||
The resulting x86 code is:
|
||||
mov $fffc(%ebp), %eax
|
||||
mov %eax, $fff0(%ebp)
|
||||
push some_arg
|
||||
call func
|
||||
mov %eax, %ecx
|
||||
mov $fff0(%ebp), %eax
|
||||
shl %cl, %eax
|
||||
|
||||
Note that since shl could operate directly on memory, we could have:
|
||||
|
||||
push some_arg
|
||||
call func
|
||||
mov %eax, %ecx
|
||||
shl %cl, $fffc(%ebp)
|
||||
|
||||
The above example with loading the operand in a register is just to complicate
|
||||
the example and show that the algorithm should be able to handle it.
|
||||
|
||||
Let's take another example with the this-call call convention (the first argument
|
||||
is passed in %ecx).
|
||||
In this case, will_clobber() will be called only on %eax and %edx, while %ecx
|
||||
will be allocated with get_register_force ().
|
||||
Note: when a register is allocated with get_register_force(), it should be set
|
||||
to a different state as soon as possible.
|
||||
|
||||
store (local1, shl (local1, this-call (local1)))
|
||||
|
||||
instruction register status -> [%eax %ecx %edx]
|
||||
start free free free
|
||||
eax = load local1 mov free free
|
||||
/* force load in %ecx */
|
||||
ecx = load local1 mov busy free
|
||||
spill eax free busy free
|
||||
call mov free free
|
||||
/* now eax contains the right operand of the shl */
|
||||
mov %eax -> %ecx free busy free
|
||||
un-spill mov busy free
|
||||
shl %cl, %eax mov free free
|
||||
|
||||
What happens when a register that we need to allocate with get_register_force ()
|
||||
contains an operand for the next instruction?
|
||||
|
||||
instruction register status -> [%eax %ecx %edx]
|
||||
eax = load local0 mov free free
|
||||
ecx = load local1 mov mov free
|
||||
get_register_force (ecx) here.
|
||||
We have two options:
|
||||
mov %ecx, %edx
|
||||
or:
|
||||
spill %ecx
|
||||
The first option is way better (and allows the peephole pass to
|
||||
just load the value in %edx directly, instead of loading first to %ecx).
|
||||
This doesn't work, though, if the instruction clobbers the %edx register
|
||||
(like in a this-call). So, we first need to clobber the registers
|
||||
(so the state of %ecx changes to freebale and there is no issue
|
||||
with get_register_force ()).
|
||||
What if an instruction both clobbers a register and requires it as
|
||||
an operand? Lets' take the x86 idiv instruction as an example: it
|
||||
requires the dividend in edx:eax and returns the result in eax,
|
||||
with the modulus in edx.
|
||||
|
||||
store (local1, div (local1, local2))
|
||||
|
||||
instruction register status -> [%eax %ecx %edx]
|
||||
eax = load local0 mov free free
|
||||
will_clobber eax, edx free mov free
|
||||
force mov %ecx, %eax busy free free
|
||||
set %edx busy free busy
|
||||
idiv mov free free
|
||||
|
||||
Note: edx is set to free after idiv, because the modulus is not needed
|
||||
(if it was a rem, eax would have been freed).
|
||||
If we load the divisor before will_clobber(), we'll have to spill
|
||||
eax and reload it later. If we load it just after the idiv, there is no issue.
|
||||
In any case, the algorithm should give the correct results and allow the operation.
|
||||
|
||||
Working recursively on the isntructions there shouldn't be huge issues
|
||||
with this algorithm (though, of course, it's not optimal and it may
|
||||
introduce excessive spills or register moves). The advantage over the current
|
||||
local reg allocator is that:
|
||||
1) the number of spills/moves would be smaller anyway
|
||||
2) a separate peephole pass could be able to eliminate reg moves
|
||||
3) we'll be able to remove the 'forced' spills we currently do with
|
||||
the return value of method calls
|
||||
|
||||
* Issues
|
||||
|
||||
How to best integrate such a reg allocator with the burg stuff.
|
||||
|
||||
Think about a call os sparc with two arguments: they got into %o0 and %o1
|
||||
and each of them sets the register as busy. But what if the values to put there
|
||||
are themselves the result of a call? %o0 is no problem, but for all the
|
||||
next argument n the above algorithm would spill all the 0...n-1 registers...
|
||||
|
||||
* Papers
|
||||
|
||||
More complex solutions to the local register allocator problem:
|
||||
http://dimacs.rutgers.edu/TechnicalReports/abstracts/1997/97-33.html
|
||||
|
||||
Combining register allocation and instruction scheduling:
|
||||
http://citeseer.nj.nec.com/motwani95combining.html
|
||||
|
||||
More on LRA euristics:
|
||||
http://citeseer.nj.nec.com/liberatore97hardness.html
|
||||
|
||||
Linear-time optimal code scheduling for delayedload architectures
|
||||
http://www.cs.wisc.edu/~fischer/cs701.f01/inst.sched.ps.gz
|
||||
|
||||
Precise Register Allocation for Irregular Architectures
|
||||
http://citeseer.nj.nec.com/kong98precise.html
|
||||
|
||||
Allocate registers first to subtrees that need more of them.
|
||||
http://www.upb.de/cs/ag-kastens/compii/folien/comment401-409.2.pdf
|
||||
@@ -1,653 +0,0 @@
|
||||
|
||||
A new JIT compiler for the Mono Project
|
||||
|
||||
Miguel de Icaza (miguel@{ximian.com,gnome.org}),
|
||||
|
||||
|
||||
* Abstract
|
||||
|
||||
Mini is a new compilation engine for the Mono runtime. The
|
||||
new engine is designed to bring new code generation
|
||||
optimizations, portability and pre-compilation.
|
||||
|
||||
In this document we describe the design decisions and the
|
||||
architecture of the new compilation engine.
|
||||
|
||||
* Introduction
|
||||
|
||||
Mono is a Open Source implementation of the .NET Framework: it
|
||||
is made up of a runtime engine that implements the ECMA Common
|
||||
Language Infrastructure (CLI), a set of compilers that target
|
||||
the CLI and a large collection of class libraries.
|
||||
|
||||
This article discusses the new code generation facilities that
|
||||
have been added to the Mono runtime.
|
||||
|
||||
First we discuss the overall architecture of the Mono runtime,
|
||||
and how code generation fits into it; Then we discuss the
|
||||
development and basic architecture of our first JIT compiler
|
||||
for the ECMA CIL framework. The next section covers the
|
||||
objectives for the work on the new JIT compiler, then we
|
||||
discuss the new features available in the new JIT compiler,
|
||||
and finally a technical description of the new code generation
|
||||
engine.
|
||||
|
||||
* Architecture of the Mono Runtime
|
||||
|
||||
The Mono runtime is an implementation of the ECMA Common
|
||||
Language Infrastructure (CLI), whose aim is to be a common
|
||||
platform for executing code in multiple languages.
|
||||
|
||||
Languages that target the CLI generate images that contain
|
||||
code in high-level intermediate representation called the
|
||||
"Common Intermediate Language". This intermediate language is
|
||||
rich enough to allow for programs and pre-compiled libraries
|
||||
to be reflected. The execution environment allows for an
|
||||
object oriented execution environment with single inheritance
|
||||
and multiple interface implementations.
|
||||
|
||||
This runtime provides a number of services for programs that
|
||||
are targeted to it: Just-in-Time compilation of CIL code into
|
||||
native code, garbage collection, thread management, I/O
|
||||
routines, single, double and decimal floating point,
|
||||
asynchronous method invocation, application domains, and a
|
||||
framework for building arbitrary RPC systems (remoting) and
|
||||
integration with system libraries through the Platform Invoke
|
||||
functionality.
|
||||
|
||||
The focus of this document is on the services provided by the
|
||||
Mono runtime to transform CIL bytecodes into code that is
|
||||
native to the underlying architecture.
|
||||
|
||||
The code generation interface is a set of macros that allow a
|
||||
C programmer to generate code on the fly, this is done
|
||||
through a set of macros found in the mono/jit/arch/ directory.
|
||||
These macros are used by the JIT compiler to generate native
|
||||
code.
|
||||
|
||||
The platform invocation code is interesting, as it generates
|
||||
CIL code on the fly to marshal parameters, and then this
|
||||
code is in turned processed by the JIT engine.
|
||||
|
||||
* Previous Experiences
|
||||
|
||||
Mono has built a JIT engine, which has been used to bootstrap
|
||||
Mono since January, 2002. This JIT engine has reasonable
|
||||
performance, and uses an tree pattern matching instruction
|
||||
selector based on the BURS technology. This JIT compiler was
|
||||
designed by Dietmar Maurer, Paolo Molaro and Miguel de Icaza.
|
||||
|
||||
The existing JIT compiler has three phases:
|
||||
|
||||
* Re-creation of the semantic tree from CIL
|
||||
byte-codes.
|
||||
|
||||
* Instruction selection, with a cost-driven
|
||||
engine.
|
||||
|
||||
* Code generation and register allocation.
|
||||
|
||||
It is also hooked into the rest of the runtime to provide
|
||||
services like marshaling, just-in-time compilation and
|
||||
invocation of "internal calls".
|
||||
|
||||
This engine constructed a collection of trees, which we
|
||||
referred to as the "forest of trees", this forest is created by
|
||||
"hydrating" the CIL instruction stream.
|
||||
|
||||
The first step was to identify the basic blocks on the method,
|
||||
and computing the control flow graph (cfg) for it. Once this
|
||||
information was computed, a stack analysis on each basic block
|
||||
was performed to create a forest of trees for each one of
|
||||
them.
|
||||
|
||||
So for example, the following statement:
|
||||
|
||||
int a, b;
|
||||
...
|
||||
b = a + 1;
|
||||
|
||||
Which would be represented in CIL as:
|
||||
|
||||
ldloc.0
|
||||
ldc.i4.1
|
||||
add
|
||||
stloc.1
|
||||
|
||||
After the stack analysis would create the following tree:
|
||||
|
||||
(STIND_I4 ADDR_L[EBX|2] (
|
||||
ADD (LDIND_I4 ADDR_L[ESI|1])
|
||||
CONST_I4[1]))
|
||||
|
||||
This tree contains information from the stack analysis: for
|
||||
instance, notice that the operations explicitly encode the
|
||||
data types they are operating on, there is no longer an
|
||||
ambiguity on the types, because this information has been
|
||||
inferred.
|
||||
|
||||
At this point the JIT would pass the constructed forest of
|
||||
trees to the architecture-dependent JIT compiler.
|
||||
|
||||
The architecture dependent code then performed register
|
||||
allocation (optionally using linear scan allocation for
|
||||
variables, based on life analysis).
|
||||
|
||||
Once variables had been assigned, a tree pattern matching with
|
||||
dynamic programming is used (the tree pattern matcher is
|
||||
custom build for each architecture, using a code
|
||||
generator: monoburg). The instruction selector used cost
|
||||
functions to select the best instruction patterns.
|
||||
|
||||
The instruction selector is able to produce instructions that
|
||||
take advantage of the x86 instruction indexing instructions
|
||||
for example.
|
||||
|
||||
One problem though is that the code emitter and the register
|
||||
allocator did not have any visibility outside the current
|
||||
tree, which meant that some redundant instructions were
|
||||
generated. A peephole optimizer with this architecture was
|
||||
hard to write, given the tree-based representation that is
|
||||
used.
|
||||
|
||||
This JIT was functional, but it did not provide a good
|
||||
architecture to base future optimizations on. Also the
|
||||
line between architecture neutral and architecture
|
||||
specific code and optimizations was hard to draw.
|
||||
|
||||
The JIT engine supported two code generation modes to support
|
||||
the two optimization modes for applications that host multiple
|
||||
application domains: generate code that will be shared across
|
||||
application domains, or generate code that will not be shared
|
||||
across application domains.
|
||||
|
||||
* Objectives of the new JIT engine.
|
||||
|
||||
We wanted to support a number of features that were missing:
|
||||
|
||||
* Ahead-of-time compilation.
|
||||
|
||||
The idea is to allow developers to pre-compile their code
|
||||
to native code to reduce startup time, and the working
|
||||
set that is used at runtime in the just-in-time compiler.
|
||||
|
||||
Although in Mono this has not been a visible problem, we
|
||||
wanted to pro-actively address this problem.
|
||||
|
||||
When an assembly (a Mono/.NET executable) is installed in
|
||||
the system, it would then be possible to pre-compile the
|
||||
code, and have the JIT compiler tune the generated code
|
||||
to the particular CPU on which the software is
|
||||
installed.
|
||||
|
||||
This is done in the Microsoft.NET world with a tool
|
||||
called ngen.exe
|
||||
|
||||
* Have a good platform for doing code optimizations.
|
||||
|
||||
The design called for a good architecture that would
|
||||
enable various levels of optimizations: some
|
||||
optimizations are better performed on high-level
|
||||
intermediate representations, some on medium-level and
|
||||
some at low-level representations.
|
||||
|
||||
Also it should be possible to conditionally turn these on
|
||||
or off. Some optimizations are too expensive to be used
|
||||
in just-in-time compilation scenarios, but these
|
||||
expensive optimizations can be turned on for
|
||||
ahead-of-time compilations or when using profile-guided
|
||||
optimizations on a subset of the executed methods.
|
||||
|
||||
* Reduce the effort required to port the Mono code
|
||||
generator to new architectures.
|
||||
|
||||
For Mono to gain wide adoption in the Unix world, it is
|
||||
necessary that the JIT engine works in most of today's
|
||||
commercial hardware platforms.
|
||||
|
||||
* Features of the new JIT engine.
|
||||
|
||||
The new JIT engine was architected by Dietmar Maurer and Paolo
|
||||
Molaro, based on the new objectives.
|
||||
|
||||
Mono provides a number of services to applications running
|
||||
with the new JIT compiler:
|
||||
|
||||
* Just-in-Time compilation of CLI code into native code.
|
||||
|
||||
* Ahead-of-Time compilation of CLI code, to reduce
|
||||
startup time of applications.
|
||||
|
||||
A number of software development features are also available:
|
||||
|
||||
* Execution time profiling (--profile)
|
||||
|
||||
Generates a report of the times consumed by routines,
|
||||
as well as the invocation times, as well as the
|
||||
callers.
|
||||
|
||||
* Memory usage profiling (--profile)
|
||||
|
||||
Generates a report of the memory usage by a program
|
||||
that is ran under the Mono JIT.
|
||||
|
||||
* Code coverage (--coverage)
|
||||
|
||||
* Execution tracing.
|
||||
|
||||
People who are interested in developing and improving the Mini
|
||||
JIT compiler will also find a few useful routines:
|
||||
|
||||
* Compilation times
|
||||
|
||||
This is used to time the execution time for the JIT
|
||||
when compiling a routine.
|
||||
|
||||
* Control Flow Graph and Dominator Tree drawing.
|
||||
|
||||
These are visual aids for the JIT developer: they
|
||||
render representations of the Control Flow graph, and
|
||||
for the more advanced optimizations, they draw the
|
||||
dominator tree graph.
|
||||
|
||||
This requires Dot (from the graphwiz package) and Ghostview.
|
||||
|
||||
* Code generator regression tests.
|
||||
|
||||
The engine contains support for running regression
|
||||
tests on the virtual machine, which is very helpful to
|
||||
developers interested in improving the engine.
|
||||
|
||||
* Optimization benchmark framework.
|
||||
|
||||
The JIT engine will generate graphs that compare
|
||||
various benchmarks embedded in an assembly, and run the
|
||||
various tests with different optimization flags.
|
||||
|
||||
This requires Perl, GD::Graph.
|
||||
|
||||
* Flexibility
|
||||
|
||||
This is probably the most important component of the new code
|
||||
generation engine. The internals are relatively easy to
|
||||
replace and update, even large passes can be replaced and
|
||||
implemented differently.
|
||||
|
||||
* New code generator
|
||||
|
||||
Compiling a method begins with the `mini_method_to_ir' routine
|
||||
that converts the CIL representation into a medium
|
||||
intermediate representation.
|
||||
|
||||
The mini_method_to_ir routine performs a number of operations:
|
||||
|
||||
* Flow analysis and control flow graph computation.
|
||||
|
||||
Unlike the previous version, stack analysis and control
|
||||
flow graphs are computed in a single pass in the
|
||||
mini_method_to_ir function, this is done for performance
|
||||
reasons: although the complexity increases, the benefit
|
||||
for a JIT compiler is that there is more time available
|
||||
for performing other optimizations.
|
||||
|
||||
* Basic block computation.
|
||||
|
||||
mini_method_to_ir populates the MonoCompile structure
|
||||
with an array of basic blocks each of which contains
|
||||
forest of trees made up of MonoInst structures.
|
||||
|
||||
* Inlining
|
||||
|
||||
Inlining is no longer restricted to methods containing
|
||||
one single basic block, instead it is possible to inline
|
||||
arbitrary complex methods.
|
||||
|
||||
The heuristics to choose what to inline are likely going
|
||||
to be tuned in the future.
|
||||
|
||||
* Method to opcode conversion.
|
||||
|
||||
Some method call invocations like `call Math.Sin' are
|
||||
transformed into an opcode: this transforms the call
|
||||
into a semantically rich node, which is later inline
|
||||
into an FPU instruction.
|
||||
|
||||
Various Array methods invocations are turned into
|
||||
opcodes as well (The Get, Set and Address methods)
|
||||
|
||||
* Tail recursion elimination
|
||||
|
||||
Basic blocks ****
|
||||
|
||||
The MonoInst structure holds the actual decoded instruction,
|
||||
with the semantic information from the stack analysis.
|
||||
MonoInst is interesting because initially it is part of a tree
|
||||
structure, here is a sample of the same tree with the new JIT
|
||||
engine:
|
||||
|
||||
(stind.i4 regoffset[0xffffffd4(%ebp)]
|
||||
(add (ldind.i4 regoffset[0xffffffd8(%ebp)])
|
||||
iconst[1]))
|
||||
|
||||
This is a medium-level intermediate representation (MIR).
|
||||
|
||||
Some complex opcodes are decomposed at this stage into a
|
||||
collection of simpler opcodes. Not every complex opcode is
|
||||
decomposed at this stage, as we need to preserve the semantic
|
||||
information during various optimization phases.
|
||||
|
||||
For example a NEWARR opcode carries the length and the type of
|
||||
the array that could be used later to avoid type checking or
|
||||
array bounds check.
|
||||
|
||||
There are a number of operations supported on this
|
||||
representation:
|
||||
|
||||
* Branch optimizations.
|
||||
|
||||
* Variable liveness.
|
||||
|
||||
* Loop optimizations: the dominator trees are
|
||||
computed, loops are detected, and their nesting
|
||||
level computed.
|
||||
|
||||
* Conversion of the method into static single assignment
|
||||
form (SSA form).
|
||||
|
||||
* Dead code elimination.
|
||||
|
||||
* Constant propagation.
|
||||
|
||||
* Copy propagation.
|
||||
|
||||
* Constant folding.
|
||||
|
||||
Once the above optimizations are optionally performed, a
|
||||
decomposition phase is used to turn some complex opcodes into
|
||||
internal method calls. In the initial version of the JIT
|
||||
engine, various operations on longs are emulated instead of
|
||||
being inlined. Also the newarr invocation is turned into a
|
||||
call to the runtime.
|
||||
|
||||
At this point, after computing variable liveness, it is
|
||||
possible to use the linear scan algorithm for allocating
|
||||
variables to registers. The linear scan pass uses the
|
||||
information that was previously gathered by the loop nesting
|
||||
and loop structure computation to favor variables in inner
|
||||
loops.
|
||||
|
||||
Stack space is then reserved for the local variables and any
|
||||
temporary variables generated during the various
|
||||
optimizations.
|
||||
|
||||
** Instruction selection
|
||||
|
||||
At this point, the BURS instruction selector is invoked to
|
||||
transform the tree-based representation into a list of
|
||||
instructions. This is done using a tree pattern matcher that
|
||||
is generated for the architecture using the `monoburg' tool.
|
||||
|
||||
Monoburg takes as input a file that describes tree patterns,
|
||||
which are matched against the trees that were produced by the
|
||||
engine in the previous stages.
|
||||
|
||||
The pattern matching might have more than one match for a
|
||||
particular tree. In this case, the match selected is the one
|
||||
whose cost is the smallest. A cost can be attached to each
|
||||
rule, and if no cost is provided, the implicit cost is one.
|
||||
Smaller costs are selected over higher costs.
|
||||
|
||||
The cost function can be used to select particular blocks of
|
||||
code for a given architecture, or by using a prohibitive high
|
||||
number to avoid having the rule match.
|
||||
|
||||
The various rules that our JIT engine uses transform a tree of
|
||||
MonoInsts into a list of monoinsts:
|
||||
|
||||
+-----------------------------------------------------------+
|
||||
| Tree List |
|
||||
| of ===> Instruction selection ===> of |
|
||||
| MonoInst MonoInst. |
|
||||
+-----------------------------------------------------------+
|
||||
|
||||
During this process various "types" of MonoInst kinds
|
||||
disappear and turned into lower-level representations. The
|
||||
JIT compiler just happens to reuse the same structure (this is
|
||||
done to reduce memory usage and improve memory locality).
|
||||
|
||||
The instruction selection rules are split in a number of
|
||||
files, each one with a particular purpose:
|
||||
|
||||
inssel.brg
|
||||
Contains the generic instruction selection
|
||||
patterns.
|
||||
|
||||
inssel-x86.brg
|
||||
Contains x86 specific rules.
|
||||
|
||||
inssel-ppc.brg
|
||||
Contains PowerPC specific rules.
|
||||
|
||||
inssel-long32.brg
|
||||
burg file for 64bit instructions on 32bit architectures.
|
||||
|
||||
inssel-long.brg
|
||||
burg file for 64bit architectures.
|
||||
|
||||
inssel-float.brg
|
||||
burg file for floating point instructions
|
||||
|
||||
For a given build, a set of those files would be included.
|
||||
For example, for the build of Mono on the x86, the following
|
||||
set is used:
|
||||
|
||||
inssel.brg inssel-x86.brg inssel-long32.brg inssel-float.brg
|
||||
|
||||
** Native method generation
|
||||
|
||||
The native method generation has a number of steps:
|
||||
|
||||
* Architecture specific register allocation.
|
||||
|
||||
The information about loop nesting that was
|
||||
previously gathered is used here to hint the
|
||||
register allocator.
|
||||
|
||||
* Generating the method prolog/epilog.
|
||||
|
||||
* Optionally generate code to introduce tracing facilities.
|
||||
|
||||
* Hooking into the debugger.
|
||||
|
||||
* Performing any pending fixups.
|
||||
|
||||
* Code generation.
|
||||
|
||||
*** Code Generation
|
||||
|
||||
The actual code generation is contained in the architecture
|
||||
specific portion of the compiler. The input to the code
|
||||
generator is each one of the basic blocks with its list of
|
||||
instructions that were produced in the instruction selection
|
||||
phase.
|
||||
|
||||
During the instruction selection phase, virtual registers are
|
||||
assigned. Just before the peephole optimization is performed,
|
||||
physical registers are assigned.
|
||||
|
||||
A simple peephole and algebraic optimizer is ran at this
|
||||
stage.
|
||||
|
||||
The peephole optimizer removes some redundant operations at
|
||||
this point. This is possible because the code generation at
|
||||
this point has visibility into the basic block that spans the
|
||||
original trees.
|
||||
|
||||
The algebraic optimizer performs some simple algebraic
|
||||
optimizations that replace expensive operations with cheaper
|
||||
operations if possible.
|
||||
|
||||
The rest of the code generation is fairly simple: a switch
|
||||
statement is used to generate code for each of the MonoInsts
|
||||
|
||||
We always try to allocate code in sequence, instead of just using
|
||||
malloc. This way we increase spatial locality which gives a massive
|
||||
speedup on most architectures.
|
||||
|
||||
*** Ahead of Time compilation
|
||||
|
||||
Ahead-of-Time compilation is a new feature of our new
|
||||
compilation engine. The compilation engine is shared by the
|
||||
Just-in-Time (JIT) compiler and the Ahead-of-Time compiler
|
||||
(AOT).
|
||||
|
||||
The difference is on the set of optimizations that are turned
|
||||
on for each mode: Just-in-Time compilation should be as fast
|
||||
as possible, while Ahead-of-Time compilation can take as long
|
||||
as required, because this is not done at a time critical
|
||||
time.
|
||||
|
||||
With AOT compilation, we can afford to turn all of the
|
||||
computationally expensive optimizations on.
|
||||
|
||||
After the code generation phase is done, the code and any
|
||||
required fixup information is saved into a file that is
|
||||
readable by "as" (the native assembler available on all
|
||||
systems). This assembly file is then passed to the native
|
||||
assembler, which generates a loadable module.
|
||||
|
||||
At execution time, when an assembly is loaded from the disk,
|
||||
the runtime engine will probe for the existence of a
|
||||
pre-compiled image. If the pre-compiled image exists, then it
|
||||
is loaded, and the method invocations are resolved to the code
|
||||
contained in the loaded module.
|
||||
|
||||
The code generated under the AOT scenario is slightly
|
||||
different than the JIT scenario. It generates code that is
|
||||
application-domain relative and that can be shared among
|
||||
multiple thread.
|
||||
|
||||
This is the same code generation that is used when the runtime
|
||||
is instructed to maximize code sharing on a multi-application
|
||||
domain scenario.
|
||||
|
||||
* SSA-based optimizations
|
||||
|
||||
SSA form simplifies many optimization because each variable
|
||||
has exactly one definition site. This means that each
|
||||
variable is only initialized once.
|
||||
|
||||
For example, code like this:
|
||||
|
||||
a = 1
|
||||
..
|
||||
a = 2
|
||||
call (a)
|
||||
|
||||
Is internally turned into:
|
||||
|
||||
a1 = 1
|
||||
..
|
||||
a2 = 2
|
||||
call (a2)
|
||||
|
||||
In the presence of branches, like:
|
||||
|
||||
if (x)
|
||||
a = 1
|
||||
else
|
||||
a = 2
|
||||
|
||||
call (a)
|
||||
|
||||
The code is turned into:
|
||||
|
||||
if (x)
|
||||
a1 = 1;
|
||||
else
|
||||
a2 = 2;
|
||||
a3 = phi (a1, a2)
|
||||
call (a3)
|
||||
|
||||
All uses of a variable are "dominated" by its definition
|
||||
|
||||
This representation is useful as it simplifies the
|
||||
implementation of a number of optimizations like conditional
|
||||
constant propagation, array bounds check removal and dead code
|
||||
elimination.
|
||||
|
||||
* Register allocation.
|
||||
|
||||
Global register allocation is performed on the medium
|
||||
intermediate representation just before instruction selection
|
||||
is performed on the method. Local register allocation is
|
||||
later performed at the basic-block level on the
|
||||
|
||||
Global register allocation uses the following input:
|
||||
|
||||
1) set of register-sized variables that can be allocated to a
|
||||
register (this is an architecture specific setting, for x86
|
||||
these registers are the callee saved register ESI, EDI and
|
||||
EBX).
|
||||
|
||||
2) liveness information for the variables
|
||||
|
||||
3) (optionally) loop info to favor variables that are used in
|
||||
inner loops.
|
||||
|
||||
During instruction selection phase, symbolic registers are
|
||||
assigned to temporary values in expressions.
|
||||
|
||||
Local register allocation assigns hard registers to the
|
||||
symbolic registers, and it is performed just before the code
|
||||
is actually emitted and is performed at the basic block level.
|
||||
A CPU description file describes the input registers, output
|
||||
registers, fixed registers and clobbered registers by each
|
||||
operation.
|
||||
|
||||
* BURG Code Generator Generator
|
||||
|
||||
monoburg was written by Dietmar Maurer. It is based on the
|
||||
papers from Christopher W. Fraser, Robert R. Henry and Todd
|
||||
A. Proebsting: "BURG - Fast Optimal Instruction Selection and
|
||||
Tree Parsing" and "Engineering a Simple, Efficient Code
|
||||
Generator Generator".
|
||||
|
||||
The original BURG implementation is unable to work on DAGs, instead only
|
||||
trees are allowed. Our monoburg implementations is able to generate tree
|
||||
matcher which works on DAGs, and we use this feature in the new
|
||||
JIT. This simplifies the code because we can directly pass DAGs and
|
||||
don't need to convert them to trees.
|
||||
|
||||
* Future
|
||||
|
||||
Profile-based optimization is something that we are very
|
||||
interested in supporting. There are two possible usage
|
||||
scenarios:
|
||||
|
||||
* Based on the profile information gathered during
|
||||
the execution of a program, hot methods can be compiled
|
||||
with the highest level of optimizations, while bootstrap
|
||||
code and cold methods can be compiled with the least set
|
||||
of optimizations and placed in a discardable list.
|
||||
|
||||
* Code reordering: this profile-based optimization would
|
||||
only make sense for pre-compiled code. The profile
|
||||
information is used to re-order the assembly code on disk
|
||||
so that the code is placed on the disk in a way that
|
||||
increments locality.
|
||||
|
||||
This is the same principle under which SGI's cord program
|
||||
works.
|
||||
|
||||
The nature of the CIL allows the above optimizations to be
|
||||
easy to implement and deploy. Since we live and define our
|
||||
universe for these things, there are no interactions with
|
||||
system tools required, nor upgrades on the underlying
|
||||
infrastructure required.
|
||||
|
||||
Instruction scheduling is important for certain kinds of
|
||||
processors, and some of the framework exists today in our
|
||||
register allocator and the instruction selector to cope with
|
||||
this, but has not been finished. The instruction selection
|
||||
would happen at the same time as local register allocation.
|
||||