Elvas Tower: Running OR_NewYear on Ubuntu using monogame - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Running OR_NewYear on Ubuntu using monogame This about trying to run the MG version of Openrails on Ubunto using m Rate Topic: -----

#1 User is offline   David Webb 

  • Apprentice
  • Group: Status: Active Member
  • Posts: 36
  • Joined: 05-January 20
  • Gender:Male
  • Simulator:OpenRails, ZR
  • Country:

Posted 15 January 2020 - 10:56 AM

Joined Elvas Tower a week or so ago as it seemed to be a well informed group.

Anyway, after trying it out elsewhere, I decided that I wanted to install OpenRails on my Linux computer. I tried Vim, but could never get the right versions of .NET and XNA loaded, so seeing that mono had been developed for many machines including Linux, and that Monogame included both the .NET and XNA libraries (dll's) I decided to try that route.

To get a clean system without having to play with partitions I installed VirtualBox and, within that, installed ubuntu from ubuntu-18.04.3-desktop-amd64.iso, making sure that it had access to 4GB of cpu memory and 40Gb of disk space. I then used apt-get to update the system. The resulting system runs without any problems.

I then installed mono runtime following the instructions in:
http://www.monogame...._MonoGame_Linux
This required me to use apt-get to instal libopenal-dev and mono-runtime. Again there were no problems.

I then downloaded OR_NewYearMG.zip from https://github.com/p...tualKid/ORTS-MG, using the downloadzip option on the 'Clone or download' button - and uncompressed it.

Finally from within the expanded directory I tried to start OpenRails but it failed:
>mono OpenRails64.exe
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
File name: 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

I can find nothing in the documentation to tell me which runtime I need, or why I should need System.Window.Forms. What also worries me is that there could be other 'System.*.*' libraries/frameworks/?? missing.

I doubt that the monogame version of OpenRails is only for running on Windows computers (but many of the Monogame posts here only mention windows), so what am I missing??

Any ideas/pointers/help/suggestions will be welcome.

Regards,

David Webb
p.s. I am an old time user of Unix so please do not say I should use windows 10. I know it will try and take over my machine - and cause problems with the rest of my life.

#2 User is offline   perpetualKid 

  • Fireman
  • Group: Status: Active Member
  • Posts: 190
  • Joined: 10-June 18
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 15 January 2020 - 11:07 AM

View PostDavid Webb, on 15 January 2020 - 10:56 AM, said:

Joined Elvas Tower a week or so ago as it seemed to be a well informed group.

Anyway, after trying it out elsewhere, I decided that I wanted to install OpenRails on my Linux computer. I tried Vim, but could never get the right versions of .NET and XNA loaded, so seeing that mono had been developed for many machines including Linux, and that Monogame included both the .NET and XNA libraries (dll's) I decided to try that route.

To get a clean system without having to play with partitions I installed VirtualBox and, within that, installed ubuntu from ubuntu-18.04.3-desktop-amd64.iso, making sure that it had access to 4GB of cpu memory and 40Gb of disk space. I then used apt-get to update the system. The resulting system runs without any problems.

I then installed mono runtime following the instructions in:
http://www.monogame...._MonoGame_Linux
This required me to use apt-get to instal libopenal-dev and mono-runtime. Again there were no problems.

I then downloaded OR_NewYearMG.zip from https://github.com/p...tualKid/ORTS-MG, using the downloadzip option on the 'Clone or download' button - and uncompressed it.

Finally from within the expanded directory I tried to start OpenRails but it failed:
>mono OpenRails64.exe
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
File name: 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

I can find nothing in the documentation to tell me which runtime I need, or why I should need System.Window.Forms. What also worries me is that there could be other 'System.*.*' libraries/frameworks/?? missing.

I doubt that the monogame version of OpenRails is only for running on Windows computers (but many of the Monogame posts here only mention windows), so what am I missing??

Any ideas/pointers/help/suggestions will be welcome.

Regards,

David Webb
p.s. I am an old time user of Unix so please do not say I should use windows 10. I know it will try and take over my machine - and cause problems with the rest of my life.



the OpenRails.exe is just a little launcher program, which checks for couple dependency. As such, it runs on .NET 2.0 (which is available on any Windows machine), and checks if the required .NET framework (4.7.2 or 4.8) is installed. Seems to me your machine does not have .NET 2.0 at all.
However, given this is only a launcher, instead of OpenRails.exe, just try to start Menu.exe. If you have correct .NET framework, this should work, and there is no side effect of not using the openrails.exe launcher.

I'm bit confused though which version you have -

Quote

I then downloaded OR_NewYearMG.zip from https://github.com/p...tualKid/ORTS-MG
- if you downloaded from my github repository, you don't have OR_NewYearMG, and their wouldn't be an openrails64.exe. Maybe you can clarify, there is a version.txt and revision.txt containing some information even if the program may not start.<br style="color: rgb(0, 0, 0); font-family: arial,verdana,tahoma,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">


#3 User is offline   dajones 

  • Open Rails Developer
  • Group: Status: Contributing Member
  • Posts: 413
  • Joined: 27-February 08
  • Gender:Male
  • Location:Durango, CO
  • Country:

Posted 15 January 2020 - 12:36 PM

I haven't had any luck running OpenRails using the mono runtime on Linux. The biggest problem as far as I can tell is that the mono runtime can only compile shaders on Windows. OpenRails also includes some Windows specific code that will cause the mono runtime to throw a DLL not found exception. A year or so ago I tried changing the code to bypass these exceptions and that is when I discovered the issue about compiling shaders.

I haven't tried it, but you might be able to run the monogame version using Wine if you install all of the dependencies. I have used the 1.2 version of OpenRails with Wine. I posted the wine setup instructions I used a few years ago.

Doug

#4 User is offline   David Webb 

  • Apprentice
  • Group: Status: Active Member
  • Posts: 36
  • Joined: 05-January 20
  • Gender:Male
  • Simulator:OpenRails, ZR
  • Country:

Posted 16 January 2020 - 09:55 AM

Many thanks to perpetualKid and dajones for your quick replies.

Mmmmm - sorry for the mistakes, 'Vim' should have been 'wine', as you probably guessed. Also I had mislaid ORTS-MG-Master.zip from github and used OR_NewYear_MG zip from the instructions given by Csantucci entry #322 in "Monogame migration"->"OR NewYear MG"
http://www.elvastowe...-or-newyear-mg/
The download included executables, Openrails.exe giving the error I reported. The other programs either reported missing System.Windows.Forms or System.Core - which is a bit odd as the latter is used in the C# HelloWorld.cs program from when first tried out mono.

I'll start again and try compiling everything myself starting from the githib version. If I get anywhere interesting I'll report back.

David.

#5 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 16 January 2020 - 10:06 AM

If you use my remote GitHub repository, the branch to be considered is OR_NewYear_NOWD.

#6 User is offline   BillC 

  • Conductor
  • Group: Private - Open Rails Developer
  • Posts: 322
  • Joined: 31-May 11
  • Gender:Male
  • Country:

Posted 16 January 2020 - 09:25 PM

View Postdajones, on 15 January 2020 - 12:36 PM, said:

I haven't had any luck running OpenRails using the mono runtime on Linux. The biggest problem as far as I can tell is that the mono runtime can only compile shaders on Windows. OpenRails also includes some Windows specific code that will cause the mono runtime to throw a DLL not found exception. A year or so ago I tried changing the code to bypass these exceptions and that is when I discovered the issue about compiling shaders.

I haven't tried it, but you might be able to run the monogame version using Wine if you install all of the dependencies. I have used the 1.2 version of OpenRails with Wine. I posted the wine setup instructions I used a few years ago.

Doug


You may also want to a look at CodeWeavers. I used them ~= 10 years ago when working in the Linus/Unix word. Did a lot of shuffling between Linux and Windows, using VMware virtual machines. It's payware but saved the hassle of dealing with Wine, and virtual machines. Time was money. It's payware and was cheaper back then, still not overly expensive, after the 1st year, the renewal fee for the 2nd year is what the initial purchase price was. The advantage it had over VMware was speed, they have a 14 day free trail. I may get a trial to run windows on my Imac.

Bill

#7 User is offline   jdgremsjr 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 606
  • Joined: 31-March 12
  • Gender:Male
  • Location:Fulton, Missouri
  • Simulator:MSTS, OR, TS2016
  • Country:

Posted 17 January 2020 - 10:10 AM

I used a lot of VMs especially when I was in college a few years ago. If you want to use Virtual Machines, both Hyper-V, from Microsoft and VirtualBox from Oracle are free. and both are fairly easy to setup. I did have VMware Workstation while in school but converted all over to hyper-v after I didn't have access to the free software.

#8 User is offline   Super-C 

  • Apprentice
  • Pip
  • Group: Status: Fired
  • Posts: 1
  • Joined: 25-February 19
  • Gender:Male
  • Simulator:ORTS, Run8
  • Country:

Posted 14 May 2020 - 02:29 PM

Hi to all,

I, too, am an old-time Unixer (BSD, SunOS in the eithties-nineties) and joined this group a while back with the same intention, i.e. run ORTS on Linux Mint 18.3 in addition to Win 7. There were reports of success on the Wine site, but I couldn’t make it work in a four-hour session. Then, reality and life got in the way and I abandoned the attempt.

Recently, my system was replaced with a Dell XPS with an Nvidia GT1080 video card. I logged in to this forum to see if the ‘run on Linux’ problems had been solved or, more likely, were at least being worked on. I am convinced that if enough Linuxers work on it we can come up with a version that installs easily and functions smoothly. Of course, I have been wrong many times in the past!

So here I am, looking to join up with others who, like myself, would like to make this work, but need to work with others rather than be loners. Anyone out there (perhaps David?) who would like to communicate with others in a group trying various things in order to make ORTS run on various Linux distros?

Bill Jacklin

#9 User is offline   MMax 

  • Apprentice
  • Group: Status: Dispatcher
  • Posts: 35
  • Joined: 04-December 19
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 14 May 2020 - 09:57 PM

I recently succeeded in installing the stable (1.3.1) version of Open Rails on Wine running Linux Mint 19.3.
I followed the instructions on the winehq site, but had to download and install DotNet 3.5 SP1 manually – it doesn't work when you try it with winetricks. There are still some minor issues – you can't exit the sim by pressing Alt+F4, framerates are a bit lower than under windows, and TrackViewer doesn't work – but for most stuff it works pretty good.
Winetricks lets you install some components only in a 32-bit Wine installation, and I haven't yet tried to install the stuff manually into a 64-bit wineprefix, so I can't advise on that.
Still working on NewYear MG, which doesn't work yet.
I hope this helped you.

#10 User is offline   dajones 

  • Open Rails Developer
  • Group: Status: Contributing Member
  • Posts: 413
  • Joined: 27-February 08
  • Gender:Male
  • Location:Durango, CO
  • Country:

Posted 15 May 2020 - 04:39 AM

Since my previous post in this thread, I have found a monogame utility called 2MGFX that is supposed to be able to compile HLSL shader code into opengl compatible bytecode. It is a command line utility so there is good chance it can run under wine. Given this it should be possible to modify the OR monogame code to use compiled shaders instead of compiling them at runtime as it currently does. I have been thinking of trying this, but haven't had the time.

Doug

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users