-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b81929b
commit 9e4a543
Showing
46 changed files
with
495 additions
and
581 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+1.4 KB
Windows/VirtualDrive/VirtualDrive.Package/Images/LockScreenLogo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.52 KB
Windows/VirtualDrive/VirtualDrive.Package/Images/SplashScreen.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.87 KB
Windows/VirtualDrive/VirtualDrive.Package/Images/Square150x150Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.61 KB
Windows/VirtualDrive/VirtualDrive.Package/Images/Square44x44Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.23 KB
.../VirtualDrive.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.13 KB
Windows/VirtualDrive/VirtualDrive.Package/Images/Wide310x150Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions
72
Windows/VirtualDrive/VirtualDrive.Package/Package.appxmanifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<Package | ||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" | ||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" | ||
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" | ||
xmlns:desktop3="http://schemas.microsoft.com/appx/manifest/desktop/windows10/3" | ||
xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" | ||
IgnorableNamespaces="uap rescap"> | ||
|
||
<Identity | ||
Name="38f8ee88-19d0-48a3-ad8e-904a6cf3ca17" | ||
Publisher="CN=VirtualFileSystemPackagePublisher" | ||
Version="1.0.0.0" /> | ||
|
||
<Properties> | ||
<DisplayName>VirtualDrive.Package</DisplayName> | ||
<PublisherDisplayName>VirtualDrive.PackagePublisher</PublisherDisplayName> | ||
<Logo>Images\StoreLogo.png</Logo> | ||
</Properties> | ||
|
||
<Dependencies> | ||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" /> | ||
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" /> | ||
</Dependencies> | ||
|
||
<Resources> | ||
<Resource Language="x-generate"/> | ||
</Resources> | ||
|
||
<Applications> | ||
<Application Id="App" | ||
Executable="$targetnametoken$.exe" | ||
EntryPoint="$targetentrypoint$"> | ||
<uap:VisualElements | ||
DisplayName="VirtualDrive.Package" | ||
Description="VirtualDrive.Package" | ||
BackgroundColor="transparent" | ||
Square150x150Logo="Images\Square150x150Logo.png" | ||
Square44x44Logo="Images\Square44x44Logo.png"> | ||
<uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" /> | ||
<uap:SplashScreen Image="Images\SplashScreen.png" /> | ||
</uap:VisualElements> | ||
<Extensions> | ||
<desktop3:Extension Category="windows.cloudFiles"> | ||
<desktop3:CloudFiles> | ||
<desktop3:ThumbnailProviderHandler Clsid="05CF065E-E135-4B2B-9D4D-CFB3FBAC73A4"/> | ||
<!--<desktop3:ThumbnailProviderHandler Clsid="b9e1bc83-84ed-4ff6-984b-818f9564a7eb"/>--> | ||
<desktop3:CustomStateHandler Clsid="20000000-0000-0000-0000-000000000001"/> | ||
<desktop3:ExtendedPropertyHandler Clsid="20000000-0000-0000-0000-000000000001"/> | ||
<desktop3:BannersHandler Clsid="20000000-0000-0000-0000-000000000001"/> | ||
<desktop3:CloudFilesContextMenus /> | ||
</desktop3:CloudFiles> | ||
</desktop3:Extension> | ||
<com:Extension Category="windows.comServer"> | ||
<com:ComServer> | ||
<!-- When changing ProgId make sure to change it also in the ThumbnailProvider.cs --> | ||
<com:SurrogateServer AppId="3000bacb-ea7c-4e37-a939-3b16154da364" DisplayName="VirtualDrive.ThumbnailProvider"> | ||
<com:Class Id="05CF065E-E135-4B2B-9D4D-CFB3FBAC73A4" Path="VirtualDrive.ThumbnailProvider\VirtualDrive.ThumbnailProvider.comhost.dll" ThreadingModel="Both" ProgId="VirtualDrive.ThumbnailProvider" /> | ||
</com:SurrogateServer> | ||
<com:ProgId Id="VirtualDrive.ThumbnailProvider" Clsid="05CF065E-E135-4B2B-9D4D-CFB3FBAC73A4" /> | ||
</com:ComServer> | ||
</com:Extension> | ||
</Extensions> | ||
</Application> | ||
</Applications> | ||
|
||
<Capabilities> | ||
<Capability Name="internetClient" /> | ||
<rescap:Capability Name="runFullTrust" /> | ||
</Capabilities> | ||
</Package> |
79 changes: 79 additions & 0 deletions
79
Windows/VirtualDrive/VirtualDrive.Package/VirtualDrive.Package.wapproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '15.0'"> | ||
<VisualStudioVersion>15.0</VisualStudioVersion> | ||
</PropertyGroup> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="Debug|x86"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>x86</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|x86"> | ||
<Configuration>Release</Configuration> | ||
<Platform>x86</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|x64"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|x64"> | ||
<Configuration>Release</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|ARM"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>ARM</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|ARM"> | ||
<Configuration>Release</Configuration> | ||
<Platform>ARM</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|ARM64"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>ARM64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|ARM64"> | ||
<Configuration>Release</Configuration> | ||
<Platform>ARM64</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath> | ||
</PropertyGroup> | ||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" /> | ||
<PropertyGroup> | ||
<ProjectGuid>9cc25823-7d6c-4aaa-95a0-ee0514ccabd9</ProjectGuid> | ||
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion> | ||
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion> | ||
<DefaultLanguage>en-US</DefaultLanguage> | ||
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled> | ||
<EntryPointProjectUniqueName>..\VirtualDrive\VirtualDrive.csproj</EntryPointProjectUniqueName> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<AppxManifest Include="Package.appxmanifest"> | ||
<SubType>Designer</SubType> | ||
</AppxManifest> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="Images\SplashScreen.scale-200.png" /> | ||
<Content Include="Images\LockScreenLogo.scale-200.png" /> | ||
<Content Include="Images\Square150x150Logo.scale-200.png" /> | ||
<Content Include="Images\Square44x44Logo.scale-200.png" /> | ||
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" /> | ||
<Content Include="Images\StoreLogo.png" /> | ||
<Content Include="Images\Wide310x150Logo.scale-200.png" /> | ||
</ItemGroup> | ||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" /> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.19041.8" PrivateAssets="all" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\VirtualDrive.ThumbnailProvider\VirtualDrive.ThumbnailProvider.csproj"> | ||
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties> | ||
<!--<PublishProfile>Properties\PublishProfiles\$(Configuration)_$(Platform).pubxml</PublishProfile>--> | ||
</ProjectReference> | ||
<ProjectReference Include="..\VirtualDrive\VirtualDrive.csproj"> | ||
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties> | ||
</ProjectReference> | ||
</ItemGroup> | ||
</Project> |
4 changes: 4 additions & 0 deletions
4
Windows/VirtualDrive/VirtualDrive.Package/VirtualDrive.Package.wapproj.user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup /> | ||
</Project> |
51 changes: 51 additions & 0 deletions
51
Windows/VirtualDrive/VirtualDrive.ThumbnailProvider/Mapping.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
using System.IO; | ||
using Microsoft.Extensions.Configuration; | ||
using VirtualDrive.ThumbnailProvider.Settings; | ||
|
||
namespace VirtualDrive.ThumbnailProvider | ||
{ | ||
/// <summary> | ||
/// Maps a user file system path to the remote storage path and back. | ||
/// </summary> | ||
internal static class Mapping | ||
{ | ||
private static AppSettings appSettings = ReadAppSettings(); | ||
|
||
/// <summary> | ||
/// Returns a remote storage URI that corresponds to the user file system path. | ||
/// </summary> | ||
public static string MapPath(string userFileSystemPath) | ||
{ | ||
string relativePath = Path.TrimEndingDirectorySeparator(userFileSystemPath).Substring( | ||
Path.TrimEndingDirectorySeparator(appSettings.UserFileSystemRootPath).Length); | ||
|
||
string path = $"{Path.TrimEndingDirectorySeparator(appSettings.RemoteStorageRootPath)}{relativePath}"; | ||
return path; | ||
} | ||
|
||
/// <summary> | ||
/// Reads settings from appsettings.json. | ||
/// </summary> | ||
private static AppSettings ReadAppSettings() | ||
{ | ||
string assemblyPath = Path.GetDirectoryName(typeof(Mapping).Assembly.Location); | ||
string path = Path.Combine(assemblyPath, "appsettings.json"); | ||
AppSettings settings = new AppSettings(); | ||
IConfiguration configuration = new ConfigurationBuilder().AddJsonFile(path, false, true).Build(); | ||
configuration.Bind(settings); | ||
|
||
// Update settings | ||
if (!Path.IsPathRooted(settings.RemoteStorageRootPath)) | ||
{ | ||
settings.RemoteStorageRootPath = Path.GetFullPath(Path.Combine(assemblyPath, "..", "VirtualDrive", settings.RemoteStorageRootPath)); | ||
} | ||
|
||
if (!Directory.Exists(settings.UserFileSystemRootPath)) | ||
{ | ||
settings.UserFileSystemRootPath = Environment.ExpandEnvironmentVariables(settings.UserFileSystemRootPath); | ||
} | ||
return settings; | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
Windows/VirtualDrive/VirtualDrive.ThumbnailProvider/Settings/AppSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.