mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 19:24:51 +00:00
Add winfsp library.
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
||||
[submodule "SabreTools"]
|
||||
path = SabreTools
|
||||
url = https://github.com/SabreTools/SabreTools
|
||||
[submodule "winfsp"]
|
||||
path = winfsp
|
||||
url = https://github.com/billziss-gh/winfsp/
|
||||
|
||||
7
RomRepoMgr.Core/Filesystem/Vfs.cs
Normal file
7
RomRepoMgr.Core/Filesystem/Vfs.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace RomRepoMgr.Core.Filesystem
|
||||
{
|
||||
public class Vfs
|
||||
{
|
||||
public static bool IsAvailable => Winfsp.IsAvailable || Fuse.IsAvailable;
|
||||
}
|
||||
}
|
||||
28
RomRepoMgr.Core/Filesystem/Winfsp.cs
Normal file
28
RomRepoMgr.Core/Filesystem/Winfsp.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using Fsp;
|
||||
|
||||
namespace RomRepoMgr.Core.Filesystem
|
||||
{
|
||||
public class Winfsp : FileSystemBase
|
||||
{
|
||||
public static bool IsAvailable
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
Version winfspVersion = FileSystemHost.Version();
|
||||
|
||||
if(winfspVersion == null)
|
||||
return false;
|
||||
|
||||
return winfspVersion.Major == 1 && winfspVersion.Minor >= 7;
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@
|
||||
<ProjectReference Include="..\RomRepoMgr.Database\RomRepoMgr.Database.csproj" />
|
||||
<ProjectReference Include="..\RomRepoMgr.Settings\RomRepoMgr.Settings.csproj" />
|
||||
<ProjectReference Include="..\SabreTools\SabreTools.Library\SabreTools.Library.csproj" />
|
||||
<ProjectReference Include="..\winfsp-netcore\winfsp-netcore.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -10,6 +10,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RomRepoMgr.Core", "RomRepoM
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Library", "SabreTools\SabreTools.Library\SabreTools.Library.csproj", "{9DFA390F-1E96-476B-92CB-0C96EFF3CC9D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "winfsp-netcore", "winfsp-netcore\winfsp-netcore.csproj", "{4B2B4DAC-39E2-417D-90F2-DCC97A5564B1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -36,5 +38,9 @@ Global
|
||||
{9DFA390F-1E96-476B-92CB-0C96EFF3CC9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9DFA390F-1E96-476B-92CB-0C96EFF3CC9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9DFA390F-1E96-476B-92CB-0C96EFF3CC9D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4B2B4DAC-39E2-417D-90F2-DCC97A5564B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4B2B4DAC-39E2-417D-90F2-DCC97A5564B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4B2B4DAC-39E2-417D-90F2-DCC97A5564B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4B2B4DAC-39E2-417D-90F2-DCC97A5564B1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=romrepo/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=romrepombgrfs/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=unar/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Winfsp/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=xattr/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=xattrs/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=_0020_007B_000A_0020_0020_0020_0020/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
@@ -79,7 +79,7 @@ namespace RomRepoMgr.ViewModels
|
||||
public string RomSetTotalRomsLabel => Localization.RomSetTotalRomsLabel;
|
||||
public string RomSetHaveRomsLabel => Localization.RomSetHaveRomsLabel;
|
||||
public string RomSetMissRomsLabel => Localization.RomSetMissRomsLabel;
|
||||
public bool IsVfsAvailable => Fuse.IsAvailable;
|
||||
public bool IsVfsAvailable => Vfs.IsAvailable;
|
||||
public string FileMenuText => Localization.FileMenuText;
|
||||
public string FileMenuImportDatFileText => Localization.FileMenuImportDatFileText;
|
||||
public string FileMenuImportDatFolderText => Localization.FileMenuImportDatFolderText;
|
||||
|
||||
1
winfsp
Submodule
1
winfsp
Submodule
Submodule winfsp added at af52ac3df0
34
winfsp-netcore/winfsp-netcore.csproj
Normal file
34
winfsp-netcore/winfsp-netcore.csproj
Normal file
@@ -0,0 +1,34 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<RootNamespace>winfsp_netcore</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\winfsp\src\dotnet\FileSystemBase+Const.cs">
|
||||
<Link>FileSystemBase+Const.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\winfsp\src\dotnet\FileSystemBase.cs">
|
||||
<Link>FileSystemBase.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\winfsp\src\dotnet\FileSystemHost.cs">
|
||||
<Link>FileSystemHost.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\winfsp\src\dotnet\Interop.cs">
|
||||
<Link>Interop.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\winfsp\src\dotnet\Service.cs">
|
||||
<Link>Service.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
|
||||
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.7.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user