Update dependencies.

This commit is contained in:
2020-12-21 01:22:36 +00:00
parent 5c87920c13
commit 197c86fb22
11 changed files with 30 additions and 43 deletions

View File

@@ -73,7 +73,7 @@ namespace Aaru.CommonTypes.Interop
{
get
{
if(!IsWindows)
if(!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
return Environment.UserName == "root";
bool isAdmin;

View File

@@ -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 &&

View File

@@ -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>

View File

@@ -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");