mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 11:14:45 +00:00
Update dependencies.
This commit is contained in:
@@ -73,7 +73,7 @@ namespace Aaru.CommonTypes.Interop
|
||||
{
|
||||
get
|
||||
{
|
||||
if(!IsWindows)
|
||||
if(!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
return Environment.UserName == "root";
|
||||
|
||||
bool isAdmin;
|
||||
|
||||
@@ -52,14 +52,11 @@ namespace Aaru.CommonTypes.Interop
|
||||
{
|
||||
Assembly assembly = typeof(GCSettings).Assembly;
|
||||
|
||||
string[] assemblyPath = assembly.CodeBase?.Split(new[]
|
||||
string[] assemblyPath = assembly.Location.Split(new[]
|
||||
{
|
||||
'/', '\\'
|
||||
}, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(assemblyPath is null)
|
||||
return null;
|
||||
|
||||
int netCoreAppIndex = Array.IndexOf(assemblyPath, "Microsoft.NETCore.App");
|
||||
|
||||
if(netCoreAppIndex > 0 &&
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
|
||||
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
||||
<PackageReference Include="plist-cil" Version="2.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text.Json;
|
||||
using Aaru.CommonTypes.Interop;
|
||||
using Claunia.PropertyList;
|
||||
@@ -115,11 +116,11 @@ namespace RomRepoMgr.Settings
|
||||
#if !NETSTANDARD2_0
|
||||
|
||||
// In case of Windows settings will be saved in the registry: HKLM/SOFTWARE/Claunia.com/RomRepoMgr
|
||||
case PlatformID.Win32NT:
|
||||
case PlatformID.Win32S:
|
||||
case PlatformID.Win32Windows:
|
||||
case PlatformID.WinCE:
|
||||
case PlatformID.WindowsPhone:
|
||||
case PlatformID.Win32NT when RuntimeInformation.IsOSPlatform(OSPlatform.Windows):
|
||||
case PlatformID.Win32S when RuntimeInformation.IsOSPlatform(OSPlatform.Windows):
|
||||
case PlatformID.Win32Windows when RuntimeInformation.IsOSPlatform(OSPlatform.Windows):
|
||||
case PlatformID.WinCE when RuntimeInformation.IsOSPlatform(OSPlatform.Windows):
|
||||
case PlatformID.WindowsPhone when RuntimeInformation.IsOSPlatform(OSPlatform.Windows):
|
||||
{
|
||||
RegistryKey parentKey = Registry.CurrentUser.OpenSubKey("SOFTWARE")?.OpenSubKey("Claunia.com");
|
||||
|
||||
@@ -234,11 +235,11 @@ namespace RomRepoMgr.Settings
|
||||
#if !NETSTANDARD2_0
|
||||
|
||||
// In case of Windows settings will be saved in the registry: HKLM/SOFTWARE/Claunia.com/RomRepoMgr
|
||||
case PlatformID.Win32NT:
|
||||
case PlatformID.Win32S:
|
||||
case PlatformID.Win32Windows:
|
||||
case PlatformID.WinCE:
|
||||
case PlatformID.WindowsPhone:
|
||||
case PlatformID.Win32NT when RuntimeInformation.IsOSPlatform(OSPlatform.Windows):
|
||||
case PlatformID.Win32S when RuntimeInformation.IsOSPlatform(OSPlatform.Windows):
|
||||
case PlatformID.Win32Windows when RuntimeInformation.IsOSPlatform(OSPlatform.Windows):
|
||||
case PlatformID.WinCE when RuntimeInformation.IsOSPlatform(OSPlatform.Windows):
|
||||
case PlatformID.WindowsPhone when RuntimeInformation.IsOSPlatform(OSPlatform.Windows):
|
||||
{
|
||||
RegistryKey parentKey = Registry.CurrentUser.OpenSubKey("SOFTWARE", true)?.
|
||||
CreateSubKey("Claunia.com");
|
||||
|
||||
Reference in New Issue
Block a user