Move ImageResizer to separate folder (#3868)

This commit is contained in:
stefansjfw 2020-06-01 17:07:06 +02:00 committed by GitHub
parent 971fc462ab
commit 8cc58d0b89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 129 additions and 122 deletions

View file

@ -50,33 +50,33 @@ build:
to: 'Build_Output'
include:
- 'action_runner.exe'
- 'modules\ar\ImageResizer.resources.dll'
- 'modules\bg\ImageResizer.resources.dll'
- 'modules\ca\ImageResizer.resources.dll'
- 'modules\cs\ImageResizer.resources.dll'
- 'modules\de\ImageResizer.resources.dll'
- 'modules\es\ImageResizer.resources.dll'
- 'modules\eu-ES\ImageResizer.resources.dll'
- 'modules\fr\ImageResizer.resources.dll'
- 'modules\he\ImageResizer.resources.dll'
- 'modules\hu\ImageResizer.resources.dll'
- 'modules\it\ImageResizer.resources.dll'
- 'modules\nb-NO\ImageResizer.resources.dll'
- 'modules\nl\ImageResizer.resources.dll'
- 'modules\pl\ImageResizer.resources.dll'
- 'modules\pt-BR\ImageResizer.resources.dll'
- 'modules\ru\ImageResizer.resources.dll'
- 'modules\sk\ImageResizer.resources.dll'
- 'modules\tr\ImageResizer.resources.dll'
- 'modules\zh-Hans\ImageResizer.resources.dll'
- 'modules\ImageResizer\ar\ImageResizer.resources.dll'
- 'modules\ImageResizer\bg\ImageResizer.resources.dll'
- 'modules\ImageResizer\ca\ImageResizer.resources.dll'
- 'modules\ImageResizer\cs\ImageResizer.resources.dll'
- 'modules\ImageResizer\de\ImageResizer.resources.dll'
- 'modules\ImageResizer\es\ImageResizer.resources.dll'
- 'modules\ImageResizer\eu-ES\ImageResizer.resources.dll'
- 'modules\ImageResizer\fr\ImageResizer.resources.dll'
- 'modules\ImageResizer\he\ImageResizer.resources.dll'
- 'modules\ImageResizer\hu\ImageResizer.resources.dll'
- 'modules\ImageResizer\it\ImageResizer.resources.dll'
- 'modules\ImageResizer\nb-NO\ImageResizer.resources.dll'
- 'modules\ImageResizer\nl\ImageResizer.resources.dll'
- 'modules\ImageResizer\pl\ImageResizer.resources.dll'
- 'modules\ImageResizer\pt-BR\ImageResizer.resources.dll'
- 'modules\ImageResizer\ru\ImageResizer.resources.dll'
- 'modules\ImageResizer\sk\ImageResizer.resources.dll'
- 'modules\ImageResizer\tr\ImageResizer.resources.dll'
- 'modules\ImageResizer\zh-Hans\ImageResizer.resources.dll'
- 'modules\FancyZones\fancyzones.dll'
- 'modules\FancyZones\FancyZonesEditor.exe'
- 'modules\FileExplorerPreview\MarkdownPreviewHandler.dll'
- 'modules\FileExplorerPreview\powerpreview.dll'
- 'modules\FileExplorerPreview\PreviewHandlerCommon.dll'
- 'modules\FileExplorerPreview\SvgPreviewHandler.dll'
- 'modules\ImageResizer.exe'
- 'modules\ImageResizerExt.dll'
- 'modules\ImageResizer\ImageResizer.exe'
- 'modules\ImageResizer\ImageResizerExt.dll'
- 'modules\KeyboardManager.dll'
- 'modules\launcher\Microsoft.PowerToys.Settings.UI.Lib.dll'
- 'modules\launcher\Plugins\Microsoft.Plugin.Calculator\Microsoft.Plugin.Calculator.dll'

View file

@ -3,6 +3,7 @@
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" >
<?define ImageResizerProjectName="ImageResizer"?>
<?define PowerRenameProjectName="PowerRename"?>
<?define ShortcutGuideProjectName="ShortcutGuide"?>
@ -218,25 +219,27 @@
<Directory Id="INSTALLFOLDER" Name="PowerToys">
<Directory Id="SvgsInstallFolder" Name="svgs"/>
<Directory Id="ModulesInstallFolder" Name="modules">
<Directory Id="PowerRenameInstallFolder" Name="$(var.PowerRenameProjectName)"/>
<Directory Id="ShortcutGuideInstallFolder" Name="$(var.ShortcutGuideProjectName)"/>
<!-- Resource file directories -->
<?foreach Language in ar;bg;ca;cs;de;es;eu-ES;fr;he;hu;it;nb-NO;nl;pl;pt-BR;ru;sk;tr;zh-Hans?>
<Directory Id="ImageResizerInstallFolder" Name="$(var.ImageResizerProjectName)">
<!-- Resource file directories -->
<?foreach Language in ar;bg;ca;cs;de;es;eu-ES;fr;he;hu;it;nb-NO;nl;pl;pt-BR;ru;sk;tr;zh-Hans?>
<!--NB: Ids can't contain hyphens-->
<?if $(var.Language) = eu-ES?>
<?define IdSafeLanguage = eu_ES?>
<?define IdSafeLanguage = eu_ES?>
<?elseif $(var.Language) = nb-NO?>
<?define IdSafeLanguage = nb_NO?>
<?define IdSafeLanguage = nb_NO?>
<?elseif $(var.Language) = pt-BR?>
<?define IdSafeLanguage = pt_BR?>
<?define IdSafeLanguage = pt_BR?>
<?elseif $(var.Language) = zh-Hans?>
<?define IdSafeLanguage = zh_Hans?>
<?define IdSafeLanguage = zh_Hans?>
<?else?>
<?define IdSafeLanguage = $(var.Language)?>
<?define IdSafeLanguage = $(var.Language)?>
<?endif?>
<Directory Id="Resources$(var.IdSafeLanguage)Folder" Name="$(var.Language)" />
<?undef IdSafeLanguage?>
<?endforeach?>
<?endforeach?>
</Directory>
<Directory Id="PowerRenameInstallFolder" Name="$(var.PowerRenameProjectName)"/>
<Directory Id="ShortcutGuideInstallFolder" Name="$(var.ShortcutGuideProjectName)"/>
<Directory Id="FileExplorerPreviewInstallFolder" Name="FileExplorerPreview" />
<Directory Id="FancyZonesInstallFolder" Name="FancyZones" />
<Directory Id="LauncherInstallFolder" Name="launcher">
@ -416,89 +419,6 @@
<File Source="$(var.BinX64Dir)modules\KeyboardManager.dll" />
</Component>
<Component Id="Module_ImageResizer" Guid="96E63289-759C-4A73-A56B-EE7429932F72" Win64="yes">
<File Source="$(var.BinX64Dir)modules\ImageResizer.exe">
<netfx:NativeImage Id="ImageResizer.exe" Platform="all" Priority="0" />
</File>
<File Source="$(var.BinX64Dir)modules\GalaSoft.MvvmLight.dll" />
<File Source="$(var.BinX64Dir)modules\GalaSoft.MvvmLight.Platform.dll" />
<File Source="$(var.BinX64Dir)modules\GalaSoft.MvvmLight.Extras.dll" />
<File Source="$(var.BinX64Dir)modules\System.Windows.Interactivity.dll">
<!-- NB: Needed since it's only referenced in XAML. -->
<netfx:NativeImage Id="Interactivity" Platform="all" Priority="0"/>
</File>
<File Source="$(var.BinX64Dir)modules\Newtonsoft.Json.dll" />
<File Source="$(var.BinX64Dir)modules\ImageResizerExt.dll" KeyPath="yes" />
<!-- VCRuntime -->
<?foreach File in vcruntime140.dll;vcruntime140_1.dll;concrt140.dll;msvcp140.dll;msvcp140_1.dll;msvcp140_2.dll;msvcp140_codecvt_ids.dll;vccorlib140.dll?>
<File Id="ImageResizer_$(var.File)" Source="$(var.RepoDir)installer\VCRuntime\$(var.File)" />
<?endforeach?>
</Component>
<Component Id="Module_ImageResizer_Registry" Guid="8B593E2C-2D9B-4EBC-93F7-A2B69707DAC9" Win64="yes">
<RegistryKey Root="HKCR" Key="CLSID\{51B4D7E5-7568-4234-B4BB-47FB3C016A69}\InprocServer32">
<RegistryValue Value="[ModulesInstallFolder]ImageResizerExt.dll" Type="string" />
<RegistryValue Name="ThreadingModel" Value="Apartment" Type="string" />
</RegistryKey>
<!-- Registry Key for the drag and drop handler -->
<RegistryValue Root="HKCR"
Key="Directory\ShellEx\DragDropHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<!-- Registry Keys for the context menu handler for each of the following image formats: bmp, dib, gif, jfif, jpe, jpeg, jpg, jxr, png, rle, tif, tiff, wdp -->
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.bmp\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.dib\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.gif\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.jfif\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.jpe\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.jpeg\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.jpg\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.jxr\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.png\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.rle\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.tif\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.tiff\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.wdp\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
</Component>
<Component Id="Module_PowerPreview_PerUserRegistry" Guid="CD90ADC0-7CD5-4A62-B0AF-23545C1E6DD3" Win64="yes">
<!-- Added a separate component for Per-User registry changes -->
<!-- Registry Key for Class Registration of Svg Preview Handler -->
@ -562,6 +482,92 @@
</Component>
</DirectoryRef>
<DirectoryRef Id="ImageResizerInstallFolder" FileSource="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)">
<Component Id="Module_ImageResizer" Guid="96E63289-759C-4A73-A56B-EE7429932F72" Win64="yes">
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\ImageResizer.exe">
<netfx:NativeImage Id="ImageResizer.exe" Platform="all" Priority="0" />
</File>
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\GalaSoft.MvvmLight.dll" />
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\GalaSoft.MvvmLight.Platform.dll" />
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\GalaSoft.MvvmLight.Extras.dll" />
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\System.Windows.Interactivity.dll">
<!-- NB: Needed since it's only referenced in XAML. -->
<netfx:NativeImage Id="Interactivity" Platform="all" Priority="0"/>
</File>
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\Newtonsoft.Json.dll" />
<File Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\ImageResizerExt.dll" KeyPath="yes" />
<!-- VCRuntime -->
<?foreach File in vcruntime140.dll;vcruntime140_1.dll;concrt140.dll;msvcp140.dll;msvcp140_1.dll;msvcp140_2.dll;msvcp140_codecvt_ids.dll;vccorlib140.dll?>
<File Id="ImageResizer_$(var.File)" Source="$(var.RepoDir)installer\VCRuntime\$(var.File)" />
<?endforeach?>
</Component>
<Component Id="Module_ImageResizer_Registry" Guid="8B593E2C-2D9B-4EBC-93F7-A2B69707DAC9" Win64="yes">
<RegistryKey Root="HKCR" Key="CLSID\{51B4D7E5-7568-4234-B4BB-47FB3C016A69}\InprocServer32">
<RegistryValue Value="[ImageResizerInstallFolder]ImageResizerExt.dll" Type="string" />
<RegistryValue Name="ThreadingModel" Value="Apartment" Type="string" />
</RegistryKey>
<!-- Registry Key for the drag and drop handler -->
<RegistryValue Root="HKCR"
Key="Directory\ShellEx\DragDropHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<!-- Registry Keys for the context menu handler for each of the following image formats: bmp, dib, gif, jfif, jpe, jpeg, jpg, jxr, png, rle, tif, tiff, wdp -->
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.bmp\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.dib\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.gif\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.jfif\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.jpe\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.jpeg\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.jpg\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.jxr\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.png\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.rle\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.tif\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.tiff\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
<RegistryValue Root="HKCR"
Key="SystemFileAssociations\.wdp\ShellEx\ContextMenuHandlers\ImageResizer"
Value="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
Type="string" />
</Component>
</DirectoryRef>
<DirectoryRef Id="PowerRenameInstallFolder" FileSource="$(var.BinX64Dir)modules\$(var.PowerRenameProjectName)">
<Component Id="Module_PowerRename" Guid="E4401D08-27FE-4F96-BA17-0C61FD79E684" Win64="yes">
<File Source="$(var.BinX64Dir)modules\$(var.PowerRenameProjectName)\PowerRenameExt.dll" KeyPath="yes" />
@ -771,7 +777,7 @@
<?define IdSafeLanguage = $(var.Language)?>
<?endif?>
<Component Id="Resources_$(var.IdSafeLanguage)_Component" Directory="Resources$(var.IdSafeLanguage)Folder">
<File Id="Resources_ImageResizer_$(var.IdSafeLanguage)_File" Source="$(var.BinX64Dir)modules\$(var.Language)\ImageResizer.resources.dll" />
<File Id="Resources_ImageResizer_$(var.IdSafeLanguage)_File" Source="$(var.BinX64Dir)modules\$(var.ImageResizerProjectName)\$(var.Language)\ImageResizer.resources.dll" />
</Component>
<?undef IdSafeLanguage?>
<?endforeach?>

View file

@ -80,7 +80,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\</OutDir>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\ImageResizer\</OutDir>
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -91,7 +91,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\</OutDir>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\ImageResizer\</OutDir>
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

View file

@ -20,7 +20,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\$(AssemblyName)</OutputPath>
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\ImageResizer\$(AssemblyName)\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -30,7 +30,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\$(AssemblyName)</OutputPath>
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\ImageResizer\$(AssemblyName)\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View file

@ -58,7 +58,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\</OutputPath>
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\ImageResizer</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -69,7 +69,7 @@
<PlatformTarget>x64</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\</OutputPath>
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\ImageResizer</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View file

@ -7,7 +7,7 @@ namespace ImageResizer.Models
{
public class AdvancedSettings
{
[DllImport("../os-detection.dll", EntryPoint = "UseNewSettings", ExactSpelling = false)]
[DllImport("../../os-detection.dll", EntryPoint = "UseNewSettings", ExactSpelling = false)]
public static extern bool UseNewSettings();
}
}

View file

@ -140,6 +140,7 @@ int runner(bool isProcessElevated)
L"",
L"FileExplorerPreview/",
L"FancyZones/",
L"ImageResizer/",
L"PowerRename/",
L"ShortcutGuide/"
};