Author Topic: Aurora C# for Linux?  (Read 26706 times)

0 Members and 1 Guest are viewing this topic.

Offline Jovus

  • Lt. Commander
  • ********
  • J
  • Posts: 220
  • Thanked: 81 times
Re: Aurora C# for Linux?
« Reply #30 on: April 14, 2020, 01:24:00 PM »
This doesn't work for me sadly, the popup errors can't be clicked away, they continue to pop. I tried to rebuild libSQLite.Interop.so for my machine, but the source code zips I find are corrupted. Great.

Also, what errors are you seeing? Be sure you're not opening a DB to a game you made previously; that game is probably borked. You might need to re-download a fresh DB.
 

Offline Rastaman

  • Azhanti High Lightning
  • Sub-Lieutenant
  • ******
  • R
  • Posts: 144
  • Thanked: 8 times
Re: Aurora C# for Linux?
« Reply #31 on: April 14, 2020, 01:59:51 PM »
This doesn't work for me sadly, the popup errors can't be clicked away, they continue to pop. I tried to rebuild libSQLite.Interop.so for my machine, but the source code zips I find are corrupted. Great.

Also, what errors are you seeing? Be sure you're not opening a DB to a game you made previously; that game is probably borked. You might need to re-download a fresh DB.

Thank you very much, that zip was what I needed.  :) I could compile the .so and move it to my aurora directory. I now get what you describe for your install, and it works.

The first error was "function #483: SQLite.Interop.dll assembly<unknown assembly>", and then new popups about missing references.

Do you know by chance how to change the date format in mono Aurora? I keep getting the long version with the weekday.
« Last Edit: April 14, 2020, 02:10:48 PM by Rastaman »
Fun Fact: The minimum engine power of any ship engine in Aurora C# is 0.01. The maximum is 120000!
 

Offline Jovus

  • Lt. Commander
  • ********
  • J
  • Posts: 220
  • Thanked: 81 times
Re: Aurora C# for Linux?
« Reply #32 on: April 14, 2020, 05:49:55 PM »
I don't. I think it's not mono-specific and you can just change your system date format, but I'm not sure. It's not a bug I ran into so I haven't looked at it.
 

Offline Jovus

  • Lt. Commander
  • ********
  • J
  • Posts: 220
  • Thanked: 81 times
Re: Aurora C# for Linux?
« Reply #33 on: April 14, 2020, 06:15:59 PM »
Just discovered that, while this works, it cuts off vital parts of the ship design screen (and yes I'm using wide view and resizing the window to be as large as possible); I'm guessing this is because the selectionmode.none error has to do with how listbox displays different elements. Oof.

Edit: A fix has been added to the zipfile in my original post.

Edit2: Another fix added to the zipfile in my original post, this one to allow font selection and UI scaling (of a sort). Again, to be clear, none of this touches any of Steve's code.
« Last Edit: April 18, 2020, 07:56:20 AM by Jovus »
 
The following users thanked this post: Rastaman, SpikeTheHobbitMage

Offline Rastaman

  • Azhanti High Lightning
  • Sub-Lieutenant
  • ******
  • R
  • Posts: 144
  • Thanked: 8 times
Re: Aurora C# for Linux?
« Reply #34 on: April 23, 2020, 02:44:06 PM »
FYI:

When I click on any sensor checkboxes in the Display outliner on the main map ("Active Sensors", "Passive vs. Signature xx"), Aurora completely crashes and gives out in the terminal:


double free or corruption (out)

=================================================================
   Native Crash Reporting
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

=================================================================
   Native stacktrace:
=================================================================
   0x55da51ec7265 - mono : (null)
   0x55da51ec75fc - mono : (null)
   0x55da51e72a21 - mono : (null)
   0x55da51ec685b - mono : (null)
   0x7f69516d6890 - /lib/x86_64-linux-gnu/libpthread.so.0 : (null)
   0x7f69509d2e97 - /lib/x86_64-linux-gnu/libc.so.6 : gsignal
   0x7f69509d4801 - /lib/x86_64-linux-gnu/libc.so.6 : abort
   0x7f6950a1d897 - /lib/x86_64-linux-gnu/libc.so.6 : (null)
   0x7f6950a2490a - /lib/x86_64-linux-gnu/libc.so.6 : (null)
   0x7f6950a2be75 - /lib/x86_64-linux-gnu/libc.so.6 : cfree
   0x7f694799cbf9 - /usr/lib/libgdiplus.so.0 : GdipDeletePen
   0x4188e7d3 - Unknown

=================================================================
   Telemetry Dumper:
=================================================================
« Last Edit: April 23, 2020, 03:02:03 PM by Rastaman »
Fun Fact: The minimum engine power of any ship engine in Aurora C# is 0.01. The maximum is 120000!
 

Offline SpikeTheHobbitMage

  • Bug Moderators
  • Commodore
  • ***
  • S
  • Posts: 670
  • Thanked: 159 times
Re: Aurora C# for Linux?
« Reply #35 on: April 24, 2020, 12:20:19 AM »
It runs!  :D

Ubuntu 18.04.4 LTS 64bit

sudo apt install unrar

unrar x AuroraV100.rar

sudo apt install wine64

sudo apt install winetricks

sudo winetricks dotnet45


This installs .net 4 and then 4.5 automatically, you just have to say yes to everything. There are a lot of error messages in the terminal, ignore them. From what I have seen, Mono is automatically uninstalled in the process. I was not able to install dotnet 47 (newest version?) this way.

Launch with command
wine Aurora.exe
while in the Aurora folder

No guarantees, as my Linux knowledge is limited. I tried mono, didn't work. Good luck!
I haven't tried the wine version that comes with Debian, but wine-staging's built-in mono runtime handles it okay.  No need to install .net so far.
 

Offline Rastaman

  • Azhanti High Lightning
  • Sub-Lieutenant
  • ******
  • R
  • Posts: 144
  • Thanked: 8 times
Re: Aurora C# for Linux?
« Reply #36 on: April 24, 2020, 06:00:14 AM »
It runs!  :D

Ubuntu 18.04.4 LTS 64bit

sudo apt install unrar

unrar x AuroraV100.rar

sudo apt install wine64

sudo apt install winetricks

sudo winetricks dotnet45


This installs .net 4 and then 4.5 automatically, you just have to say yes to everything. There are a lot of error messages in the terminal, ignore them. From what I have seen, Mono is automatically uninstalled in the process. I was not able to install dotnet 47 (newest version?) this way.

Launch with command
wine Aurora.exe
while in the Aurora folder

No guarantees, as my Linux knowledge is limited. I tried mono, didn't work. Good luck!
I haven't tried the wine version that comes with Debian, but wine-staging's built-in mono runtime handles it okay.  No need to install .net so far.

My former post is more like another option. Mono has better performance and is more stable. Except the sensors-on-map checkboxes I have not found any gamebreaking issues, but it's still not really playable due to masses of error popups every 5 day turn. You can close those, but it's not good.

Windows and tabs crash constantly under mono too, but you can reload them with the alt or strg keys and then they work alright.

All in all I wouldn't describe Aurora on Linux playable atm. It runs, yes, but for a whole campaign - forget it.
Fun Fact: The minimum engine power of any ship engine in Aurora C# is 0.01. The maximum is 120000!
 

Offline db48x

  • Commodore
  • **********
  • d
  • Posts: 641
  • Thanked: 200 times
Re: Aurora C# for Linux?
« Reply #37 on: April 24, 2020, 07:05:56 AM »
I haven't tried the wine version that comes with Debian, but wine-staging's built-in mono runtime handles it okay.  No need to install .net so far.

My former post is more like another option. Mono has better performance and is more stable. Except the sensors-on-map checkboxes I have not found any gamebreaking issues, but it's still not really playable due to masses of error popups every 5 day turn. You can close those, but it's not good.

Windows and tabs crash constantly under mono too, but you can reload them with the alt or strg keys and then they work alright.

All in all I wouldn't describe Aurora on Linux playable atm. It runs, yes, but for a whole campaign - forget it.

I use wine-mono and I haven't had any of those problems; no crashes, no errors on every turn. I'm using wine 5.5, installed from the Fedora packages.
 

Offline SpikeTheHobbitMage

  • Bug Moderators
  • Commodore
  • ***
  • S
  • Posts: 670
  • Thanked: 159 times
Re: Aurora C# for Linux?
« Reply #38 on: April 25, 2020, 06:05:03 AM »
It runs!  :D

Ubuntu 18.04.4 LTS 64bit

sudo apt install unrar

unrar x AuroraV100.rar

sudo apt install wine64

sudo apt install winetricks

sudo winetricks dotnet45


This installs .net 4 and then 4.5 automatically, you just have to say yes to everything. There are a lot of error messages in the terminal, ignore them. From what I have seen, Mono is automatically uninstalled in the process. I was not able to install dotnet 47 (newest version?) this way.

Launch with command
wine Aurora.exe
while in the Aurora folder

No guarantees, as my Linux knowledge is limited. I tried mono, didn't work. Good luck!
I haven't tried the wine version that comes with Debian, but wine-staging's built-in mono runtime handles it okay.  No need to install .net so far.

My former post is more like another option. Mono has better performance and is more stable. Except the sensors-on-map checkboxes I have not found any gamebreaking issues, but it's still not really playable due to masses of error popups every 5 day turn. You can close those, but it's not good.

Windows and tabs crash constantly under mono too, but you can reload them with the alt or strg keys and then they work alright.

All in all I wouldn't describe Aurora on Linux playable atm. It runs, yes, but for a whole campaign - forget it.
When you say 'mono', are you talking about native mono on Linux (without wine) or wine-mono that is run inside of wine?  The former is utterly broken but the latter runs Aurora just fine.

A few points:  Aurora runs best in a clean 32-bit wine-prefix.  Debian's wine packages are outdated and don't include wine-mono, so if that is what you have you will need to replace them with WineHQ's official version from winehq.org.  Microsoft's .net has never worked properly under wine, so installing it is not recommended.  Never run winetricks as root or with sudo.

Edit:As of 5.7, wine uses wine-mono-5.0.0 which is unusable with Aurora.  You will need to manually install either 4.9.4 or 5.0.1.  Note that if 5.0.0 is available locally then wine will silently install it, breaking your installation.
« Last Edit: June 01, 2020, 05:29:00 PM by SpikeTheHobbitMage »
 

Offline Jovus

  • Lt. Commander
  • ********
  • J
  • Posts: 220
  • Thanked: 81 times
Re: Aurora C# for Linux?
« Reply #39 on: April 25, 2020, 11:00:06 PM »
When you say 'mono', are you talking about native mono on Linux (without wine) or wine-mono that is run inside of wine?  The former is utterly broken but the latter runs Aurora just fine.

This is false, which is the point of my fixes posted earlier in this thread. Native mono works fine, if you have it configured correctly. (Which, unfortunately, at the moment includes some hacky custom libs.)

One cool point is that the quest to get Aurora working on mono has uncovered a bug in mono itself and how it supports C# (the language, not the game) which relates to how Aurora is handling drawing (and garbage-collecting) sensors. This has been merged into the main mono branch, so if you're still experiencing those issues, try updating mono.

Your particular Linux distro may not have the changes upstream yet, which I can't help. Personally I use Arch, which means bleeding-edge package updates, but other distros handle such things differently.
 

Offline SpikeTheHobbitMage

  • Bug Moderators
  • Commodore
  • ***
  • S
  • Posts: 670
  • Thanked: 159 times
Re: Aurora C# for Linux?
« Reply #40 on: April 26, 2020, 12:06:52 AM »
When you say 'mono', are you talking about native mono on Linux (without wine) or wine-mono that is run inside of wine?  The former is utterly broken but the latter runs Aurora just fine.

This is false, which is the point of my fixes posted earlier in this thread. Native mono works fine, if you have it configured correctly. (Which, unfortunately, at the moment includes some hacky custom libs.)

One cool point is that the quest to get Aurora working on mono has uncovered a bug in mono itself and how it supports C# (the language, not the game) which relates to how Aurora is handling drawing (and garbage-collecting) sensors. This has been merged into the main mono branch, so if you're still experiencing those issues, try updating mono.

Your particular Linux distro may not have the changes upstream yet, which I can't help. Personally I use Arch, which means bleeding-edge package updates, but other distros handle such things differently.
I apologize, you've worked hard to find a solution.  Calling it 'utterly broken' wasn't fair.

Debian provides the most recent stable, which was released in January.  6.10 hasn't been officially released yet, but should include your fix IIUC.  I may try native mono again then.

Cheers.
 
The following users thanked this post: skoormit

Offline db48x

  • Commodore
  • **********
  • d
  • Posts: 641
  • Thanked: 200 times
Re: Aurora C# for Linux?
« Reply #41 on: April 26, 2020, 09:58:08 AM »
Yea, native mono with Jovus's tweaked libraries works fairly well, and has the advantage of being faster than running inside wine. There are still some annoyances that I haven't tracked down yet.

Jovus, have you published the source of those tweaks anywhere?
 

Offline Jovus

  • Lt. Commander
  • ********
  • J
  • Posts: 220
  • Thanked: 81 times
Re: Aurora C# for Linux?
« Reply #42 on: April 26, 2020, 03:09:12 PM »
Jovus, have you published the source of those tweaks anywhere?

Nope. They're really nasty kludges that do things like insert a line in mono's dynamic resizing code to just say "force the dimension scaling to exactly this" or "throw away mono's method of re-building list windows".

Hopefully at some point such a thing will be unnecessary, but this is what we have for now.
 

Offline db48x

  • Commodore
  • **********
  • d
  • Posts: 641
  • Thanked: 200 times
Re: Aurora C# for Linux?
« Reply #43 on: April 26, 2020, 03:21:27 PM »
Can you start a branch in a git repository somewhere for them? I'd like to try to figure out why the windows flash white sometimes when they're refreshed, and it would help to have them as a starting point.
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: Aurora C# for Linux?
« Reply #44 on: April 26, 2020, 07:22:20 PM »
Jorvus you probably should put it up on github, due to some of us needing to recompile some of the libs.
I had the same problem as Rastaman which was fixed by recompiling the SQLite as he did.
I also had problems with the libgdiplus supplied in the discord pin, until I got around to compiling that on my system also.
I suspect these problems are due to differences in core distros, those of us on debian may have to do the above.


I'll note here the steps I had to take to compile the latest version of libgdiplus since it was a real PITA and un-intuitive as ****. (This fixes the crash when displaying Active sensors, Fircontrol ranges etc)
0: First check if you've got the latest version of mono available to you, if not, update that and check if you still get crashes with the sensor ranges.
1: git clone the gdi github repo here: https://github.com/mono/libgdiplus emphasis on *git clone* here, just downloading the zip will *not* work because of the way they've set up the project. (if you're unfamiliar with git, you'll have to download that and google elsewhere).
2: you may have to install libtool: https://www.gnu.org/software/libtool/ (`./configure` `make` and `sudo make install`)
3: in your gdiplus directory run command: ./autogen.sh make
4: if the above fails with something along the lines of "checking build system type... Invalid configuration `make': machine `make' not recognized
configure: error: /bin/bash ./config.sub make failed" then you'll need to do step 5, otherwise do 6:
5: in the gdipluss directory run the following commands: `./configure`  then `make` after that's finished,
6: you should find the libgdiplus.so.0.0.0 in the libgdiplus/src/.libs directory
7: move the above file to your aurora directory and rename it to libgdiplus.so.0 (some advocate creating a symlink here, but I don't see the point, if you just put it in the directory it'll use that instead of looking for the system one, alternatively, you could `make install` instead which should update your system version, though I've not tried this.
 
The following users thanked this post: Rastaman, SpikeTheHobbitMage, db48x, Jovus