From what I've discovered so far, it should also run under Linux with some (minor) tweaking!
(This message brought to you by the author of the "[PSA] Steps to make your mod work on Linux+Mac" thread ;-P )
Background:
This tool, even though it ends with .exe, is "secretly" a .Net WinForms application inside.
.Net / C# is no longer "windows only", and hasn't been for a couple of years.
There is an open source re-implementation of the .Net runtime (the "CLR"), called "Mono"
Since a few years, Microsoft has actually worked closely with the Mono-project to improve compatibility, so they can expand their .Net-market onto the Linux server market.
porting XR builder 2.0
You can run XR builder 2.0 on linux by doing:
Code: Select all
sudo apt-get install mono-complete
mono "X Rebirth build 2.exe"
Since I don't have the source code, I can't do much directly, but I can hopefully help guide the way!
Simoom, could you please use your connections to make Alexusvm aware of the possibility? I feel your existing connection would work better, and I speak zero Russian. (I'd be willing to have a look at the source code too, if that's OK with them, to see if I can help improve compatibility)
First of, there is an excellent tool called "MoMA", the Mono Migration Analyser
MoMA can scan .net programs for things that might break on Mono-on-linux/mac, but work on Windows.
I took the liberty of running MoMA on XR Builder 2.0, and am happy to report only 2 issues were raised, on 5 methods:
Scan Date: 4/12/2016 8:50:30 PM
Assembly X Rebirth build 2.exe 2.0.42.0
MoMA Definitions: Mono 2.8 (2.0 Profile)
(the 4.0 profile raises 7080 issues, so I believe this is a .Net 2.0 application)
Problem 1: Method used that Throws NotImplementedException on Mono
Object Interaction.GetObject (string, string)
called by:
- void Combo_Printers_SelectedIndexChanged (Object, EventArgs)
void Graphics.CopyFromScreen (int, int, int, int, Size)
Called by:
- void Form_Balance_KeyDown (Object, KeyEventArgs)
- void Form_Station_KeyDown (Object, KeyEventArgs)
- void Form_BuildTable_KeyDown (Object, KeyEventArgs)
- void Form_BuildTable_KeyDown (Object, KeyEventArgs)
- void Form_Main_KeyDown (Object, KeyEventArgs)
- Mono guide: porting winforms applications to mono: http://www.mono-project.com/docs/gui/wi ... lications/
- Mono Winforms implementation documentation: http://www.mono-project.com/docs/gui/winforms/
- Mono Migration Analyser (MoMA): http://www.mono-project.com/docs/tools+ ... ools/moma/
In case it interests anyone, this is the stacktrace I get when doing "mono 'X rebirth builder 2.exe'":
Code: Select all
System.InvalidOperationException: WinForms_SeeInnerException ---> System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0
at System.Drawing.Graphics.GdipMeasureString (IntPtr graphics, System.String text, System.Drawing.Font font, System.Drawing.RectangleF& layoutRect, IntPtr stringFormat) [0x00000] in <filename unknown>:0
at System.Drawing.Graphics.MeasureString (System.String text, System.Drawing.Font font, SizeF layoutArea, System.Drawing.StringFormat stringFormat) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:MeasureString (string,System.Drawing.Font,System.Drawing.SizeF,System.Drawing.StringFormat)
at System.Windows.Forms.TextRenderer.MeasureString (System.String text, System.Drawing.Font font, SizeF layoutArea, System.Drawing.StringFormat stringFormat) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Label.InternalGetPreferredSize (Size proposed) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Label.GetPreferredSize (Size proposedSize) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.get_PreferredSize () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:get_PreferredSize ()
at System.Windows.Forms.Layout.DefaultLayout.GetPreferredControlSize (System.Windows.Forms.Control child) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Layout.DefaultLayout.LayoutDockedChildren (System.Windows.Forms.Control parent, System.Windows.Forms.Control[] controls) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Layout.DefaultLayout.Layout (System.Object container, System.Windows.Forms.LayoutEventArgs args) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.OnLayout (System.Windows.Forms.LayoutEventArgs levent) [0x00000] in <filename unknown>:0
at System.Windows.Forms.ScrollableControl.OnLayout (System.Windows.Forms.LayoutEventArgs levent) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.PerformLayout (System.Windows.Forms.Control affectedControl, System.String affectedProperty) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.OnResizeInternal (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.OnResize (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Panel.OnResize (System.EventArgs eventargs) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.OnSizeChanged (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.UpdateBounds (Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.UpdateBounds (Int32 x, Int32 y, Int32 width, Int32 height) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.SetBoundsCoreInternal (Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.SetBoundsCore (Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.SetBoundsInternal (Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:SetBoundsInternal (int,int,int,int,System.Windows.Forms.BoundsSpecified)
at System.Windows.Forms.Layout.DefaultLayout.LayoutDockedChildren (System.Windows.Forms.Control parent, System.Windows.Forms.Control[] controls) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Layout.DefaultLayout.Layout (System.Object container, System.Windows.Forms.LayoutEventArgs args) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.OnLayout (System.Windows.Forms.LayoutEventArgs levent) [0x00000] in <filename unknown>:0
at System.Windows.Forms.ScrollableControl.OnLayout (System.Windows.Forms.LayoutEventArgs levent) [0x00000] in <filename unknown>:0
at System.Windows.Forms.ContainerControl.OnLayout (System.Windows.Forms.LayoutEventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.PerformLayout (System.Windows.Forms.Control affectedControl, System.String affectedProperty) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.OnResizeInternal (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.OnResize (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.UserControl.OnResize (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.OnSizeChanged (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.UpdateBounds (Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.UpdateBounds (Int32 x, Int32 y, Int32 width, Int32 height) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.SetBoundsCoreInternal (Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.SetBoundsCore (Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.SetBoundsInternal (Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.SetBounds (Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.set_Size (Size value) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:set_Size (System.Drawing.Size)
at XRB.ComplexTree.InitializeComponent () [0x00000] in <filename unknown>:0
at XRB.ComplexTree..ctor () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) XRB.ComplexTree:.ctor ()
at XRB.Form_Main.InitializeComponent () [0x00000] in <filename unknown>:0
at XRB.Form_Main..ctor () [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at XRB.My.MyProject+MyForms.Create__Instance__[Form_Main] (XRB.Form_Main Instance) [0x00000] in <filename unknown>:0
at XRB.My.MyProject+MyForms.get_Form_Main () [0x00000] in <filename unknown>:0
at XRB.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
at XRB.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0