goatcorp / FFXIVQuickLauncher

Custom launcher for FFXIV
https://goatcorp.github.io/
GNU General Public License v3.0
2.76k stars 327 forks source link

XivLauncher Next #392

Open Minoost opened 3 years ago

Minoost commented 3 years ago

Currently, both XL and Dalamud heavily depends on .NET framework. When we started a project, this was deemed enough as .NET Core was still relatively new and wasn't on feature parity with the framework, leaving us no options to choose from.

This isn't the case anymore since the release of .NET Core 3 but we're still stuck on the .NET framework, limiting us from making improvements and performant.

This issue tracks the current state of XL, Dalamud and its migration plan to .NET 6.


Notes: Before you might even ask, yes, English is not my mother tongue. I mostly picked it up as an adult. If you need some clarifications or something just feels off (mostly "hahaha Engrish hahaha") as you read through this, feel free to leave a comment below.


What are the issues?

We can't just ignore people on Linux

Albeit we don't officially support nor actively test for linux compatibility, linux users are here to stay. We want to use cross platform gui framework if possible.

Some APIs are unavailable on .NET framework

Reinstalling under Fedora 33 · Issue #360 · goatcorp/FFXIVQuickLauncher

It appears to be that patch-gamever.ffxiv.com has a weak Diffie-Hellman key by the modern standards which causes a http client (anything backed by openssl or rustls) to refuse a connection to the server.

ciphers (sigh SE, please fix this if you see this...)

To get around this, we have to explicitly set accepted ciphers to TLS_RSA_WITH_AES_256_GCM_SHA384 via CipherSuitesPolicy.AllowedCipherSuites property. This property was introduced in .NET Core 3 so we can't fix the issue without first moving to the new .NET runtime.

We want to rewrite XL anyway

TBD; a link to internal discussions, etc...

Considerations/Goals

Open questions

Related

Aida-Enna commented 3 years ago

I actually contacted the person who made that second design (for the FFXIV Fan launcher I had originally planned before I discovered goat's), I believe they sent me the assets. I'll have to see if I can find them again.

goaaats commented 3 years ago

The current XL design just exists because I needed something better. I'm not good at UI design so it mostly just had to be functional - open to any changes, probably a good idea to do it with a rewrite.

Aida-Enna commented 3 years ago

I was only able to find two of the assets from what they sent me, but I contacted them on discord to see if they still have them all (or remember how they sent them to me so I can download them again).

textbox login_button

Although it'd be interesting if we made the app themable, with the ability for people to make custom ones.

karashiiro commented 3 years ago

If we want to target Blazor Desktop, Blazor on Electron might not be an awful idea, since most of that could be ported later. If Avalonia is the final choice, then we’re pretty much stuck with it. Alternatively, we can just defer that decision and do everything without UI until a Blazor Desktop preview comes out so we can test it and compare them properly. I don’t think we have any word on a timeline for that yet, though.

goaaats commented 3 years ago

Most of the code in XL is UI - the actual "business logic" could of course do with a rewrite and we should take that opportunity, but a big chunk of the work will be UI based.

As such I believe we shouldn't start without a solid UI decision.

LinuxDonald commented 3 years ago

I'm not an expert but Linux user. And my question is why not use mono as an replacement for .net?

reiichi001 commented 3 years ago

I'm not an expert but Linux user. And my question is why not use mono as an replacement for .net?

You can already compile xivlauncher using mono if you so desire. .Net 5 (and 6) are cross-platform unlike .Net Framework, which is what mono reimplemented.

karashiiro commented 3 years ago

Is there an issue with plain-old webview? webview/webview uses Edge with Webview2 on Windows, but according to the README it uses other backends on other operating systems just fine. There's also a C# wrapper.

Minoost commented 3 years ago

Is there an issue with plain-old webview? webview/webview uses Edge with Webview2 on Windows, but according to the README it uses other backends on other operating systems just fine. There's also a C# wrapper.

WebView crashes on launch when it's launched through wine. (dotnet publish -r win-x64) This might be a deal breaker if we want to support linux. (tested on fedora 34) image crash.txt

However, if we build a binary native to linux then it works fine. image


As a side note, I've also tested Avalonia on wine image (left window is -r linux-x64, right window is -r win-x64) untitled

goaaats commented 3 years ago

What browser does it use if you build a Linux binary? Do you need to ship it?

Minoost commented 3 years ago

What browser does it use if you build a Linux binary?

{
  "user-agent": "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15"
}

image

It appears to be webkit. We probably don't need to ship libwebkit2gtk because the chances are it's already installed. (Even if it's missing people could just type dnf install libwebkit2gtk or apt install libwebkit2gtk)

Vash63 commented 3 years ago

What browser does it use if you build a Linux binary? Do you need to ship it?

Is it really worth making it a Linux binary? As a Linux user this would add the complexity of needing the launcher to then load wine before loading the game itself. If you could instead have the Windows binary be wine-compatible then the entire thing could just be loaded in wine by Steam or Lutris or whatever the user uses to manage Wine bottles.

Maia-Everett commented 3 years ago

As a Linux user, I would be interested in a native Linux binary if it supported Dalamud, which is currently broken under recent versions of Wine.

reiichi001 commented 3 years ago

As a Linux user, I would be interested in a native Linux binary if it supported Dalamud, which is currently broken under recent versions of Wine.

Wine will still always be required, even if/when XIVLauncher gets ported over to .Net 5 (or more like,y 6). There probably aren't any major merits in a native Linux binary over running one made for Windows in this case. XIVLauncher would still need to call a Windows-based FFXIV and Windows-based Dalamud, and a native launcher would likely cause some hurdles when it comes to Lutris. (Especially if XL continues to autoupdate the same way it does, where most Linux users would continue to use the Windows exe anyways).

Dalamud's .Net 5 port in progress is also being tested on Linux to ensure that it runs on modern versions of Wine. (In the case of the current version, it doesn't because Wine introduced a breaking change and broke EasyHook, which is largely out of our control).

yaomtc commented 3 years ago

If you rely on Lutris, or Flatpak, you could connect a version of Wine that is known to work. As long as it's tested and known to work, Linux FFXIV players should be fine with it since the game will need Wine/Proton anyway.

Maia-Everett commented 3 years ago

I use regular Wine, without Lutris. Since all I need from Dalamud is chat bubbles, it's not worth running FFXIV under old Wine for me, and I can wait until the .NET 5 version. That it will support modern Wine is great news!

karashiiro commented 2 years ago

I heard you like Flutter (might not like Go but eh).

With Flutter it'd also be easy to hide the titlebar and then make a Metro-style thing.

karashiiro commented 2 years ago

There's also the official Flutter desktop bindings but those use C++, so I can't speak for how simple cross-platform builds are. I've also worked with the Dart plugin system a bit in C++ and can say that it's not very fun.

Minoost commented 2 years ago

n.b. xivlauncher-neo https://github.com/goaaats/xivlauncher-neo

dimkasta commented 2 years ago

I am not very fluent in the .net ecosystem. But I remember that a while back ".NET native" allowed projects to be statically compiled and run without requiring .net frameworks to be installed.

Perhaps switching the releases from an installer to a statically linked executable could work until XL neo founds its pace?

Centzilius commented 2 years ago

Just a note: CipherSuitesPolicy is not compatible with windows but since windows does not need it we can just make it conditional. image image But it fixes the problem for linux users (did not test it on mac yet)