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

Enhancement: Warn on R-II path in OneDrive/non-ascii on startup #518

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

dreamsyntax
Copy link
Contributor

@dreamsyntax dreamsyntax commented Dec 11, 2024

Resolves #502

On boot, this appears if OneDrive or non-ascii chars are detected in the path Reloaded-II is contained in:

image

Clicking OK dismisses and the program continues as usual.

This will appear every time if detected.
I debated about introducing "ignore permanently", but ultimately the goal of this is to inform users and reduce possible issue reports relating to path issues, so I think its wise to permanently nag the user if these scenarios are detected.

--
For the first time user, this would appear and then the R-II Tutorial would appear at the same time if the detection occurs. They must complete or skip the tutorial before they can interact with the warning. After both are dismissed the main window loads.

I don't consider this case very likely, as first time users would hopefully have been automatically moved to a safe directory per #504. And while its less than ideal visually, nothing is broken in this first-time state.

@Sewer56
Copy link
Member

Sewer56 commented Dec 11, 2024

For the installer it's a bit different, because the default folders default to Reloaded's directory.

But in this case, you may actually also want to check the Mods folder location from the LoaderConfig (get it via IoC if needed).

The user can technically remap the mods folder location via the LoaderConfig's .json in AppData.

The actual problematic folder is the Mods folder after all.

@dreamsyntax
Copy link
Contributor Author

The actual problematic folder is the Mods folder after all.

In the case of a real user, the crash was occurring in the Bootstrapper.dll - so I wouldn't just want to check the Mods folder
image

@Sewer56
Copy link
Member

Sewer56 commented Dec 11, 2024

I poorly worded it by forgetting to remove 'instead' at the end. I meant to say 'in addition'.

@dreamsyntax
Copy link
Contributor Author

I just tried moving the folder and seeing what changed in the config.
Everything updates once you close Reloaded-II:

  "LoaderPath32": "C:\\Games\\OneDrive\\Launcher\\Loader\\x86\\Reloaded.Mod.Loader.dll",
  "LoaderPath64": "C:\\Games\\OneDrive\\Launcher\\Loader\\x64\\Reloaded.Mod.Loader.dll",
  "LauncherPath": "C:\\Games\\OneDrive\\Launcher\\Reloaded-II.exe",
  "Bootstrapper32Path": "C:\\Games\\OneDrive\\Launcher\\Loader\\x86\\Bootstrapper\\Reloaded.Mod.Loader.Bootstrapper.dll",
  "Bootstrapper64Path": "C:\\Games\\OneDrive\\Launcher\\Loader\\x64\\Bootstrapper\\Reloaded.Mod.Loader.Bootstrapper.dll",
  "ApplicationConfigDirectory": "C:\\Games\\OneDrive\\Launcher\\Apps",
  "ModUserConfigDirectory": "C:\\Games\\OneDrive\\Launcher\\User\\Mods",
  "MiscConfigDirectory": "C:\\Games\\OneDrive\\Launcher\\User\\Misc",
  "PluginConfigDirectory": "C:\\Games\\OneDrive\\Launcher\\Plugins",
  "ModConfigDirectory": "C:\\Games\\OneDrive\\Launcher\\Mods",
  "EnabledPlugins": [],
  "LanguageFile": "C:\\Games\\OneDrive\\Launcher\\\\Assets\\Languages\\en-GB.xaml",
  "ThemeFile": "C:\\Games\\OneDrive\\Launcher\\\\Theme\\Default.xaml",

I don't really see a point to check for a custom edited \Mods folder, since there's no flow in the UI to edit this.
If a user is editing this file I think its fine to not warn them since they are an advanced user.

@Sewer56
Copy link
Member

Sewer56 commented Dec 11, 2024

The config paths reset if the locations they point to are invalid. If they are valid, they are used.

A user may opt to move their folder while the program is closed and then edit the .json before starting the program again. That should work/be recognised.

Note the config is written to on window close, hence the need to change after closing.

@dreamsyntax
Copy link
Contributor Author

Added:
image

Which only will be checked if the R-II path check passes.

@Sewer56 Sewer56 merged commit 03dd9e9 into Reloaded-Project:master Dec 11, 2024
2 checks passed
@dreamsyntax dreamsyntax deleted the rii-path-check branch December 11, 2024 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants