aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Ui.Common/Helper/FileAssociationHelper.cs
diff options
context:
space:
mode:
authorTSRBerry <20988865+TSRBerry@users.noreply.github.com>2024-01-29 19:58:18 +0100
committerGitHub <noreply@github.com>2024-01-29 19:58:18 +0100
commit70fcba39de34fc211d09da12783898161724b0dc (patch)
tree9efdf7c191694e95de149129c9032b129527cb32 /src/Ryujinx.Ui.Common/Helper/FileAssociationHelper.cs
parent7795b662a9b6054343195db9fc221a920509c1be (diff)
Make config filename changable for releases & Log to Ryujinx directory if application directory is not writable (#4707)1.1.1144
* Remove GetBaseApplicationDirectory() & Move logs directory to user base path We should assume the application directory might be write-protected. * Use Ryujinx.sh in Ryujinx.desktop This desktop file isn't really used right now, so this changes effectively nothing. * Use properties in ReleaseInformation.cs and add ConfigName property * Configure config filename in Github workflows * Add a separate config step for macOS Because they use BSD sed instead of GNU sed * Keep log directory at the old location for dev environments * Add FileSystemUtils since Directory.Move() doesn't work across filesystems Steal CopyDirectory code from https://learn.microsoft.com/en-us/dotnet/standard/io/how-to-copy-directories * Fix "Open Logs folder" button pointing to the wrong directory * Add execute permissions to Ryujinx.sh * Fix missing newlines * AppDataManager: Use FileSystemUtils.MoveDirectory() * Make dotnet format happy * Add a fallback for the logging directory
Diffstat (limited to 'src/Ryujinx.Ui.Common/Helper/FileAssociationHelper.cs')
-rw-r--r--src/Ryujinx.Ui.Common/Helper/FileAssociationHelper.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Ryujinx.Ui.Common/Helper/FileAssociationHelper.cs b/src/Ryujinx.Ui.Common/Helper/FileAssociationHelper.cs
index 570fb91e..daa59d25 100644
--- a/src/Ryujinx.Ui.Common/Helper/FileAssociationHelper.cs
+++ b/src/Ryujinx.Ui.Common/Helper/FileAssociationHelper.cs
@@ -22,7 +22,7 @@ namespace Ryujinx.Ui.Common.Helper
[LibraryImport("shell32.dll", SetLastError = true)]
public static partial void SHChangeNotify(uint wEventId, uint uFlags, IntPtr dwItem1, IntPtr dwItem2);
- public static bool IsTypeAssociationSupported => (OperatingSystem.IsLinux() || OperatingSystem.IsWindows()) && !ReleaseInformation.IsFlatHubBuild();
+ public static bool IsTypeAssociationSupported => (OperatingSystem.IsLinux() || OperatingSystem.IsWindows()) && !ReleaseInformation.IsFlatHubBuild;
[SupportedOSPlatform("linux")]
private static bool AreMimeTypesRegisteredLinux() => File.Exists(Path.Combine(_mimeDbPath, "packages", "Ryujinx.xml"));
@@ -34,7 +34,7 @@ namespace Ryujinx.Ui.Common.Helper
if ((uninstall && AreMimeTypesRegisteredLinux()) || (!uninstall && !AreMimeTypesRegisteredLinux()))
{
- string mimeTypesFile = Path.Combine(ReleaseInformation.GetBaseApplicationDirectory(), "mime", "Ryujinx.xml");
+ string mimeTypesFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "mime", "Ryujinx.xml");
string additionalArgs = !uninstall ? "--novendor" : "";
using Process mimeProcess = new();