[Mono-devel-list] The first (attempt to checkin) managed collation patch

Atsushi Eno atsushi at ximian.com
Sun Jul 24 12:47:19 EDT 2005


>>>It can be done in two ways: embed the files in the mono binary like we do
>>>with the char tables or load the files from where mscorlib was loaded.
>>>Both are trivial to implement.
>>For now I took the latter approach. That means however we need some
>>love on the build system.
> I personally like the idea of having this data on the dll files
> themselves more, you can embed the resources with -resource and then get
> the same IntPtr without adding a new icall like this:
> int size;
> Module module;
> IntPtr data = GetManifestResourceInternal (name, out size, out module);

Then, the latest managed-collation.patch in Mono.Globalization.Unicode
already works like that. It casts Stream (returned from
Assembly.GetManifestStream()) to IntPtrStream (renamed as
UnmanagedMemoryStream in the patch though).

Actually if we avoid putting those resource files other than
mcs/class/corlib directory, the build hack is anyways required,
since csc won't work when those resource files are put under
certain directory (like we had to replace '/' to '\\' for *.cs

Well, if we consider using .NET 2.0 csc to build 2.0 profile
under cygwin in the future, that problem will anyways happen
for a bunch of ASP.NET 2.0 resources. So it might be time
to call Hari Potter :-)

Atsushi Eno

More information about the Mono-devel-list mailing list