-
Notifications
You must be signed in to change notification settings - Fork 44
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
Rebrand to PrimeHack (Linux) #166
Conversation
Thanks from the RetroDECK Team, I hope this can be accepted and merged :) |
set(CPACK_PACKAGE_VERSION_MAJOR ${DOLPHIN_VERSION_MAJOR}) | ||
set(CPACK_PACKAGE_VERSION_MINOR ${DOLPHIN_VERSION_MINOR}) | ||
set(CPACK_PACKAGE_VERSION_PATCH ${DOLPHIN_VERSION_PATCH}) | ||
set(CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/Data/cpack_package_description.txt) | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A GameCube and Wii emulator") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpik but, I realise our github still advertises us similarly (I had not realised this hasn't been changed in like 5 years lol) but it would be more apt to describe primehack more like A GameCube and Wii emulator fork bringing modern FPS features to the Metroid Prime series
. The former description is really outdated compared to how much PrimeHack does now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to avoid naming specific games, even though it's partly already in the project name.
This looks good. I don't think the Sys folder should be shared among versions, this folder can change between Dolphin releases, so it shouldn't be considered stable or safe for sharing, and it's not worth splicing it up, like you said, the user is more than able to do this themselves should they want to. My main concern is the same as the last PR, many people will be effected by this and will have no idea why "my saves just got deleted after updating!". Because of this, I still consider this change to be harming more people than it aids. Especially when you factor in things like a significant number of people come to PrimeHack after trying out Vanilla Dolphin. Putting aside a migration tool, I would at least like to see a popup that checks known Dolphin install folders and can report to the user that the primehack config folder has moved. Bonus points for if you check to see if the The code for PrimeHack's initial run popup box is very simple and starts here: dolphin/Source/Core/DolphinQt/Main.cpp Line 257 in 03117e2
|
I still want to argue that there isn't any risk in sharing the data folder (and only the configuration folder should be separated). EDIT2: I admit my hypocrisy. |
@SuperSamus The PR description says discussion on the topic should take place elsewhere. You previously wrote, "should be the decision of SirMangler", yet when SirManger expressed his opinion, you continue arguing when it is not wanted. |
@SirMangler I'll look at the popup to add a notification. However, this patch has been in use for 4-5 months with no evidence of user confusion. 30-day metrics show ~18 recent downloads, so there are people using the patched version. Since there is no official Linux binary distribution, these are people who are capable of setting up a dev environment and building the software themselves. The likelihood of "confusion" over something like this is small. |
The 'official' way to install PrimeHack on the SteamDeck (and in general) is Discover/Flatpak. Taking a grain of salt, Valve estimated in 2023 that 39.33% of the "linux gaming community" is made up of Steamdeck users based on what devices are running Steam. For comparison, Arch is 8.33% and Ubuntu is 7.87%. I can tell you that there are over 2.25 million downloads from the Flatpak. The '30 day metrics' show ~2,800 recent downloads. It's unclear if they would join the Discord or GitHub to complain they have "lost" their saves or if they would just give up. I do believe Arch users tend to be more tech-competent and might not jump to the same conclusion so quickly, and I can see you have a pinned comment on the AUR explaining the settings folder is different. However, obviously, this information has to be somewhere accessible for non-AUR users, and made explicitly clear for less technically inclined individuals. There's also an argument to be made that PrimeHack has only had 1 major update in 2 years, so the estimated ~90 users who have received this patch may have only done so with a new install rather than from updating from an old version, plus from my experience many of our users don't bother updating after the initial install without a specific reason. On the flip-side, flatpak would prompt them to update when this is released. Hopefully this sheds some light behind my stance on this change and why we should be careful, considering how many users could be impacted. |
I forgot people actually use Flatpak. Migration instructions for standard distros don't apply directly to Flatpak because it remaps directories. Each app has its own isolated home folder, so the data can be moved without any concern about whether it might interfere with a Dolphin instance. This can be done with a launcher script that is used only for the Flatpak release. Assuming variables and paths are set up inside the sandbox: #!/usr/bin/env sh
_old_profile="$XDG_CONFIG_HOME/dolphin-emu"
_new_profile="$XDG_CONFIG_HOME/primehack"
if [ -e "$_old_profile" ] && [ ! -e "$_new_profile" ]; then
mv "$_old_profile" "$_new_profile"
fi
exec primehack "$@" |
In my experience users on Steam Deck just "update all" without even reading the version notes as there are some plugins that automatically updates all flatpaks with a single button press from game mode. |
In my opinion, the most ideal solution would be to just automatically migrate if the folder doesn't exist / is empty. This would completely resolve the problem with flatpak altogether and there wouldn't be any risks of corruption. If the folder isn't empty then you can assume someone manually migrated or has ran PrimeHack before, and if not, PrimeHack will still restore any missing configs and folders per Dolphin's normal behaviour. The requirement of manual migration will be too problematic to make this PR worth it when I consider that we will have to herd hoards of inexperienced users to a new migration guide someone has to write, to download and run a robust migration tool someone has to write. PrimeHack itself can guarantee it will copy the right folder to the right destination at the right time with relatively zero risk. This would minimise the impact for all users, and at that point the popup-box wouldn't be required any more. I would much prefer either making the primehack config folder optional, ie it checks for its existence to use it and otherwise falls back to the default folder, or auto-migration as stated above. I do regret that PrimeHack on Linux wasn't using a custom config folder from the get-go and I realise that part of this ask is cleaning after up that oversight, but without migration, the users who benefit from this change are unfortunately niche relative to those who will be negatively effected for an otherwise insignificant change to them. |
You can do this for Flatpak. As I show how in comment. This is relatively safe to do because the Flatpak sandbox ensures there is no conflicting Dolphin instance.
You can use the same launcher script as Flatpak, but it's more risky on general Linux because there may be a Dolphin instance the move would interfere with. Trying to move the config from within Dolphin itself is prone to mistakes. Also, Dolphin creates the new config folder before it even shows the GUI. So the new location won't be empty for a move. The best time to move is with a launcher script that can check folder locations before Dolphin is actually run.
The more complicated you make it, the more likely you are to screw up users' data. |
Using the path that Dolphin is about to load as it's user folder guarantees you're using the right path, there's no obscurity from sandboxes or how different environments may set the path, you can guarantee whatever path you're dealing with is what would have been used and that this will continue to work in the future. Using a script is relatively unsafe and requires set-up.
Dolphin only starts to use the user folder after this line (same function as the initial run popup): dolphin/Source/Core/DolphinQt/Main.cpp Line 170 in 26beef4
You could do this in just a few lines of code, you can add an additional check to see if there's a This is the safest and most minimal approach.
Creating a migration script and fitting it into flatpak's setup sounds an awful lot more convoluted, prone to mistakes and more to maintain compared to taking the existing code that handles creating the new user folder and making it copy // UICommon.cpp:L251 - UICommon::CreateDirectories()
std::string config_folder = File::GetUserPath(D_CONFIG_IDX);
if (!File::Exists(config_folder) {
File::CreateFullPath(config_folder);
std::string parent_folder = config.folder_substr(0, s.rfind('/'));
if (File::Exists(parent_folder + "/dolphin-emu")) {
File::Copy(parent_folder + "/dolphin-emu", config_folder);
}
} |
@SirMangler I write launcher scripts all the time. They're simple and effective. After they've served their purpose, they can be disposed of. To do the same on the C++ side requires deeper familiarity with the program and many more lines of code. Developers also tend to be resistant to disposing of C++ when they're no longer needed. You should write the migration code yourself, especially if you insist it be done on the C++ side. Anyone else is likely to make a mistake. Also, after implementing your message-box suggestion, it's clear I do not agree with your idea of "simple" and "just a few lines of code". @XargonWan The diff corresponding with this PR can be obtained by adding |
So to recap what you're saying: Instead of adding a single code snippet to one function?
By the same token, your migration script mustn't be trusted then, this is compounded by the fact the paths are obtained externally to Dolphin, and do not follow what Dolphin ends up using (e.g sandbox/environment shenanigans or upstream changes).
Luckily for you, I did, I even gave you the exact line in the file you would insert this. Perhaps you missed it in my previous reply? #166 (comment) However saying you need a "deep familiarity with the program" is simply not true. Otherwise, you yourself wouldn't have been able to implement something significantly more advanced than this in C++, your 43 lines of code involved opening and scanning a file to change the flow of logic. Your "deep familiarity with the program" even found the relevant file and function to modify, which I did not directly link you to. If what you're saying were true, then I don't see how you were able to write that migration script as it's doing effectively the same operation we need in C++.
Clearly we don't. Even if we consider the route of forcing the majority of our users to download run your script, meaning there's no additional scripting work to be done, your script is a measly 9 lines, whereas the code I gave you is a whopping grand 9 lines. I will reiterate once more, we aren't going to impact a majority of our community and force est. several thousands of inexperienced users to follow a migration guide that someone will need to write, for something that will literally have no benefit to them who just wanted to play the game and trusted us enough to keep auto-update on. This problem, the requirement to write new scripts, new guides, the burden of maintaining something external to the project and managing all the users flooding to us for answers and help, can be entirely avoided with minimal effort which won't need later removing or maintainance. 90% of this minimal effort has already been done for you. |
Thanks, I tried but unfortunately it fails applying the patches:
|
@XargonWan I don't recognize that patch. Where is it from? |
Here, it's part of the flatpak manifest: https://github.com/flathub/io.github.shiiion.primehack |
This PR doesn't alter UICommon.cpp, so don't know why you would have problems with that patch. |
But probably the patches should be remade because:
I believe that the folder now are |
I see what you mean now. The comment is wrong, it should use .primehack instead. But is that patch even needed? What happens if you don't use it? |
Actually my build compiled now and the patches are applied, they were just outdated. Maybe @SirMangler knows more on the topic. However albeit the build worked the patches might need an update, the first one is just a comment, but I don't know the implications of the second block that is actually code. |
Looks like the patch makes it look for an additional config folder when running in flatpak. It's probably a backward compatibility hack. Since this PR changes the name of the folder, that whole block should be unused, and the patch shouldn't be needed. You should skip the extra patch. |
Closing because, although not stated explicitly, this PR has been rejected in practice. |
Renames binary, configuration, and data storage locations. User responsibility to reconfigure or port data themselves. Supersedes #118.
This patch has been in use at aur/dolphin-emu-primehack-git since Dec 2023.
Rebranding for other OSes ideally done in separate PRs because I would not be able to test the changes.
Sharing data by default with dolphin-emu has already been discussed extensively elsewhere. It is user responsibility to configure such data sharing themselves. Settings to do so are already available. Symlinks may also be used. Further discussion on the topic should take place elsewhere.