Plasma Explorer on Mono

Announcements and discussion regarding the open source tools Plasma# tool set and PRP Explorer (Legacy)

Plasma Explorer on Mono

Postby Branan » Sat Jul 05, 2008 2:30 am

I've run Plasma Explorer through the Mono Migration Assistant. All in all it looks pretty good.

I'm already planning on moving any DirectX code to OpenGL, so that leaves the two custom winforms-based widgets (controls in .NET terminology, right?). Those widgets/controls p/invoke into Windows DLLs. If the source is available, I might be able to fix them to work on purely managed code (might be a bit slower). Otherwise controls with the same functionality will need to be found/written entirely in managed code before Plasma Explorer runs fully cross-platform.

Plasma Explorer.exe and Plasma.dll actually have no issues - it's all in the third-party controls. Congratulations on writing good code, Hoikas :D

The full log from my MoMA analysis is here
Image
Your friendly neighborhood shard admin
User avatar
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR

Re: Plasma Explorer on Mono

Postby Christian Walther » Sat Jul 05, 2008 3:25 am

If you permit me a pointless post of "thumbs up":
Sounds cool! 8-) I haven't even researched into what the various Plasma/PRP tools are yet, as they seemed Windows-only. But if they can be made to run on Mac OS X, I'll be sure to do that. (In fact, I wasn't aware of anything called Plasma Explorer. All I've heard of is PRP Explorer and PlasmaShop.)
Christian Walther
 
Posts: 436
Joined: Sun Jun 08, 2008 3:10 am
Location: Switzerland

Re: Plasma Explorer on Mono

Postby Branan » Sat Jul 05, 2008 3:28 am

Plasma Explorer is brand new - there's a sticky in the Plasma# forum section announcing it.
Image
Your friendly neighborhood shard admin
User avatar
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR

Re: Plasma Explorer on Mono

Postby Christian Walther » Sat Jul 05, 2008 9:10 am

Yep, that's what I get for posting before having read the whole forum... :roll:
Christian Walther
 
Posts: 436
Joined: Sun Jun 08, 2008 3:10 am
Location: Switzerland

Re: Plasma Explorer on Mono

Postby Tsar Hoikas » Sat Jul 05, 2008 12:56 pm

ROTFL

I did try to keep Mono in mind when I wrote Plasma.dll although I (obviously) wasn't very concerned with it in Plasma Explorer itself. So, let's see... I did try to use open source components where possible. I'll explain what each of them do...

DXFramework.dll
This is the "Sample Framework" used by SlimDX in its Samples... Hoikas was very lazy, so he based the (somewhat flawed) object rendering code off of it... Getting rid of this would be handled in chucking out DirectX

WeifenLuo.WinFormsUI.Docking.dll
This is the "docking" component that manages the windows inside the application. Each "window" that opens in the application can be docked on the left/right/top/bottom or float like a tool menu. This component is somewhat buggy ... try resizing some of the editors and watch the anchors go insane. I wouldn't be sad to see these bugs fixed and for Mono compatibility to come. Here is the project's SF.NET page.

Be.Windows.Forms.HexBox.dll
Is the control that builds the current hex editor. The hex editor form I have in Plasma Explorer isn't very useful nor does it use this component heavily. I could probably rip this out myself and use the BitConverter. FWIW, the project page can be found here.

There are still some SlimDX reliant components in Plasma.dll and Plasma Explorer itself, namely, the Mipmap code... Which I recently made a minor adjustment to... I'll finish up some of my minor tweaks and commit them to the repository. I don't know when that will happen though as I need to make sure the other project in the repository doesn't cause the compile to fail.
Image
User avatar
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 1908
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Plasma Explorer on Mono

Postby Branan » Sat Jul 05, 2008 7:42 pm

Be.Windows.Forms.HexBox.dll I should be able to fix - those calls should be easy to re-map to manged code. WeifenLuo.WinForumsUI.Docking.dll is another matter. Its code is tied pretty tightly to the Windows API, and I'm really not sure exactly what some of that native code is doing. As far as I can tell, there is no other open-source docking code. That means either refactoring the design to work with another UI paradigm.

hmmm.... just how much of the actual code is in Plasma.dll? If enough of it is there, it may be possible to write a separate GTK# based UI in parallel to your WinForms one. Only as a last resort if there's no way to get rid of those p/invokes, though.
Image
Your friendly neighborhood shard admin
User avatar
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR

Re: Plasma Explorer on Mono

Postby Tsar Hoikas » Sat Jul 05, 2008 7:45 pm

Plasma.dll is just the Plasma Library... I wanted to attempt to keep it as platform neutral as possible. The only WinForms based thing that happens there is getting an IntPtr of a form that's never shown to the user for converting the DDS Mipmap to a PNG.

What Plasma Explorer.exe does is take data from Plasma.dll and display it.
Image
User avatar
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 1908
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Plasma Explorer on Mono

Postby Branan » Sun Jul 06, 2008 2:26 pm

As far as I can tell, there's no open-source replacement for the Docking control you're using, and despite years of discussion about making it portable to Mono, it still hasn't happened - which tells me it probably never will.

Hoikas:
From what I see using Plasma Explorer on Windows and in Wine, It looks like you could fix the data browser in one place and just use a tab widget for the main view. Would that be OK with you, or did you have other plans for movable docks?
Image
Your friendly neighborhood shard admin
User avatar
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR

Re: Plasma Explorer on Mono

Postby Tsar Hoikas » Sun Jul 06, 2008 3:09 pm

The main plan with the docking component was ease of use. The ability to dock, float, and autohide the panes is highly useful...

I wonder if it would be possible to somehow make it either use the docking control or the tab control (as you suggested) by setting a platform in the compile settings?
Image
User avatar
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 1908
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Plasma Explorer on Mono

Postby Branan » Sun Jul 06, 2008 3:19 pm

That should entirely possible to do, yes. It'll at least be a good holdover until I can find (or *shudders* write) a WinForms-based docking control the works on Mono.

EDIT: If you want to still be able to distribute a unified .EXE file, it's possible to detect Mono at runtime and work off of that:
Code: Select all
  public static bool IsRunningOnMono ()
  {
    return Type.GetType ("Mono.Runtime") != null;
  }
User avatar
Branan
Gehn Shard Admin
 
Posts: 694
Joined: Fri Nov 16, 2007 9:45 pm
Location: Portland, OR


Return to Plasma#

Who is online

Users browsing this forum: No registered users and 1 guest