patchzyy / WheelWizard

WheelWizard, Retro Rewind Launcher
Other
41 stars 4 forks source link

macOS/linux Support? #3

Open ThomasAlban opened 4 months ago

ThomasAlban commented 4 months ago

Would be great! Not sure how possible this is in the current state of the project. I can see throughout your code you have using System.Windows which isn't a good sign!

rehtlaw commented 4 months ago

As far as I can tell, it's a WPF app, so the UI would have to be redone in something cross-platform (Avalonia for example). Good to know I'm not the only one wishing it wasn't Windows-only.

soccerboys2008 commented 4 months ago

hmm, after i saw this issue i decided to see if i can open it using wine on linux

well, sort of: Screencast from 07-09-2024 05:02:27 PM.webm

so a couple things

  1. can we change the title to "macOS and Linux Support"
  2. anything you guys want me to try after forcing it with wine (not sure exactly what this app is capable of, just immediately came here after hearing troy shout it out on his stream)
soccerboys2008 commented 4 months ago

as a note, whenever you click a tab or something in the app, i have to move the app to a different workspace in order to get it to render (as in the clip above), but it seems to be able to interact with wines interface

doubt it can launch dolphin on linux though (at least it won't be able to launch the flatpak version i have installed, which is the one everyone uses (cause nobody wants to compile it from source), if devs are curious we can open dolphin with a command using the terminal (in my case (and for all flatpak users) its "flatpak run org.DolphinEmu.dolphin-emu", but for those who compile from source, they can just add the binary to their path)

sonalder-darlene commented 4 months ago

I would also like having a linux version of the game as I run ChimeraOS and SteamOS with dolphin. This would make things easier ^^

patchzyy commented 4 months ago

yes, in order to release it for mac and linux we would have to port the program over using something like Avalonia. We will first continue to add all features to make the program fully functional, and after that we will explore the options of porting it to Avalonia for linux and mac OS. In the meantime you may manually install Retro Rewind here

soccerboys2008 commented 4 months ago

@sonalder-darlene have you been able to get retro rewind to work on linux using the manual method

rehtlaw commented 4 months ago

The manual install works just fine on any OS that Dolphin supports (with the path of Dolphin's Load directory adjusted of course, $HOME/.local/share/dolphin-emu/Load in Linux's case), it's just a matter of getting this updater to be compatible with MacOS/Linux as well.

soccerboys2008 commented 4 months ago

Yeah, I think I found the root cause

When I compiled dolphin from source it worked

But when I used the flatpak version of dolphin I got a empty message box with 2 options "start without saving" and return to retro rewind channel"

The difference between the flatpak version and my compile is only 2 thing

  1. The version (2407-39 (for the one I compiled), and 2407 (for flatpak))
  2. Flatpak version is sandboxed, amongst other things, permissions, etc.

So either dolphin devs already fixed whatever caused it, or there's an issue with the flatpak

Considering the tiny amount of dev versions between the 2

Its probably the flatpak

Screenshot from 2024-07-10 17-09-03

soccerboys2008 commented 4 months ago

And if it was something fixed by dolphin devs, then the flatpak just needs to be updated

EDIT: in reguards to the flatpak I already tried reinstall, clearing my settings (which also happened to remove my nand), etc. Same result

sonalder-darlene commented 4 months ago

@sonalder-darlene have you been able to get retro rewind to work on linux using the manual method

Yes it wasn't hard, I also managed to add it as a non steam game to the steam launcher. I'm using the flatpak version from EmuDeck

rehtlaw commented 4 months ago

Yeah, I think I found the root cause

When I compiled dolphin from source it worked

But when I used the flatpak version of dolphin I got a empty message box with 2 options "start without saving" and return to retro rewind channel"

The difference between the flatpak version and my compile is only 2 thing

  1. The version (2407-39 (for the one I compiled), and 2407 (for flatpak))
  2. Flatpak version is sandboxed, amongst other things, permissions, etc.

So either dolphin devs already fixed whatever caused it, or there's an issue with the flatpak

Considering the tiny amount of dev versions between the 2

Its probably the flatpak

How did you install it? Adding MKWii to my Dolphin flatpak's library and putting the RetroRewind6 and riivolution folders inside of $HOME/.var/app/org.DolphinEmu.dolphin-emu/data/dolphin-emu/Load/Riivolution/ and starting up the game with the patches enabled gave the exact same result as my regular Dolphin version.

soccerboys2008 commented 4 months ago

Load folder location was the difference, I had set the load folder to "$HOME/Wii/Dolphin Load Folder" to be with the rest of the Wii stuff for easier access

Moving it back to its original location fixes the issue

So it's a flatpak permissions issue / sandbox issue (unsure how restrictive the sandbox is)

EDIT: imma link this comment to the flatpak issue I made

rehtlaw commented 4 months ago

Are you sure being able to load riivolution mods from outside of $XDG_DATA_HOME is intended?

ppebb commented 4 months ago

I wouldn't mind redoing the GUI in something like GTK through Gir Core for mac and linux, leaving the windows UI untouched. Is a PR for something like that welcome?

GabrieleAncillai commented 4 months ago

Hey there! Another linux user here, I'm really interested in porting this app to also support the SteamDeck, I do 98% of all my gaming in that thing and I'm using RetroDeck, so... supporting RetroDeck and EmuDeck Dolphin installation would be really great as well.

Also I use fedora on my main rig with Dolphin installed via flatpak.

My recommendation about packaging and distributing this app would be to do it via flatpak/flathub for peace of mind, I can help with that too.

rehtlaw commented 4 months ago

Yeah I think we're just waiting on word from @patchzyy on how they wanna move forward, since we have people that are willing to help out with porting it to something crossplatform.

soccerboys2008 commented 4 months ago

@GabrieleAncillai there is a slight pitfall on the flatpak version of dolphin that specifically affects this riivolution mod atm (its referenced above), basically if a user sets the dolphin load folder to a location outside the sandbox, it causes a weird issue with the mod, (as dolphin doesn't have write access)

this doesn't happen with other mods as they don't keep save data in LoadFolder/Riivolution/riivolution

who knows how many users change there load folders location, but if they do it can happen

soccerboys2008 commented 4 months ago

I think a good solution for those trying to make a Linux port is to add a banner warning at the top

Maybe something like "If your using the flatpak version of dolphin, do not change the location of the dolphin loads folder from its default, because doing so can cause strange issues"

Maybe add hyperlink to the message that leads to the github issue

soccerboys2008 commented 3 months ago

not so sure that's a good idea, with dolphin having a native version on linux (whell wizard needs a path to dolphin specified, and since it would be in a wine environment it would open dolphin in the same environment)

currently its best to manually setup dolphin on linux (don't change default location for dolphin loads folder, if using flatpak) and mac

this way your running natively, rather then having calls go through a translation layer

rehtlaw commented 3 months ago

Yeah, if all you care about is seeing the WFC lobbies, then running it through wine is fine, but I wouldn't want to do that if you actually want to update the mod and run it through WheelWizard, hence why people are asking for it to be ported.

GabrieleAncillai commented 1 month ago

Hi there, brief update: I tried compiling this project for linux and I'm having the following issue:

usr/lib64/dotnet/sdk/8.0.108/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets(141,5): error 
NETSDK1136: The target platform must be set to Windows (usually by including '-windows' in the TargetFramework 
property) when using Windows Forms or WPF, or referencing projects or packages that do so. [/home/muffin/Documents/
Projects/WheelWizard/WheelWizard/WheelWizard.csproj::TargetFramework=netcoreapp8.0

Here's more info about this specific case Error NETSDK1136

I was going to work on a native version for this app for linux, unfortunately for time availability reasons I'll not be working on fixing this. If there's someone who would then I could give it a second chance, but tbh I'd prefer working on re-doing the whole app on another friendlier language

soccerboys2008 commented 1 month ago

@GabrieleAncillai redoing the app would probably be best (personally when I've tried to get .net stuff to run on linux, I have nothing but problems),

but would it be merged here (as in, in a separate directory, then eventually migrate the windows users to the new code) or just in another repo specifically for mac and linux

ppebb commented 1 month ago

There's no issue with continuing to use dotnet. The issues present are because of the project's use of WPF, which is windows exclusive. Redoing the GUI to use something cross-platform would be preferable to redoing the entire application.

GabrieleAncillai commented 1 month ago

The issues present are because of the project's use of WPF, which is windows exclusive.

Yeap, that's exactly the issue, I just proposed redoing the app bc I don't like .net but that's my personal preference. Fixing the issue would imply me taking too much time bc I don't really know what I'm doing and my main goal is packaging the app, not fixing compatibility. If someone fixes it then I would be able to stark working in bundles

Best regards y'all :)

ppebb commented 1 month ago

I worked on one for a bit and made progress, but I'm incredibly busy for now and did not finish. If no one (e.g. the actual maintainers) makes something xplat by the time I'm free I'll look at a restructure again.

patchzyy commented 1 week ago

We have started working on an official avalonia port of wheel wizard