Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed dolphin binaries to primehack derivatives, for Linux; and renamed dolphin's common path from "dolphin-emu" to "primehack". #118

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

TheDrifter363
Copy link

Linux builds would share configuration data with base dolphin. This changes it so primehack has its own configuration, data, cache, and translation folders. Also the binaries, for Linux, have been changed from dolphin-* to primehack-*.

…amed dolphin's common path from "dolphin-emu" to "primehack".
@SirMangler
Copy link
Collaborator

This looks good. I want to test this on Linux and Windows to make sure everything is peachy, and before merging we should provide preparation for people to migrate. I'm thinking an option to copy the data over automatically would be nice and an update to the wiki. I will leave this PR open until then.

  • Add warning/preparation for the changed config folder as to not confuse users.

@TheDrifter363
Copy link
Author

Yeah that sounds neat! A migration of data folders. Would that have to be a new class? I could take a look at it. But man most of my programming experience is in Java with like 7 or 8 classes. This feel like it has 50. I wouldn't even know where to begin. But I can try.

@SirMangler
Copy link
Collaborator

Yeah that sounds neat! A migration of data folders. Would that have to be a new class? I could take a look at it. But man most of my programming experience is in Java with like 7 or 8 classes. This feel like it has 50. I wouldn't even know where to begin. But I can try.

I'm happy to do so, but you can give it a shot if you like. The main nuisance is just setting up some UI for it. I was thinking about putting it under the PrimeHack menu in the top bar. which then opens a messagebox prompt for confirmation, followed by one stating it was successful and restarting primehack. I would do this in it's own file, then hook it up to the MainWindow's top bar.

@SuperSamus
Copy link

SuperSamus commented Nov 2, 2022

Fixes #103.

@SuperSamus
Copy link

I was wondering, what if only the configuration directory was separated from the main Dolphin, while the data directory was shared?
I don't think that sharing the GameCube memory card and the Wii NAND causes problems, and it would remove the need for migration instructions (aside from having to reconfigure the settings).

Terminal=false
Type=Application
Categories=Game;Emulator;
Name=Dolphin Emulator
Name=Primehack

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be "PrimeHack"? (Uppercase H)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can always go back and change this to PrimeHack. Didn't see the typo.

@TheDrifter363
Copy link
Author

I was wondering, what if only the configuration directory was separated from the main Dolphin, while the data directory was shared? I don't think that sharing the GameCube memory card and the Wii NAND causes problems, and it would remove the need for migration instructions (aside from having to reconfigure the settings).

You know this is something I didn't think about. I wasn't sure if PrimeHack was editing the save on any way. Sure the data directory can be the same.

@Condemnedfate
Copy link

I hope this gets merged soon I would love to have dolphin separate from primehack

@xiota
Copy link

xiota commented Dec 27, 2023

If any Arch users are interested, aur/dolphin-emu-primehack-git is now using a version of this patch updated for bd2591a.

primehack-rename.patch.gz

@XargonWan
Copy link

Any updates on this?
We at RetroDECK are interested in this feature as well.

@SuperSamus
Copy link

IMO, this needs to be discussed: #118 (comment)
(And that need to be resolved: #118 (comment))

@xiota
Copy link

xiota commented Feb 6, 2024

Should I open a new PR with updated patch?

  • Rebased for current version.

  • The typos are fixed.

  • Decided not to share any config files with dolphin because that would cause user confusion. Also, dolphin development is at a different pace, so keeping them separate prevents compatibility issues. Users who really want to share files can use symlinks at their own risk.

  • Also, no auto migration tool. Would be a problem if it destroyed data or something. Users who already figured out how to set it up once can manage migrating data manually.

@SuperSamus
Copy link

I'm still on the idea that only the config folder should be separated, while everything else (including the Wii NAND) should be shared.

Looking at the source code, Dolphin already has the tool to do that: File::SetUserPath.
Doing in order:

File::SetUserPath(D_USER_IDX, data_path);
File::SetUserPath(D_CONFIG_IDX, config_path);

should do the trick.

Similar to how it's already doing it on Linux here.

@xiota
Copy link

xiota commented Feb 6, 2024

PrimeHack should not attempt to share files with Dolphin by default. The programs are not in sync, and sharing files risks data corruption. Users who are willing to take that risk can set it up themselves.

@SuperSamus
Copy link

The programs are not in sync, and sharing files risks data corruption

What exactly is the problem in sharing the NAND? It is something that both programs emulate in the same exact way (they kinda have to, since it is meant to be transferred from an actual Wii).

@xiota
Copy link

xiota commented Feb 6, 2024

You cannot control what Dolphin devs will or won't do. Even if the risk is small, not everyone wants it that way. Sharing files like that is also not the norm, and is probably against XDG specs.

As you've pointed out, the config options already exist. Users who want to change the paths are free to do so themselves.

@TheDrifter363
Copy link
Author

I'd have to agree with xiota. Keep primehack's config and data directory separate from dolphin. Who knows how the two will drift apart as the commits progress.

@SuperSamus
Copy link

SuperSamus commented Feb 7, 2024

They can't drift apart.
This is what the shared data is:

The Wii NAND

Because both Dolphin and PrimeHack are emulating a Wii, meaning that the way they handle the data must be the same.

Note that the NAND can be imported from a real Wii.

$\text{Wii}=\text{Dolphin} ∧ \text{Wii}=\text{PrimeHack} ⟹ \text{Dolphin}=\text{PrimeHack}$

PrimeHack, being (for the purposes of this discussion) a glorified cheat code, has no reason to change any of that.

GameCube memory cards

They are either in the .raw format, which by definition can't change.
Alternatively, they are in .gci, which is basically "the raw part of that game".
While the way that a raw SD card can be assembled from .gci files can be changed, this shouldn't cause any compatibility issues.

Other stuff

Screenshots, dumps, texture packs... No compatibility risks with that.
The only exception are savestates, though by design they are not meant to be relied on for permanent saves (since they are compatible only on one Dolphin version).

EDIT: Expanded explanation.

@SuperSamus
Copy link

SuperSamus commented Apr 30, 2024

I made a patch that separates the config folder, but not the data.
separate-config.patch.gz

Only tested on Linux.
Also, it doesn't separate the cache folder. It probably should.

@XargonWan
Copy link

Greetings everyone!

Xargon here again from RetroDECK, as said above we are very much interested in this PR 🙂

In our case we are shipping both Dolphin and Primehack (fork by TheDrifter) in our manifest and by doing so we have avoided an internal conflict between them and avoiding them to overwrite each other in the build process: we are using that fork because if we build the official Primehack it will overwrite and override by the original Dolphin, or vice versa depending on the build order.
Our main caveat is that that fork is no longer updated for the latest dependencies like KDE Runtime 6.5 being end of life.

Apparently KDE Runtime 6.5, on where our actual Primehack can be built is being removed by Flathub very soon (it was removed then re-added but I think it's to allow us to migrate).

We are happy to see your combined effort on this.

How is the state of this feature and how are the internal discussion going?
Do you think it can be merged?

If there is anything we could do to help you at all please feel free to reach us on GitHub or contact us on Discord / Matrix, you can find all our links on retrodeck.net.

Thanks a lot! ❤️

@TheDrifter363
Copy link
Author

Hey, is this something I'm gonna have to take a look at again, since you guys rebased a while back on modern versions of dolphin? @SuperSamus , thanks for working on separating out the config directory, but you didn't wanna separate out the data or cache directories? I'll see what I can do.

@xiota
Copy link

xiota commented May 2, 2024

I will open a new PR later using the patch in this comment. It is being used for aur/dolphin-emu-primehack-git.

@SuperSamus
Copy link

SuperSamus commented May 2, 2024

Whether only the configuration folder should be separated, or the entirety of the data, should be the decision of @SirMangler (and probably other maintainers, but I don't know who to ping exactly).

(BTW, my patch was based on #118 (comment).
I did add make a few extra changes that weren't about separating .config. For that, only CommonPaths.h and UICommon.cpp were changed)

@TheDrifter363
Copy link
Author

I will open a new PR later using the patch in this comment. It is being used for aur/dolphin-emu-primehack-git.

Nice, this looks like what I did, except rebased for the newer version. Good going dude! We should get this merged into the main branch.

@xiota
Copy link

xiota commented May 3, 2024

@TheDrifter363 I had used this PR as reference and posted the patch in a comment to give you the opportunity to update this PR, but have decided to open a new PR because there has been too much side discussion about sharing data with dolphin-emu.

@TheDrifter363
Copy link
Author

@TheDrifter363 I had used this PR as reference and posted the patch in a comment to give you the opportunity to update this PR, but have decided to open a new PR because there has been too much side discussion about sharing data with dolphin-emu.

Yeah thanks dude. Sorry I got busy. I appreciate the work you did. Should I close this PR then, and we can use xiota's work? What do you guys think?

@xiota
Copy link

xiota commented Oct 28, 2024

I closed PR #166 because it is practically rejected.

@SirMangler
Copy link
Collaborator

To reiterate our stance on this change,

It's a horrible idea to merge a change that without a method of migration or even a prompt or warning, will silently break each and every one of our linux user's PrimeHack config for a change that, while I do agree with in general, will otherwise not have any effect or impact to the majority of our linux users.

For context, we get on average 56K flatpak installs a month. If you're to believe flathub, we've had a total of 2.7 million installs. Many of those will be set to update automatically, and flatpak already isolates the settings folders. For other package managers and distros, different guidance may be needed to find and restore their settings and saves. There isn't even any migration guide or note of what the new folder name is, beyond looking inside the PR's changes. Merging that PR as is would be irresponsible.

Automatic migration can be done fairly easily by seeing if the new folder exists, and if not, check the known settings folder locations, and if the Dolphin.ini file contains the primehack initial start key, copy the folder into the new location. Flatpak can have the folder simply renamed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants