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

0 Members and 1 Guest are viewing this topic.

Offline Rastaman

  • Azhanti High Lightning
  • Sub-Lieutenant
  • ******
  • R
  • Posts: 144
  • Thanked: 8 times
Re: Aurora C# for Linux?
« Reply #15 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.
« Last Edit: April 12, 2020, 10:24:37 AM by Rastaman »
Fun Fact: The minimum engine power of any ship engine in Aurora C# is 0.01. The maximum is 120000!
 

pabilbado

  • Guest
Re: Aurora C# for Linux?
« Reply #16 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.
 

pabilbado

  • Guest
Re: Aurora C# for Linux?
« Reply #17 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?
 

Offline rumpel

  • Able Ordinary Rate
  • r
  • Posts: 1
Re: Aurora C# for Linux?
« Reply #18 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.
 

Offline Jovus

  • Lt. Commander
  • ********
  • J
  • Posts: 220
  • Thanked: 81 times
Re: Aurora C# for Linux?
« Reply #19 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.
 

Offline cpw11

  • Leading Rate
  • *
  • c
  • Posts: 6
  • Thanked: 4 times
Re: Aurora C# for Linux?
« Reply #20 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. .

« Last Edit: April 13, 2020, 10:32:11 AM by cpw11 »
 
The following users thanked this post: Jovus

Offline Paul Shakur

  • Petty Officer
  • **
  • Posts: 18
  • Thanked: 10 times
Re: Aurora C# for Linux?
« Reply #21 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.
 

Offline lupin-de-mid

  • Petty Officer
  • **
  • l
  • Posts: 25
  • Thanked: 1 times
Re: Aurora C# for Linux?
« Reply #22 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?
 

Offline Rastaman

  • Azhanti High Lightning
  • Sub-Lieutenant
  • ******
  • R
  • Posts: 144
  • Thanked: 8 times
Re: Aurora C# for Linux?
« Reply #23 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.
« Last Edit: April 13, 2020, 07:18:41 PM by Rastaman »
Fun Fact: The minimum engine power of any ship engine in Aurora C# is 0.01. The maximum is 120000!
 

Offline Rastaman

  • Azhanti High Lightning
  • Sub-Lieutenant
  • ******
  • R
  • Posts: 144
  • Thanked: 8 times
Re: Aurora C# for Linux?
« Reply #24 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?
Fun Fact: The minimum engine power of any ship engine in Aurora C# is 0.01. The maximum is 120000!
 

Offline Father Tim

  • Vice Admiral
  • **********
  • Posts: 2162
  • Thanked: 531 times
Re: Aurora C# for Linux?
« Reply #25 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.
 
The following users thanked this post: kks, SpikeTheHobbitMage, AlitarSemiramis, Ektor

Offline Retropunch

  • Petty Officer
  • **
  • R
  • Posts: 18
  • Thanked: 6 times
Re: Aurora C# for Linux?
« Reply #26 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.
 
The following users thanked this post: lordcirth

Offline Jovus

  • Lt. Commander
  • ********
  • J
  • Posts: 220
  • Thanked: 81 times
Re: Aurora C# for Linux?
« Reply #27 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.

  • Unpack Aurora somewhere. I'm going to refer to it as the basedir from here on out, but I don't care where it is.
  • Make sure you have a functional Mono implementation. Explanation of that is outside the scope of this post.
  • Unpack the provided AuroraLinuxLibs.zip in your basedir. This will place libSQLite.Interop.so, SQLite.Interop.dll, System.Windows.Forms.dll and System.Drawing.dll files into your basedir. The first three are critical, System.Drawing.dll contains custom handling to deal with how Steve has concatenated certain strings having to do with graphics files.
  • Run Aurora with the command MONO_IOMAP=all mono Aurora.exe from the basedir. Trying to run from somewhere else causes it not to be able to connect to the DB.

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.)
« Last Edit: April 18, 2020, 01:57:29 PM by Jovus »
 

Offline Rastaman

  • Azhanti High Lightning
  • Sub-Lieutenant
  • ******
  • R
  • Posts: 144
  • Thanked: 8 times
Re: Aurora C# for Linux?
« Reply #28 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.
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 #29 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.)