Expose COM object to an application running in Wine/Linux - linux

Only one Windows application is troubling me before I can fully move to Linux. It's a stock charting application (couldn't find any decent one native to Linux) that I'm running using Wine.
This application has its own language and it allows the user to create objects from COM components to implement external functions. In Windows, I created a program using Mono that exposes certain functions that allow me to interact with the charting software.
Example:
myObj = CreateObject("myApp.application");
myObj.data = Price;
volatility = myObj.Volatility;
Question: How could I expose the ComVisible components of "myApp" which is running in the Linux environment under Mono runtime to the charting software running in Wine?

Unfortunately, mono and wine have no particular integration, and so you can't directly invoke Wine-hosted code in Mono.
One option would be to use Microsoft's .NET 2.0 framework in Wine. Only up to 2.0 is supported well. This may or may not be a violation of the .NET license.
Another option would be to write a custom proxy using winelib that runs in wine, but listens on a unix domain socket for commands from your mono program.
Another option would be to write the (rather complex) code needed to get mono to talk to wine over DCOM. This would be rather difficult, but would benefit anyone down the line who wants to get COM objects working in mono.

You should be able to install the Windows version of Mono under Wine and run your code in that.

Related

Does Nodejs have any framework/lib that support creating winform?

I was wondering is there an lib to help us create winform in GUI programming for Windows operating system.
Take a look at edge
Run .NET and Node.js code in-process on Windows, MacOS, and Linux
Additionally, have a look at this SO post
Can I use javascript to make the equivalent of Windows Form Applications?

Can I use Visual Studio to develop Mono applications?

I have developed a .NET 4.5 application using WinForms. I want my application to run not only on Windows, but also on Linux, so I decided to port it to Mono.
However, I can't find any information on how to use Visual Studio for Mono. I don't want to switch to MonoDevelop, since VS provides much of the functionality I want and I am already familiar with it.
There apparently used to be something called Mono Tools for Visual Studio, which David Lively insists works on current VS editions, but I don't want to run an extension that was deprecated 3 years ago. I don't even know where to download the extension - it redirects to Xamarin, and Xamarin seems like not what I want because while it mentions VS integration, it forces me to install a bunch of Android and Java SDKs (why?).
As far as I can see, .NET and Mono code looks fairly similar, and there are 3 main concerns:
Making VS use the Mono compiler instead of the C# compiler, so I can tell if non-Windows users can compile my source, and also get notified about missing libraries
Making IntelliSense suggest only Mono-supported things
Making the "Run" command run the application using Mono, not .NET, so I can test it correctly
Is there really no easy way of accomplishing these?
Note: I want to develop Windows and Linux desktop apps, with a WinForms GUI or equivalent only. I am not interested in mobile.
In general, you can just target .NET 4.5 and compile with Visual Studio and the resulting assembly works as-is on Mono (assuming you don't use platform-specific stuff via p/invoke, etc).
Mono's WinForms support isn't perfect though (and nobody actively works on it), so you still need to test by running the app directly on Mono. Missing APIs aren't usually the problem, it's more that the Mono implementation has different behavior/bugs.
Another alternative to WinForms might be Xwt.

Is there a cross platform desktop framework that would utilize native libraries such at .NET and Cocoa?

I am starting a project that is heavily graphics related (think, paint app with layers).
Anyway, I have a long history in C#, Java, JavaScript and Ruby. This application will be open source.
But what I'm looking for is a "build once, use everywhere" framework. Most of the platforms I've looked into either seem to be far too outdated, too complicated, or just not a right fit.
I've looked into Swing, WindowBuilder, wxRuby, etc. So many choices and none seem modern enough, have good documentation, etc.
I was a C# desktop developer for years so if I were targeting Windows only, I would go that route easily. But I want my app to run on Macs too. But, I would like the Mac version to look like it was designed for a Mac and the Windows version designed for Windows, etc. I'm looking at the Mono Project currently. But the idea of my Mac users installing Mono doesn't appeal to me.
Anything Ruby based would be cool but not required.
Anyway, what are some recommendations? I use NetBeans, Eclipse and Visual Studio. So I'm not concerned with learning new IDE's if I had to. I even thought about doing it all in JavaScript and using the canvas but since I need to work with large, local binary files, I didn't know if that would be a good option.
Thanks for any suggestions.
Real Studio can create cross-platform desktop apps for OS X, Windows and Linux. It can also create Cocoa apps and you can use it to interface with Cocoa directly when needed.
However, Real Studio creates Win32 apps, not .NET apps so you cannot directly interface with .NET libraries.

How to run C# 4.0 app on Linux OS using mono?

I want to run my c# application with OS Linux using Mono. I am new to this cross platform migration? Please tell the procedure for doing that?
Thanks & Regards.
It very much depends on what type of application it is. For a console or WinForms app, it may be simple. Mono doesn't support WPF.
Well, the first think you'll need to do is install Mono of course. Then you probably want to run MoMA to determine your application's compatibility. There's a whole separate page about porting WinForms apps.
If all is well, you should just be able to run your application using:
mono MyApplication.exe
after copying the binaries over.
If your application is actually a web service or web application, you'll want to think about the various hosting options.
I suspect you'll want to read a lot of the pages on the Mono Start Page.
Check if your application is 100% compatible with Mono Framework using MoMA.
Remove or replace those unimplemented parts with Mono's implementation or third party libraries that works with Mono. Or if you think it should work fine, just execute it with Mono Framework 2.8 or higher. Better go with 2.10 which is default's profile is on 4.0.
There is an IDE, MonoDevelop that supports Web and Desktop applications. Open the project files (monodevelop supports visual studio project files) from monodevelop, compile and run.
you can browse mono website here, where you can find which features are supported and which are not supported and why.

linux tooling for starting as a net programmer

What are the linux developper tools to do the things i do with .NET in my windows environnement :
I would like to port my client server application that runs under winform/nhibernate/sql server.
Language c#
Database SQL server
ORM Nhibernate
Source control SVN / Tortoise
Unit testing Nunit
Continuous integration Cruise Control
Should i go java and eclipse ?
Python and ???
Ruby and ???
Is there some IDE that allow me to manage all these processes under linux ?
Well, if you already have some .NET background, I would suggest Mono (with its IDE MonoDevelop).
Your port of your WinForms/NHIBERNATE/SQLSERVER solutions should be easier.
Here is a document that should get you started with porting WinForms apps to Mono. NHibernate runs well on Mono. And you can keep your SQLServer, unless you need to change that too, in which case, you can try Oracle Express, MySQL or PostgreSQL.
SVN runs very well on Linux.
So does NUnit (in Mono).
Going to a different language is a possibility. But if you have a lot of experience on .NET, you might want to take advantage of that.
Try MonoDevelop or SharpDevelop.
MonoDevelop is an IDE that integrates with Mono (.NET implementation for *nix). I've heard of NHibernate running under mono, but haven't tried it. I'd imagine this would have the smallest learning curve, since you'd be able to keep a majority of your current code.
edit: modified because MonoDevelop is the linux fork of SharpDevelop, which is only for windows.

Resources