Aurora 4x

C# Aurora => Development Discussions => Topic started by: Bughunter on March 28, 2019, 11:35:16 AM

Title: Aurora C# for Linux?
Post by: Bughunter on March 28, 2019, 11:35:16 AM
I guess Steve doesn't care about this but, but who knows after C# he might decide he wants to learn Linux next.

Winforms which would be the main Windows specific dependency (could be others I wouldn't know about) has now been implemented in Mono. So this could make a cross-platform Aurora possible.
https://www.mono-project.com/docs/gui/winforms/ (https://www.mono-project.com/docs/gui/winforms/)

Edit: For running Aurora natively on Linux check later posts in this thread: http://aurora2.pentarch.org/index.php?topic=10320.msg122543#msg122543 (http://aurora2.pentarch.org/index.php?topic=10320.msg122543#msg122543)
Title: Re: Aurora C# for Linux?
Post by: Myvar on March 29, 2019, 12:21:47 AM
Unless Steve used some strange lib's or pinvoked the windows api's it should just work, with mono as is.
Title: Re: Aurora C# for Linux?
Post by: Bughunter on March 29, 2019, 02:31:21 AM
Could still be something like file paths if file system differences are not handled in a cross-platform way, but yes hopefully nothing major.. or even nothing at all.
Title: Re: Aurora C# for Linux?
Post by: lupin-de-mid on March 29, 2019, 10:15:47 AM
But I think that Aurora C# is WPF?
Title: Re: Aurora C# for Linux?
Post by: Steve Walmsley on March 29, 2019, 10:35:37 AM
But I think that Aurora C# is WPF?

No, its Windows Forms.
Title: Re: Aurora C# for Linux?
Post by: lupin-de-mid on March 29, 2019, 10:47:32 AM
Than it should work out the box
like
Code: [Select]
mono AuroraCsharp.exe
Title: Re: Aurora C# for Linux?
Post by: clement on March 29, 2019, 06:55:20 PM
If I remember correctly, Steve is using the .net framework which would have to be run using wine.

.Net Core works on both Windows and Linux and supports winforms. If in the future Steve wanted to, it is very easy to upgrade to .net core. It is mostly updating package references.
Title: Re: Aurora C# for Linux?
Post by: Myvar on March 30, 2019, 02:16:33 AM
. net core only supports windows forms in windows, better of using mono. 
Title: Re: Aurora C# for Linux?
Post by: lupin-de-mid on March 30, 2019, 06:04:24 AM
Latest mono could run net. core.  Probably it is possible to run net core winform apps under mono
Title: Re: Aurora C# for Linux?
Post by: sublight on March 30, 2019, 08:58:51 AM
I don't believe it. That's the same Mono/Winform page from 2015, and at the time their "complete support" only meant "will probably compile." From my experience Mono is primarily intended to make programs developed on Linux easy to port to Windows, but trying the reverse is a quick way to discover that some functions behave differently or worse are just placeholders that throw runtime exceptions on execution.

Maybe things are better in Mono 5.x, but even if Aurora C# had compatible winform coding the map rendering code would probably still need to be ported.

In summery anyone who thinks Mono is an easy transition to other OSs should join the Pulsar 4X project. The original group broke apart partially over system incompatibilities, and those continuing have been asking for fresh blood. Granted, half our problems were OpenGL compatibility issues rather than cross-platform WinForm/Mono issues, but still.
Title: Re: Aurora C# for Linux?
Post by: QuakeIV on March 30, 2019, 04:20:08 PM
Aurora will run with WINE or it will not, thats probably pretty much going to be the end of it for now.
Title: Re: Aurora C# for Linux?
Post by: lupin-de-mid on March 31, 2019, 03:38:21 AM
My experience is slightly better than you
Quote from: sublight link=topic=10320. msg113521#msg113521 date=1553954331
I don't believe it.  That's the same Mono/Winform page from 2015, and at the time their "complete support" only meant "will probably compile. " From my experience Mono is primarily intended to make programs developed on Linux easy to port to Windows, but trying the reverse is a quick way to discover that some functions behave differently or worse are just placeholders that throw runtime exceptions on execution.
At work we  have small software developed with winforms.  It was developed under windows and works nicely under mono 4. 8 in linux.

Quote from: sublight link=topic=10320. msg113521#msg113521 date=1553954331
Granted, half our problems were OpenGL compatibility issues rather than cross-platform WinForm/Mono issues, but still.
We use OpenTK   (https://opentk. net/) for  OpenGL for both . net/win and mono/linux.  No problems with mono.  Problems only with Intel Integrated Video Card performance  :)
Title: Re: Aurora C# for Linux?
Post by: Myvar on April 01, 2019, 12:54:36 AM
The map code is just Drawing on the background of an control using something like OnPaint(o, args) or CreateGraphics(); or its just drawn on the image of a picture box, so no opengl, it should just work with mono.
Title: Re: Aurora C# for Linux?
Post by: Rastaman on April 12, 2020, 08:40:59 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!
Title: Re: Aurora C# for Linux?
Post by: lupin-de-mid on April 12, 2020, 09:55:58 AM
Under mono it necessary to install native version of libSQLite.Interop.so
Than we found problem with windows path separators
Probably Steve use something like
Code: [Select]
"Flags/flags" + i+".jpg" if someday Steve change all this this place to something like
Code: [Select]
"Path.Combine("Flags","flags"+i+"jpg");
So use wine its easy.
Title: Re: Aurora C# for Linux?
Post by: Rastaman on April 12, 2020, 10:14:26 AM
Yeah I've seen the SQLite message too, but I couldn't make it work. Wine looks good. I checked the bug thread and as far as I can see the Aurora error messages are the same both in Windows and Linux. So I have hope that Aurora C# continues to run on Linux after the coming updates.
Title: Re: Aurora C# for Linux?
Post by: pabilbado on April 13, 2020, 05:45:15 AM
Does anyone know how using wine we can modify the window sizes? I cannot fit all the text on the default window size.
Title: Re: Aurora C# for Linux?
Post by: pabilbado on April 13, 2020, 05:47:56 AM
Quote from: lupin-de-mid link=topic=10320. msg121054#msg121054 date=1586703358
Under mono it necessary to install native version of libSQLite. Interop. so
Than we found problem with windows path separators
Probably Steve use something like
Code: [Select]
"Flags/flags" + i+".jpg" if someday Steve change all this this place to something like
Code: [Select]
"Path.Combine("Flags","flags"+i+"jpg");
So use wine its easy.

How do we install that native version?
Title: Re: Aurora C# for Linux?
Post by: rumpel on April 13, 2020, 09:03:24 AM
I gave it a try with Wine and it seems to be playable.  Moving the map and zooming in and out is a lot slower, though.  I think the turns also take a little longer than they should.
Title: Re: Aurora C# for Linux?
Post by: Jovus on April 13, 2020, 09:34:00 AM
The SQL missing table errors show when you try to run Aurora from outside its 'install' directory. cd into it and run from there; you should have no problems.
Title: Re: Aurora C# for Linux?
Post by: cpw11 on April 13, 2020, 10:21:09 AM
Quote from: lupin-de-mid link=topic=10320.  msg121054#msg121054 date=1586703358
Under mono it necessary to install native version of libSQLite.  Interop.  so
Than we found problem with windows path separators
Probably Steve use something like
Code: [Select]
"Flags/flags" + i+".jpg" if someday Steve change all this this place to something like
Code: [Select]
"Path.Combine("Flags","flags"+i+"jpg");
So use wine its easy. 

Code: [Select]
MONO_IOMAP=all mono Aurora.exe gets the game to load OK.  There's still a few errors that stop the game functioning properly under mono however.   I continue to try and hunt them down. 
Do note that MONO_IOMAP is apparently deprecated for removal in mono (and may have already gone depending on your version).

Sadly, there's no replacement, so for mono compatibility Steve would need to replace as recommended above, using Path. Combine. .

Title: Re: Aurora C# for Linux?
Post by: Paul Shakur on April 13, 2020, 11:57:45 AM
Do not use WINE on linux, it's HUGE security risk.  Just install VirtualBox and install Aurora inside Windows 7/8/10 virtual mashine.  How to install VirtualBox is dependent on distro: Debian based, Red Hat based, Arch based etc.
Title: Re: Aurora C# for Linux?
Post by: lupin-de-mid on April 13, 2020, 02:33:02 PM
Do not use WINE on linux, it's HUGE security risk.  Just install VirtualBox and install Aurora inside Windows 7/8/10 virtual mashine.  How to install VirtualBox is dependent on distro: Debian based, Red Hat based, Arch based etc.
Run aurora in wine on linux is security risk? More than all other people run aurora onthier  host windows?
Title: Re: Aurora C# for Linux?
Post by: Rastaman on April 13, 2020, 03:11:04 PM
With Wine I start to run into problems too, the default scenario in the 1.20 patch crashes once you forward time beyond 20 minutes. New games work better, but it doesn't bode well. I fear that once saves get too complicated, it will irrevocably crash.

Also I don't know how to change to a shorter date format in Aurora, so that the weekday is not displayed. It's not possible to see when projects are finished. Changing the system date format to en_DK does not help.

Edit: I just installed VirtualBox and setup a Win10 virtual machine for the first time. It took some time until I had figured out how to use the guest additions to get a workable resolution. Aurora works in the virtual machine though, but quite a bit slower.
Title: Re: Aurora C# for Linux?
Post by: Rastaman on April 13, 2020, 03:14:49 PM
Quote from: lupin-de-mid link=topic=10320.  msg121054#msg121054 date=1586703358
Under mono it necessary to install native version of libSQLite.  Interop.  so
Than we found problem with windows path separators
Probably Steve use something like
Code: [Select]
"Flags/flags" + i+".jpg" if someday Steve change all this this place to something like
Code: [Select]
"Path.Combine("Flags","flags"+i+"jpg");
So use wine its easy. 

Code: [Select]
MONO_IOMAP=all mono Aurora.exe gets the game to load OK.  There's still a few errors that stop the game functioning properly under mono however.   I continue to try and hunt them down. 
Do note that MONO_IOMAP is apparently deprecated for removal in mono (and may have already gone depending on your version).

Sadly, there's no replacement, so for mono compatibility Steve would need to replace as recommended above, using Path. Combine. .


Steve has opened up the database for everyone, you can access it with SQLite Browser for instance. Maybe it's possible to now create a modded version for Linux purposes?
Title: Re: Aurora C# for Linux?
Post by: Father Tim on April 13, 2020, 05:38:48 PM
Steve has opened up the database for everyone, you can access it with SQLite Browser for instance. Maybe it's possible to now create a modded version for Linux purposes?

Steve has also asked -- repeatedly -- that people not mod his software.  Software that for the moment he is so very kindly sharing with us.
Title: Re: Aurora C# for Linux?
Post by: Retropunch on April 14, 2020, 09:28:13 AM
Do not use WINE on linux, it's HUGE security risk.  Just install VirtualBox and install Aurora inside Windows 7/8/10 virtual mashine.  How to install VirtualBox is dependent on distro: Debian based, Red Hat based, Arch based etc.

WINE itself is fine, the issue is that if you're loading up dodgy stuff on it then malware designed for windows can 'cross the barrier' in some specific cases. If you're just using WINE for Aurora there aren't any risks (unless Steve has put something malicious in it!) so its not something to worry about.

Not downloading dodgy stuff is a good rule regardless of if you're using WINE.
Title: Re: Aurora C# for Linux?
Post by: Jovus on April 14, 2020, 11:09:18 AM
Got this to work natively on Linux. Serious kudos to cpw; he did most of the work. Anyway, here's what you need to do.


If you have trouble with long date formatting, e.g. in the research window, you can add LC_ALL=C to the command to use a different date format.

Because Linux does not have access to Microsoft Fonts and something Steve does in drawing windows is very sensitive to exact dimensions, some people have experienced strange wrapping issues or cutoff issues in places like the system view sideframe, the research panel (being unable to select between Complete and Availble projects), the Class Design view (inaccessibility of some tick boxes like the one to mark a design as obsolete), and possibly a few other areas. To address this, we've added new environment variables for Mono to read to set new fonts and scaling parameters: FONT_NAME, FONT_SIZE, SCALEHACKX and SCALEHACKY. Since there are many different display possibilities that exist, you will need to find specifications for these variables that work for you. However, here are a couple of examples that have been reported to work well for some users to get you started:
Code: [Select]
FONT_NAME="Cantarell" FONT_SIZE=7.5 SCALEHACKX=1.0225 SCALEHACKY=1.01
FONT_NAME="Roboto Condensed" FONT_SIZE=9 SCALEHACKX=1.05 SCALEHACKY=1.05

You will of course need to have your selected font installed, but installing fonts on Linux is also outside the scope of this post.

So, putting it all together, running Aurora might look like:
Code: [Select]
FONT_NAME="Cantarell" FONT_SIZE=7.5 SCALEHACKX=1.0225 SCALEHACKY=1.01 LC_ALL=C MONO_IOMAP=all mono Aurora.exe
(I recommend creating an alias once you've found parameters with which you are comfortable.)

Note: DO NOT attempt to change your race picture, ship picture, spacestation picture or flag from inside the game. It either simply won't work, or may cause errors. Either accept the random chosen pictures you get when you create a new race, or, since Steve has been magnanimous in leaving the database unlocked, you can manually change the relevant entries in the FCT_Race table in AuroraDB.db. Instructions on how to manage an SQLite database are also outside the scope of this post.

For me this appears to work better than WINE, in fact.

Edit: Fixed the Selection Listbox issue and a critical font-scaling issue that was cutting off parts of the UI. (Note for posterity: this all involves changes to Mono and does not touch anything of Steve's.)
Title: Re: Aurora C# for Linux?
Post by: Rastaman on April 14, 2020, 01:02:01 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.
Title: Re: Aurora C# for Linux?
Post by: Jovus on April 14, 2020, 01:23:05 PM
Here's the one I used. Unzip, run bash Setup/compile-interop-assembly-release.sh; that'll drop a bin/ somewhere with the relevant files. (I don't remember where; might be in your home directory.)
Title: Re: Aurora C# for Linux?
Post by: Jovus 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.
Title: Re: Aurora C# for Linux?
Post by: Rastaman 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.
Title: Re: Aurora C# for Linux?
Post by: Jovus 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.
Title: Re: Aurora C# for Linux?
Post by: Jovus 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.
Title: Re: Aurora C# for Linux?
Post by: Rastaman 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:
=================================================================
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage 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.
Title: Re: Aurora C# for Linux?
Post by: Rastaman 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.
Title: Re: Aurora C# for Linux?
Post by: db48x 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.
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage 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.
Title: Re: Aurora C# for Linux?
Post by: Jovus 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.
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage 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.
Title: Re: Aurora C# for Linux?
Post by: db48x 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?
Title: Re: Aurora C# for Linux?
Post by: Jovus 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.
Title: Re: Aurora C# for Linux?
Post by: db48x 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.
Title: Re: Aurora C# for Linux?
Post by: se5a 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.
Title: Re: Aurora C# for Linux?
Post by: se5a on April 26, 2020, 07:26:08 PM
BTW top kudos to cpw who not only managed to figure out what was causing the crash in libgdiplus, but fixed it, *and* submitted a pull request *and* got it accepted.
Title: Re: Aurora C# for Linux?
Post by: Jovus on April 28, 2020, 11:22:43 AM
Jovus 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.

That's a good idea. Real life is kicking my butt at the moment or I probably would have already. That said, feel free: decompiling the DLLs into a mono fork should be super-easy.
Title: Re: Aurora C# for Linux?
Post by: db48x on April 29, 2020, 07:10:12 PM
Is anyone else unable to create waypoints when using Mono to run Aurora? Works fine in wine.
Title: Re: Aurora C# for Linux?
Post by: Rastaman on April 30, 2020, 04:51:34 AM
Is anyone else unable to create waypoints when using Mono to run Aurora? Works fine in wine.

I'm unable to set waypoints too.

There are also constant Function #2661 and #2662 error popups, which on windows are connected to an outdated dotnet installation according to Steve.
Title: Re: Aurora C# for Linux?
Post by: db48x on April 30, 2020, 08:30:27 AM
There are also constant Function #2661 and #2662 error popups, which on windows are connected to an outdated dotnet installation according to Steve.

That can probably be fixed by installing a newer version of Mono. What version do you have installed? I have 6.8.0.105 and don't get those errors.
Title: Re: Aurora C# for Linux?
Post by: Rastaman on April 30, 2020, 02:21:41 PM
There are also constant Function #2661 and #2662 error popups, which on windows are connected to an outdated dotnet installation according to Steve.

That can probably be fixed by installing a newer version of Mono. What version do you have installed? I have 6.8.0.105 and don't get those errors.


I thought so too, so I'm using the nightly Mono releases, where I think the inputs of our Aurora-Mono-Team are already implemented. They are at 6.10.0.104 as of today, but the errors keep coming. Before that I used the stable release version you are using. I even tried on a fresh virtual machine install, to no avail. The next thing to do is use a different distro altogether. Ubuntu might just not work.
Title: Re: Aurora C# for Linux?
Post by: Rastaman on April 30, 2020, 04:41:20 PM
Tried it in Fedora 32, no change, there's still the following message:

Function #2662: Could not load file or assembly 'System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.

Function #2661 also comes up regularly with exactly the same message.

I have mono 6.13.0.137 installed under Fedora and 6.10.0.104 under Ubuntu, which are both the current nightly builds.

So there must be something I'm doing wrong, but I don't know what. I'm installing mono-complete.
Title: Re: Aurora C# for Linux?
Post by: db48x on April 30, 2020, 06:17:22 PM
Tried it in Fedora 32, no change, there's still the following message:

Function #2662: Could not load file or assembly 'System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.

Function #2661 also comes up regularly with exactly the same message.

I have mono 6.13.0.137 installed under Fedora and 6.10.0.104 under Ubuntu, which are both the current nightly builds.

So there must be something I'm doing wrong, but I don't know what. I'm installing mono-complete.

I've seen those two messages intermittently; it has something to do with recovering facilities or tech from ruins. It's a pretty odd message, given the circumstances.
Title: Re: Aurora C# for Linux?
Post by: se5a on May 04, 2020, 04:02:48 PM
yeah I'm also having the problem with waypoints. not sure whats going on there.
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage on May 04, 2020, 04:21:44 PM
That looks like a missing dependency.  The fun part is that I can't find it on my system either, despite not getting those errors.  Will keep looking.  Note: I'm running under wine-mono rather than native mono, but that might still provide useful info.

Edit: Aurora might be trying to load the Entity Framework PluralizationService to do text formatting.

Edit2: I can't find anything current, so this might be a red herring, but there are old reports that mono's PluralizationService has problems if your language settings are set to something other than English.

Edit3: I just updated wine-mono to 5.0.0 and Aurora is now completely unplayable.
Console error message: fixme:mscoree:parse_supported_runtime sku=L".NETFramework,Version=v4.0" not implemented

This error did not occur before the upgrade, version was 4.9.4.

Those of you running under native mono, are you seeing anything similar?

Never mind.  It appears that wine-staging 5.7 is broken.  Updating to mono 5.0.0 within staging 5.6 works.  Sorry about the noise.

Edit4: And now I'm getting errors 2662 and 2661 in wine.
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage on June 01, 2020, 12:19:42 PM
So, I just tried installing .net in wine to run Aurora.

Upside: File dialogs work so images can be selected.   ;D
Downside: Fuel consumption calculations are utterly borked.   :o

While 10HS and 0.1HS engines are handled correctly, a 9.9HS Nuclear Thermal Engine with 95% Engine Power and 1L/EPH Fuel Consumption should use 41.57L/h, not 0.07L/h.  This isn't a just display glitch, either.

Tested with .net 4.0, 4.7.2, and 4.8 in both 32 and 64 bit prefixes.  All show exactly the same bug.
Wine-mono gets it right.

???
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage on June 02, 2020, 01:18:05 AM
I finally got Aurora working on native Mono using Jovis' updated instructions.  cpw's patch made the difference.

Mono JIT compiler version 6.8.0.123 (tarball Tue May 12 15:15:28 UTC 2020)
AuroraLinuxLibs.zip
Trunk version of libgdiplus.so.0 built from source.

Up sides:
Aurora starts in a quarter of the time.
Tactical map redraw/zoom/scroll are all near-instant, even in Sol with all asteroids visible.
Aurora doesn't hang on exit.

Down sides:
Switching tabs in any window has obnoxious flicker, filling with light grey before anything is drawn.
The mouse wheel scrolls whatever control has keyboard focus rather than the control the mouse is over.
Can't set waypoints.  Once the process is started, the mouse pointer gets stuck as a '+' and the operation can't be cancelled.
Layout errors resulting in missing controls.

Changing images still doesn't work.  The change image dialog returns a bogus path unless you manually select the directory. (/path/to/aurora/Races/Races/Races123.bmp)  Even if you do, Aurora still chokes on *nix paths trying to split off the file name.

Create New Race window:
The mouse cursor gets stuck showing a busy indicator.

Deleting the stock game after creating a new campaign gives:
1.11.0 Function #1699: list position
Trying to select an existing game in the drop-down then asks if the player wants to quit.

Selecting 'Play Game' gives:
1.11.0 Function #1690: Year, Month, and Day parameters describe an un-representable DateTime.
1.11.0 Function #1355; An item with the same key has already been added. Key: 3
1.11.0 Function #1690: Year, Month, and Day parameters describe an un-representable DateTime.
1.11.0 Function #1355; An item with the same key has already been added. Key: 3
1.11.0 Function #1690: Year, Month, and Day parameters describe an un-representable DateTime.
And then #1690 forever.  Aurora must be killed and restarted.

This logged to console twice:
Code: [Select]
System.IndexOutOfRangeException: list position
  at System.Windows.Forms.CurrencyManager.get_Current () [0x00022] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.CurrencyManager.EndCurrentEdit () [0x0000d] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.CurrencyManager.set_Position (System.Int32 value) [0x00043] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.ListControl.OnSelectedIndexChanged (System.EventArgs e) [0x0002f] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.ComboBox.OnSelectedIndexChanged (System.EventArgs e) [0x00000] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.ComboBox+ComboListBox.OnMouseUp (System.Windows.Forms.MouseEventArgs e) [0x00093] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x0007e] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x0016f] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.ComboBox+ComboListBox.WndProc (System.Windows.Forms.Message& m) [0x00019] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x0000b] in <c03d10ee440e4eee8278e61d3b7f025c>:0
  at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x0008e] in <c03d10ee440e4eee8278e61d3b7f025c>:0

All-in-all a much better impression than the last time I tried it.

@Jovus would it be possible to get access to the source code for your 'horrible kludges', or at least a hint as to what you did?  Using FONT_NAME="Liberation Sans" without the FONT_SIZE or SCALEHACK* parameters almost nails it and I'd like to try my hand against the remaining  ~3 pixel error in text positioning that is still causing grief.
Title: Re: Aurora C# for Linux?
Post by: db48x on June 04, 2020, 02:08:26 PM
Has anyone else tried 1.11.1 successfully? With mono 6.8.0.123 I get a crash; here's an excerpt of the stack trace that it prints:

        0x7f3d0de568d9 - /lib64/libc.so.6 : abort
        0x7f3d0deb14af - /lib64/libc.so.6 : (null)
        0x7f3d0deb8a9c - /lib64/libc.so.6 : (null)
        0x7f3d0deba920 - /lib64/libc.so.6 : (null)
        0x7f3cff44efa9 - /lib64/libgdiplus.so.0 : GdipDeletePen
        0x4150cff3 - Unknown

In wine 5.7 w/ wine-mono it seems to go into an infinite loop while rendering the system view. Possibly it's just really slow and it will finish eventually; I only gave it about five minutes before I killed it.
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage on June 04, 2020, 05:59:15 PM
Has anyone else tried 1.11.1 successfully? With mono 6.8.0.123 I get a crash; here's an excerpt of the stack trace that it prints:

        0x7f3d0de568d9 - /lib64/libc.so.6 : abort
        0x7f3d0deb14af - /lib64/libc.so.6 : (null)
        0x7f3d0deb8a9c - /lib64/libc.so.6 : (null)
        0x7f3d0deba920 - /lib64/libc.so.6 : (null)
        0x7f3cff44efa9 - /lib64/libgdiplus.so.0 : GdipDeletePen
        0x4150cff3 - Unknown

In wine 5.7 w/ wine-mono it seems to go into an infinite loop while rendering the system view. Possibly it's just really slow and it will finish eventually; I only gave it about five minutes before I killed it.
Unless you are posting from the future, I think you mean 1.11.0.  :)

Native mono requires a trunk version of libgdiplus due to a bug in the current release version.  It isn't hard to build it from source.

To build libgdiplus.so.0, in an empty directory run:
Code: [Select]
git clone https://github.com/mono/libgdiplus libgdiplus
cd libgdiplus
./autogen.sh
make
mv ./src/.libs/libgdiplus.so.0.0.0 ../libgdiplus.so.0
then move libgdiplus.so.0 into your Aurora directory.

Wine 5.7 and newer automatically install wine-mono-5.0.0, which is bugged all to hell.  You will need to download and manually install the wine-mono-5.0.1-x86.msi from https://github.com/madewokherd/wine-mono/releases
Title: Re: Aurora C# for Linux?
Post by: db48x on June 04, 2020, 07:10:27 PM
Yes, that was a typo.

I think this is a different bug, since I've used this version of mono/libgdiplus before, unless something has gone wrong… Anyway, I filed a bug for this crash, see https://github.com/mono/libgdiplus/issues/653 for the details I was able to figure out.
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage on June 04, 2020, 07:19:44 PM
Yes, that was a typo.

I think this is a different bug, since I've used this version of mono/libgdiplus before, unless something has gone wrong… Anyway, I filed a bug for this crash, see https://github.com/mono/libgdiplus/issues/653 for the details I was able to figure out.
Your backtrace indicates that you are using a system provided libgdiplus, and it is identical to the last 6 lines of Rastaman's report here: http://aurora2.pentarch.org/index.php?topic=10320.msg127393#msg127393
That bug is fixed in master but hasn't been officially released yet, so you will need to build libgdiplus from source as per the instructions I posted above, at least until the next official release.
Title: Re: Aurora C# for Linux?
Post by: db48x on June 05, 2020, 02:52:42 AM
Your backtrace indicates that you are using a system provided libgdiplus, and it is identical to the last 6 lines of Rastaman's report here: http://aurora2.pentarch.org/index.php?topic=10320.msg127393#msg127393
That bug is fixed in master but hasn't been officially released yet, so you will need to build libgdiplus from source as per the instructions I posted above, at least until the next official release.

You're right, it's the same bug that was previously fixed; dunno how I missed that. What's really weird is that I this definitely used to work, but I've never actually built libgdiplus before. I suppose I must have had a beta or nightly build of the mono or libgdiplus RPM installed, though I have the stable version installed at the moment. Maybe I should have been keeping notes as I went along.

Sadly with that bug out of the way, I can confirm that I get the same infinite loop of "Function #1690: Year, Month, and Day parameters describe an un-representable DateTime." when creating a new game that you reported. (I didn't remove the existing one first though.)
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage on June 05, 2020, 05:19:04 PM
Your backtrace indicates that you are using a system provided libgdiplus, and it is identical to the last 6 lines of Rastaman's report here: http://aurora2.pentarch.org/index.php?topic=10320.msg127393#msg127393
That bug is fixed in master but hasn't been officially released yet, so you will need to build libgdiplus from source as per the instructions I posted above, at least until the next official release.

You're right, it's the same bug that was previously fixed; dunno how I missed that. What's really weird is that I this definitely used to work, but I've never actually built libgdiplus before. I suppose I must have had a beta or nightly build of the mono or libgdiplus RPM installed, though I have the stable version installed at the moment. Maybe I should have been keeping notes as I went along.

Sadly with that bug out of the way, I can confirm that I get the same infinite loop of "Function #1690: Year, Month, and Day parameters describe an un-representable DateTime." when creating a new game that you reported. (I didn't remove the existing one first though.)
Easy mistakes are easy.  :)

The #1690 loop can be escaped by killing and restarting Aurora.  What I think is happening is that Mono isn't updating the listbox properly when a game is created or deleted, so a non-existent game ID gets selected.  Aurora then chokes on that.  I've also noticed that exceptions that don't pop up Aurora's error windows instead ask if you want to close the game.
Title: Re: Aurora C# for Linux?
Post by: db48x on June 06, 2020, 01:41:12 AM
Yea, you can certainly kill Aurora. Does it let you save at all? I can't click the button before another error pops up, so I have no idea if the new game is even close to playable.
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage on June 06, 2020, 06:51:07 AM
Yea, you can certainly kill Aurora. Does it let you save at all? I can't click the button before another error pops up, so I have no idea if the new game is even close to playable.
You have to* save before the error comes up the first time, which means before opening the Game Information window again.  Once the bug hits, that's it.

*I could be wrong about this.  I know that creating a new game writes to the database, but I'm not certain if it is a complete write-out or not.
Title: Re: Aurora C# for Linux?
Post by: db48x on June 06, 2020, 06:42:33 PM
I get those errors while creating the new game, before it asks me to create my race.
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage on June 07, 2020, 11:30:51 PM
I get those errors while creating the new game, before it asks me to create my race.
That is odd.  On further testing I only get those errors when deleting IoM.  When creating and deleting my own games, whether IoM is present or not, there are no errors.  I was overly paranoid about needing a manual save immediately after creating a new game, but it seems that you aren't even getting that far.

Just to double check, this is the sha256 checksum of the original 1.11.0 database that I have:
811974ea8697ddb7f93ecdce5747c188e5bea5f5b60bb1f586a221eecb4ebebe  AuroraDB.db
Title: Re: Aurora C# for Linux?
Post by: db48x on June 12, 2020, 03:45:24 AM
Yep, I have exactly the same database.
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage on June 12, 2020, 04:13:56 AM
Yep, I have exactly the same database.
Then it isn't a corrupted database.

These are the sha256 check-sums of all of the executable files in my Aurora directory.  libgdiplus.so.0 is a custom build so it probably won't match your setup.  If they all check out then the next step is to check your mono installation.
Code: [Select]
c8107e0124fdfc44a515a5c0fc7ecf154e14dbca912f3005e58204550967fdd7 *Aurora.exe
e11b97ccc0c7b512112873bb926975d129fd61dfb2a75025751899e85d5d0f91 *EntityFramework.dll
c242bb34d37309de566622a23f84efa07f764088bb2f1e6a6192c9ef7362daa8 *EntityFramework.SqlServer.dll
5e5cffcc5d88f407ac4652cb4b038680eacfab0e79ea0307895c43c4c92d0edd *SQLite.Interop.dll
a844cb7b3817d3322c9e132d632c63bba05b568eb8ab1817f502b51a7aaf9d91 *System.Data.SQLite.dll
54e3fb569ddebb6481fe249605fb4e77a9a2cec95795433aacbbec6e1400e103 *System.Data.SQLite.EF6.dll
43276473f90385ec4d1223baff91f30c0056696d77bb33029d03c5778c3a709c *System.Data.SQLite.Linq.dll
24eb43c562c1c2e1347f84a965fa85a1cfbd69d337992f2c852f42fab641a5ee *System.Drawing.dll
abea4fe8ee0caff813f1518d9b9739b6f9d28b64a7c311a489433a1c0789cc0c *System.Windows.Forms.dll
f9e013dfb31f2b7e6af00c8a28a4b01432915fbee18eef8d48e747683287df73 *EntityFramework.SqlServer.xml
1d2e87ae8f3b10345b623ce724f64b93ea829de9f422fbbee34c4aa6e1fbdfa4 *EntityFramework.xml
da66a2cfbfe1fc8bd04cfcba333b83a54329a5428f070d97710baa371f04de3b *System.Data.SQLite.xml
5e5cffcc5d88f407ac4652cb4b038680eacfab0e79ea0307895c43c4c92d0edd *libSQLite.Interop.so
9e9d73b88bfa26296eaca83fb8ecd1a7639f939eba4efa0abad00e35a7776ac2 *Aurora.exe.config
c16a77f6ca43db6003ccf1fe5acc36586b05c4389d1ac3f025cc1b780ea845ed *libgdiplus.so.0

I'm running the official 6.8.0.123-0xamarin2+debian10b1 packages from mono-project.com.

$ mono --version
Mono JIT compiler version 6.8.0.123 (tarball Tue May 12 15:15:28 UTC 2020)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
   TLS:           __thread
   SIGSEGV:       altstack
   Notifications: epoll
   Architecture:  amd64
   Disabled:      none
   Misc:          softdebug
   Interpreter:   yes
   LLVM:          yes(610)
   Suspend:       hybrid
   GC:            sgen (concurrent by default)

Beyond that, I'm not sure.
Title: Re: Aurora C# for Linux?
Post by: db48x on June 14, 2020, 08:39:03 PM
Yes, all the binaries except libgdiplus.so have matching sha256 sums as well. I even have the same version of mono as you. The only other thing I can think of is that we're starting games with different settings. I get these errors even when starting a new game with the default settings (even the game name is still "New Game Name", so probably that's not it.
Title: Re: Aurora C# for Linux?
Post by: SpikeTheHobbitMage on June 15, 2020, 07:44:13 PM
Yes, all the binaries except libgdiplus.so have matching sha256 sums as well. I even have the same version of mono as you. The only other thing I can think of is that we're starting games with different settings. I get these errors even when starting a new game with the default settings (even the game name is still "New Game Name", so probably that's not it.
Another possibility is that Aurora doesn't like your locale settings.  Try running Aurora with LC_ALL="C".
If you run 'locale' from the command line does it report errors?  If so then you have a corrupt locale database and you need to run 'locale-gen' as root to rebuild it.
Title: Re: Aurora C# for Linux?
Post by: db48x on June 16, 2020, 08:48:20 AM
An interesting idea, but that's not it.
Title: Re: Aurora C# for Linux?
Post by: db48x on July 29, 2020, 03:13:17 PM
Well, it works again. When I finally upgraded to Fedora 32 I saw that included an update to both wine and mono (versions 5.13 and 6.10.0.104, respectively) so I gave Aurora a go. It now works as well as ever when running it either way. No clue what the problem was though.
Title: Re: Aurora C# for Linux?
Post by: firefly2442 on August 08, 2020, 06:26:04 PM
I posted on Discord (#aurora-linux) about this but I thought it would be good to post here too.   I worked on a Docker version that leverages VNC.   You can play it via your web-browser on Linux, Mac, etc.

https://github. com/firefly2442/aurora4x-docker

I tried to leverage all the work that others did around Mono and other fixes.

Have fun.
Title: Re: Aurora C# for Linux?
Post by: roug on December 01, 2020, 06:40:46 AM
I am thinking of jumping ship to Linux (Ubuntu 18.04/ 20.04) are there any guides to help me install Aurora on Linux?
Title: Re: Aurora C# for Linux?
Post by: QuakeIV on December 01, 2020, 09:53:01 PM
My personal recommendation that has worked really well for me (very little performance drop compared to WINE) is to set up VMWare player (home license is free) plus a cheapo windows 10 image such as this one:

https://www.ebay.com/itm/Microsoft-Windows-10-Home-64-Bit-Full-Version-DVD-Product-Key-System-Builder-/284093119287?hash=item422544fb37

Generally speaking its possible to get one for around 30 bucks and then install it onto the VM which is not too bad.

addendum: I think it should be pointed out WINE really does not seem to work for me, it sortof half limps along but it crashes periodically and is extremely slow (i think mainly its struggling to update the UI elements and its waiting for that to complete prior to moving on to the next frame).
Title: Re: Aurora C# for Linux?
Post by: sisso on December 02, 2020, 02:34:47 AM
The docker virtual env from hxxp: aurora2. pentarch. org/index. php?topic=10320. msg139746#msg139746 is a good alternative.  It is running on mono, not wine.  There are a few issues, like unable to place waypoints.

Quote
Generally speaking its possible to get one for around 30 bucks and then install it onto the VM which is not too bad.

Without entering into a license debate, "cheap" windows licenses are OEM, and it has its own set of random rules.  That I almost sure don't include virtual machines.

Anyway, better than 30 is free.  Microsoft has available some pre-build development virtual machines for trial:

https://developer. microsoft. com/en-us/windows/downloads/virtual-machines/
Title: Re: Aurora C# for Linux?
Post by: roug on December 02, 2020, 07:51:39 AM
I got Windows 10 pro and Home, so its no problems, donwloading KDE Neon now, so i am going for the VM options, i only need Windows for Aurora4x.
Title: Re: Aurora C# for Linux?
Post by: QuakeIV on December 02, 2020, 11:13:38 PM
Ostensibly they dont care, as long as you dont try to create multiple VM instances with it.

https://answers.microsoft.com/en-us/windows/forum/windows_10-windows_install-winpc/reusing-an-oem-windows-license-in-a-vm/279dea8f-2100-434d-99c1-c9d5cf37241a
Title: Re: Aurora C# for Linux?
Post by: Rastaman on December 26, 2020, 12:06:19 AM
The pre-built virtual machine runs Aurora faster than Mono here. Linux Aurora seems to be dead.
Title: Re: Aurora C# for Linux?
Post by: SpookyZalost on September 04, 2022, 11:59:42 PM
Since there really isn't another topic and in the interest in keeping things in once place, going to post an update.

first, using the instructions on page 2 by Jovus and under mono 6. 12. 0. 182 on Ubuntu 22. 04 the game runs with only a couple issues but nothing preventing it from running.

there are some errors in the terminal stating the following.

Code: [Select]
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB

but I suspect this has more to do with Libpng being more stringent with the RGB profiles and the images just needing to be opened and re-saved, no big.

besides the aforementioned issues locating images which was addressed in the bottom post on page 1 by lupin with issues with file system trees and not locating files.

Besides not being able to select images when designing your race though everything else went smoothly.

The following seemed to work out of the box for the most part for starting the game via terminal, best if loaded from the game's directory.

Quote from: Jovus link=topic=10320. msg122543#msg122543 date=1586880558
Code: [Select]
FONT_NAME="Cantarell" FONT_SIZE=7.5 SCALEHACKX=1.0225 SCALEHACKY=1.01 LC_ALL=C MONO_IOMAP=all mono Aurora.exe

Only real issue I'm running into is game windows and tabs being a bit bigger than the box they're in.

for example on waypoints I'm missing the add waypoint option which I suspect is below the edge of the box in the system menu.

I suspect adjusting the scalehack parameters might fix this and will report back if there's a noticeable difference and if so experiment to see if there's other issues with the waypoints still as others have pointed out.

I know Linux support is experimental at best but that's the state of it right now.   it works, for the most part and I'll tinker with the scaling to see about the waypoints, but for all intents and purposes the game works, under mono, in Linux, no crashing so far either.
Title: Re: Aurora C# for Linux?
Post by: siekster on January 04, 2024, 02:46:03 PM
Arise!!

Played this game many years ago, and got a hankering to play it once again.   However, in the meantime, I've made the change to Linux, and was bummed to read about the mixed results folks have had in getting it to work.

I've had some pretty decent success in getting games to work under proton via Steam.   So on a whim, I installed the game, along with the latest patch, and added it as a non-steam game in Steam.   Switched the compatibility mode to Proton Experimental, and the game fired right up! 

I haven't played it a ton yet, so there may need to be some further tweeking, but everything appears to be functional at this point.   Playing on Linux Mint with the Cinnamon DE.



Title: Re: Aurora C# for Linux?
Post by: Droll on January 04, 2024, 06:42:12 PM
Arise!!

Played this game many years ago, and got a hankering to play it once again.   However, in the meantime, I've made the change to Linux, and was bummed to read about the mixed results folks have had in getting it to work.

I've had some pretty decent success in getting games to work under proton via Steam.   So on a whim, I installed the game, along with the latest patch, and added it as a non-steam game in Steam.   Switched the compatibility mode to Proton Experimental, and the game fired right up! 

I haven't played it a ton yet, so there may need to be some further tweeking, but everything appears to be functional at this point.   Playing on Linux Mint with the Cinnamon DE.

This is reassuring, haven't had the chance to touch it on my linux machine yet, I'll have to see if aurorapatch mod also works this way.
Title: Re: Aurora C# for Linux?
Post by: ISN on January 04, 2024, 07:05:34 PM
Arise!!

Played this game many years ago, and got a hankering to play it once again.   However, in the meantime, I've made the change to Linux, and was bummed to read about the mixed results folks have had in getting it to work.

I've had some pretty decent success in getting games to work under proton via Steam.   So on a whim, I installed the game, along with the latest patch, and added it as a non-steam game in Steam.   Switched the compatibility mode to Proton Experimental, and the game fired right up! 

I haven't played it a ton yet, so there may need to be some further tweeking, but everything appears to be functional at this point.   Playing on Linux Mint with the Cinnamon DE.

For some reason when I try this all of the buttons are an absolutely unreadable yellow text on white background... but I got it to work with an older version, Proton 7.0-6. The interface doesn't seem to work very well though; things have weird proportions or get cut off and it's pretty slow and unresponsive.
Title: Re: Aurora C# for Linux?
Post by: Droll on January 14, 2024, 07:41:51 PM
Arise!!

Played this game many years ago, and got a hankering to play it once again.   However, in the meantime, I've made the change to Linux, and was bummed to read about the mixed results folks have had in getting it to work.

I've had some pretty decent success in getting games to work under proton via Steam.   So on a whim, I installed the game, along with the latest patch, and added it as a non-steam game in Steam.   Switched the compatibility mode to Proton Experimental, and the game fired right up! 

I haven't played it a ton yet, so there may need to be some further tweeking, but everything appears to be functional at this point.   Playing on Linux Mint with the Cinnamon DE.

For some reason when I try this all of the buttons are an absolutely unreadable yellow text on white background... but I got it to work with an older version, Proton 7.0-6. The interface doesn't seem to work very well though; things have weird proportions or get cut off and it's pretty slow and unresponsive.

So I've just run the game and played it a bit on Linux Mint Cinnamon.

I play with AuroraPatch wit the Solaris Theme so I added AuroraPatch.exe as a non steam game and forced Proton Experimental. Game worked with no fuss, even tried changing the flag of an alien race without the game crashing like it has for some using other methods.

The font in my case is different but quite readable. The main issues I've encountered are consisted with what siekster has said.

So if you are having problems with unreadable text using a theme mod with AuroraPatch might help.
Title: Re: Aurora C# for Linux?
Post by: Diti on March 06, 2024, 04:45:08 PM
Quote from: firefly2442 link=topic=10320. msg139746#msg139746 date=1596929164
I posted on Discord (#aurora-linux) about this but I thought it would be good to post here too.    I worked on a Docker version that leverages VNC.    You can play it via your web-browser on Linux, Mac, etc. 

https://github.  com/firefly2442/aurora4x-docker

I tried to leverage all the work that others did around Mono and other fixes. 

Have fun.

I just wanted to add to this that the docker image that firefly2442 has created works really well and fixed both display and window size issues that I was having just running natively with wine or proton.
https://aurora2. pentarch. org/index. php?topic=10320. msg139746#msg139746

I am getting a bunch of no image found issues but that might be due to my version or maybe the test civilization.  I can just skip through the errors.

I used podman because it was easier to setup with purely command line.  Docker desktop seemed like overkill.

Thanks firefly2442 for keeping the image up to date as well!

If I may suggest creating a separate version of the container every time there is a save-incompatible update.