Re: [Mono-dev] [PATCH] Add mixed-mode assembly support on Windows

2008-04-19 Thread Kornél Pál

Hi,

I finished implementing coree functions required for loading images without 
mono.exe.


The previously described issues remained however so I still need some help.

This contribution is licensed under MIT X11.

Also attached a minimalistic mscoree.dll implementation that I used for 
testing this patch. Note that Visual Studio has to be started with the 
original mscoree.dll and has to be temporarily replaced with this 
implementation while debugging.


Kornél

- Original Message - 
From: "Kornél Pál" <[EMAIL PROTECTED]>

To: 
Cc: "Miguel de Icaza" <[EMAIL PROTECTED]>
Sent: Friday, April 18, 2008 12:04 PM
Subject: [PATCH] Add mixed-mode assembly support on Windows



Hi,

I have attached my proposed patch.

I need some help to finish mono_marshal_get_vtfixup_ftnptr. It should
generate a wrapper method based on the method token.
types:
VTFIXUP_TYPE_FROM_UNMANAGED: unmanaged-to-managed wrapper (otherwise
managed-to-managed)
VTFIXUP_TYPE_CALL_MOST_DERIVED: callvirt (otherwise call)
VTFIXUP_TYPE_RETAIN_APPDOMAIN: not important yet

I would like to implement mono_marshal_get_vtfixup_ftnptr but I don't know
where should I cache these methods and how can I obtain a marshaler
wrapper
without using delegates.

Also note that I was unable to build the patch using gcc:
/mono/mono/mono/metadata/domain.c:1172: undefined reference to
[EMAIL PROTECTED]'
/mono/mono/mono/metadata/domain.c:1217: undefined reference to
[EMAIL PROTECTED]'

And I have no idea why it builds with MSVC and not with gcc.

_CorDllMain and _CorExeMain is not finished yet but is only required for
Wine support so I didn't include them in the patch yet. They will call
runtime initialization code. MonoFixupCorEE is intended to be called from
Wine's mscoree.dll as well.

Kornél

- Original Message - 
From: "Miguel de Icaza" <[EMAIL PROTECTED]>

To: <[EMAIL PROTECTED]>
Cc: 
Sent: Thursday, April 17, 2008 7:47 PM
Subject: Re: [Mono-dev] Mono on wine redux


Wow.

Well, that was fast.   Congrats Kornel!

-Original Message-
From: Kornél Pál <[EMAIL PROTECTED]>
Cc:  
To: Miguel de Icaza <[EMAIL PROTECTED]>

Sent: 4/17/2008 3:17:24 AM
Subject: Re: [Mono-dev] Mono on wine redux

Hi,


From: "Miguel de Icaza" <[EMAIL PROTECTED]>

But what percent of .net apps are pure?  If that fraction is small,
as I suspect it is, then for Mono to really rock the world, it's going
to have to tackle impure apps, too.  That is of course incredibly
difficult,
and would require considerable cooperation between the Mono and Wine
projects.


It is very hard to run into a mixed-mode assembly in the wild;   They do
happen, but they are rare.   I can only think of three projects that had
needed them in the history of Mono.


I've done some work on this. And actually I managed to run mixed-mode
assemblies.

Note that it is only possible on Windows because native code is usually
platform (arch and OS as well) dependent.

I implemented support for loading image files using LoadLibrary so that
the
NT loader will take care of the image patching. I also had to patch the
in-memory image of mscoree.dll so that export address table point to
functions in mono.dll that is required for LoadLibrary support. This also
will enable Wine (and Windows is someone is willing to replace or modify
his
on-disk mscoree.dll image) to execute managed images using CreateProcess
without creating a mono.exe child process. This was the hardest part.

IJW thunks (managed-to-native) are really P/Invoke methods with function
RVA
stored in method body RVA so it was very easy to implement, I only had to
remove code preventing IJW from work.

V-table fixups (native-to-managed) are not difficult either but requires
it's own wrapper methods so my current implementation probably will need
improvements.

Note that this still will not make Mono able to use MSVCRT because that
uses
unmanaged API of .NET Framework that isn't implemented by Mono.

I am stilll working on a cleaned-up patch but will send to the list soon.

Kornél



Index: mono/libgc/win32_threads.c
===
--- mono/libgc/win32_threads.c  (revision 101197)
+++ mono/libgc/win32_threads.c  (working copy)
@@ -385,10 +385,10 @@
#   define PUSH4(r1,r2,r3,r4) PUSH2(r1,r2), PUSH2(r3,r4)
#   if defined(I386)
  PUSH4(Edi,Esi,Ebx,Edx), PUSH2(Ecx,Eax), PUSH1(Ebp);
- sp = (ptr_t)context.Esp;
-#  elif defined(X86_64)
- PUSH4(Rax,Rcx,Rdx,Rbx); PUSH2(Rbp, Rsi); PUSH1(Rdi);
- PUSH4(R8, R9, R10, R11); PUSH4(R12, R13, R14, R15);
+ sp = (ptr_t)context.Esp;
+#  elif defined(X86_64)
+ PUSH4(Rax,Rcx,Rdx,Rbx); PUSH2(Rbp, Rsi); PUSH1(Rdi);
+ PUSH4(R8, R9, R10, R11); PUSH4(R12, R13, R14, R15);
  sp = (ptr_t)context.Rsp;
#   elif defined(ARM32)
  PUSH4(R0,R1,R2,R3),PUSH4(R4,R5,R6,R7),PUSH4(R8,R9,R10,R11),PUSH1(R12);
@@ -782,10 +782,13 @@
 * Pontus Rydin suggests wrapping the thread start routine instead.
 */
#i

Re: [Mono-dev] [Mono-list] Same way for linux library as windows library

2008-04-19 Thread Geoff Norton

Miguel answered your email and asked you to attach a strace:

http://lists.ximian.com/pipermail/mono-devel-list/2008-April/027541.html

-g

On 16-Apr-08, at 11:59 AM, StApostol wrote:

I sent an email on the very same topic a few days ago, but it seems  
it never arrived :/



What if the project is a class library? There's no startup script in  
that case, unless you move that burden to the consumers of your  
library (which is not really nice or developer friendly).


Up to Mono 1.2.6, you could place a dll.config file in the ~/.mono/ 
assemblies/[App name] directory, which was a valid workaround for  
this: your application could create the necessary dll.config file at  
runtime, which would point to the correct library (environment or  
override). Sadly this no longer works in Mono 1.9 (why?)




On 4/16/08, Robert Jordan <[EMAIL PROTECTED]> wrote:
Petit Eric wrote:
>
> as we know under windows, a app try to find library, first in the  
same

> dir as the executable, if there isn't it try to shearch them in
> windows and system32 (environment).
>
> So my question is, can we have the same way under linux :
> - official library in the environment (/lib, /usr/lib ..)
> - "Unofficial" library in the same dir as the executable of my app


http://www.mono-project.com/Guidelines:Application_Deployment

Search for LD_LIBRARY_PATH.


Robert


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] MonoDevelop 0.18 giving Exceptions on Ubuntu 7.10

2008-04-19 Thread Metallica

Hello,
I get following Exceptions on running MonoDevelop on Ubuntu 7.10

MonoDevelop failed to start. The following error has been reported:
Extension node not found in path: /MonoDevelop/Ide/Commands.

System.InvalidOperationException: Extension node not found in path:
/MonoDevelop/Ide/Commands
  at Mono.Addins.ExtensionContext.AddExtensionNodeHandler (System.String
path, Mono.Addins.ExtensionNodeEventHandler handler) [0x0] 
  at Mono.Addins.AddinManager.AddExtensionNodeHandler (System.String path,
Mono.Addins.ExtensionNodeEventHandler handler) [0x0] 
  at MonoDevelop.Components.Commands.CommandManager.LoadCommands
(System.String addinPath) [0x0] 
  at MonoDevelop.Ide.Gui.IdeApp.Initialize (IProgressMonitor monitor)
[0x0] 
  at MonoDevelop.Ide.Gui.IdeStartup.Run (System.String[] args) [0x0] 

And i have installed mono 1.2.6 on my system.Please help me to get the
monodevelop running.:confused:

-- 
View this message in context: 
http://www.nabble.com/MonoDevelop-0.18-giving-Exceptions-on-Ubuntu-7.10-tp16783204p16783204.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [Mono-list] Pash - cross platform PowerShell is out in the wild!Announcement.

2008-04-19 Thread Danny Waite
Fantastic! I've been waiting for this for a long while now. Great work Igor, 
I'll be playing around with this at the weekend.  I think this project has lots 
of mileage. 


From: Igor Moochnick 
Sent: Monday, April 07, 2008 4:23 PM
To: mono-devel-list@lists.ximian.com ; [EMAIL PROTECTED] 
Subject: [Mono-list] Pash - cross platform PowerShell is out in the 
wild!Announcement.


Pash - http://pash.sourceforge.net/

PowerShell open source cross-platform reimplementation.


About the name
Pash = PoSH (PowerShell) + bash (one of the Unix shells)


Goals
The main goal is to provide a rich shell environment for other operating 
systems as well as to provide a hostable scripting engine for rich 
applications. The user experience should be seamless for people who are used to 
Windows version of PowerShell. The scrips, cmdlets and providers should runs 
AS-IS (if they are not using Windows-specific functionality). The rich 
applications that host PowerShell should run on any other operating system 
AS-IS. Secondary goal: the scripts should run across the machines and different 
OS's seamlesly (but following all the security guidelines).


Environment
The current implementation of Pash is written using pure .Net 2.0. It compiles 
on VS 2008 as well as on Mono. So all the developers can choose the environment 
that fits their needs and preferences. The produced assemblies can be executed 
"right out of the box" on Windows, Linux, Mac (or others) without any 
additional recompilation. Note: for Windows Mobile and Windows CE the produced 
code should be recompiled against the .NET Compact Framework.


Progress
You're welcome to get the source code and contribute to the Pash public effort 
@ http://sourceforge.net/projects/pash. 

~50% of public PowerShell classes defined. 

~40% of framework functionality operational. 












___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list
<>___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono on Solaris 10

2008-04-19 Thread PCM Reddy
I also tried to compile on SPARC platform there is an error related to 
mce.exe
Also I see core dump during compilation.  By the way I tried with gnu 
toolkit to compile.


I am still looking for SPARC version of mono 1.2.6 or better.

Thanks,
-PCM

Cetin Sert wrote:
There is also a binary package for Solaris 10/x86 here 
http://corsis.blogspot.com/search/label/mono%2Fsolaris


Best Regards,
Cetin Sert

2008/4/15 Oliver Schweitzer <[EMAIL PROTECTED] 
>:


Hello PCM, Steve,

I inquired into the state of Solaris Sparc a few weeks ago (also
because of a show stopping  bug), and got the following reply from
this list/MdI:


Begin forwarded message:

From: Miguel de Icaza <[EMAIL PROTECTED]
>
Date: 7. April 2008 17:55:58 MESZ
To: Oliver Schweitzer <[EMAIL PROTECTED]
>
Cc: mono-devel-list@lists.ximian.com

Subject: Re: [Mono-dev] Solaris Sparc packaging

Hello,

I have the requirement for a medium sized C# 2.0
project to run under
Solaris 10 Sparc64. I was able to install the latest
available Solaris
8/Sparc package mono-1.2.4_4.sunos8.novell.sparc.pkg ,
and it
basically works. I encountered, however,  a show
stopping bug in 1.2.4
under Solaris
 (https://bugzilla.novell.com/show_bug.cgi?id=323524 &
320405 or related to those), that kills my current
project as a Mono
app.


The bug 320405 has been flagged as "NEEDINFO", I do not
know who set
that flag, but could you please augment that bug with the
information
and a test case that is failing for you on Solaris so we
can double
check this?

Is there a more recent Solaris 8/Sparc package
available, 1.2.6 or
(gasp) 1.9? And if not, are there any plans regarding
those? Is it
hard to package myself (provided I have access to a
Solaris Sparc
development environment)?


Am looking into why we no longer build for SPARC, maybe
our build
machine died.



Just fyi,

Best regards,

Oliver


On 14.04.2008, at 20:11, PCM Reddy wrote:

Thanks for the pointers. But I am looking for Mono 1.2.6
Solaris SPARC
binaries. Link below has x86 binaries.

I also checked Mono official site It has only 1.2.4_4 for
Solaris SPARC.

Thanks,
-PCM


Andreas Färber wrote:

Hi,

Am 14.04.2008 um 19:10 schrieb Steve Bjorg:

How can I get access to the 1.9 bits for Solaris 8?  I
didn't see a
link for it on the page below.  Thanks.


http://www.blastwave.org/testing/

Didn't try it myself, I just saw it on the "news and info"
button
there while looking up the link.

Andreas

On Apr 14, 2008, at 9:46 AM, Andreas Färber wrote:


Am 14.04.2008 um 18:00 schrieb Steve Bjorg:

Is there a Mono package for Solaris 10?


Novell has a 1.2.4 package for Solaris 8 sparc,
which should work on
Solaris 10 as well.
http://www.go-mono.com/mono-downloads/download.html

Blastwave has 1.1.13, and it seems Jonel has
recently posted 1.9 for
Solaris 8 x86 in testing.
http://www.blastwave.org/packages.php/mono

The official source tarballs should compile okay
on Solaris 10.
http://www.mono-project.com/Mono:Solaris

Andreas



___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com

http://lists.ximian.com/mailman/listinfo/mono-devel-list



___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com

http://lists.ximian.com/mailman/listinfo/mono-devel-list




___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Is it currently possible to achieve this in Moonlight?

2008-04-19 Thread Joe Sheil
Hi Moonlight community,

Im planning to do a simple video editing application and ive been looking at
using VLC perhaps, but i think its going to be tough... then i looked at the
possibility to use silverlight, big problem that there is no
savefiledialog... so im considering moonlight. i basically need the
following features :-

i. to open a file on the FileSystem( what video files does moonlight
support? WMV and ffmpeg? )
ii. play back that file through the software
iii. slow down play back, bonus: reverse and speed it up by n-times
iv. seek, forward and backward.
v. cut sections of the file( ie crop a file... maybe a 1 minute movie but u
want only 10 seconds)
vi. save the cropped clip to the FileSystem

im no expert on moonlight, and to be honest i hardly know anything at all
about it maybe you can be of some guidance to me??

kind regards
joe
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list