[General]Reduce installer size by flattening application paths (#27451)

* Flatten everything and succeed build

* Figure out Settings assets

* Remove UseCommonOutputDirectory tag

* Proper settings app path

* [VCM] Fix assets location

* Fix some runtime paths

* [RegistryPreview]Use MRTCore specific pri file

* [Hosts]Use MRTCore specific pri file

* [Settings]Use MRTCore specific pri file

* [Peek]Use MRTCore specific pri file

* [FileLocksmith]Use MRTCore specific pri file

* [ScreenRuler]Use MRTCore specific pri file

* [PowerRename]Use MRTCore specific pri file

* [Peek]Move assets to own folder

* [FileLocksmith] Use own Assets path

* [Hosts]Use own assets folder

* [PowerRename]Use own assets dir

* [MeasureTool] Use its own assets folder

* [ImageResizer]Use its own assets path

* Fix spellcheck

* Fix tab instead of space in project files

* Normalize target frameworks and platforms

* Remove WINRT_NO_MAKE_DETECTION flag. No longer needed?

* Fix AOT and Hosts locations

* Fix Dll version differences on dependency

* Add Common.UI.csproj as refernce to fix dll versions

* Update ControlzEx to normalize dll versions

* Update System.Management version to 7.0.2

* Add GPOWrapper to Registry Preview to fix dll versions

* [PTRun]Reference Microsoft.Extensions.Hosting to fix dll versions

* Fix remaining output paths / dll version conflicts

* [KeyboardManager]Executables still on their own directories

* Fix Monaco paths

* WinAppSDK apps get to play outside again

* Enable VCM settings again

* Fix KBM Editor path again

* [Monaco]Set to own Assets dir

* Fix installer preamble; Fix publish. remove unneeded publishes

* Remove Hardlink functions

* Installer builds again (still needs work to work)

* Readd Monaco to spellcheck excludes

* Fix spellcheck and call publish.cmd again

* [Installer] Remove components that don't need own dirs

* [Installer] Refactor Power Launcher

* [Installer] Refactor Color Picker

* [Installer] Refactor Monaco assets

* [Installer]Generate File script no longer needs to remove files

* [Installer]Refactor FileLocksmith

* [Installer] Refactor Hosts

* [Installer]Refactor Image Resizer

* [Installer]Refactor MouseUtils

* [Installer]Refactor MWB

* [Installer]Refactor MeasureTool

* [Installer]Refactor Peek

* [Installer]Refactor PowerRename and registry fixes

* [Installer]Refactor RegistryPreview

* [Installer]Refactor ShortcutGuide

* [Installer]Refactor Settings

* [Installer]Clean up some unused stuff

* [Installer]Clean up stuff for user install

* [Installer]Fix WinUi3Apps wxs

* [Installer]Fix misplaced folders

* [Installer]Move x86 VCM dll to right path

* Fix monaco language list location

* [Installer]Fix VCM directory reference

* [CI]Fix signing

* [Installer] Fix resources folder for release CI

* [ci]Looks like we still ship NLog on PowerToys Run

* [Settings]Add dependency to avoid dll collision with Experimentation

* [RegistryPreview]Move XAML files to own path

* [RegistryPreview]Fix app icon

* [Hosts]Move XAML files to their own path

* [FileLocksmith]Move XAML files to their own path

* [Peek]Move XAML files to own path

* [ScreenRuler]Move XAML files to its own path

* [Settings]Move XAML to its own path

* [ColorPicker]Move Resources to Assets

* [ShortcutGuide]Move svgs to own Assets path

* [Awake]Move images to assets path

* [Runner]Remove debug checks for PowerToys Run assets

* [PTRun]Move images to its own assets path

* [ImageResizer]Icon for context menu on own assets path

* [PowerRename]Move ico to its own path

* Remove unneeded intermediary directories

* Remove further int dirs

* Move tests to its own output path

* Fix spellcheck

* spellcheck: remove warnings

* [CppAnalyzers]Ignore rule in a tool

* [CI]Check if all deps.json files reference same versions

* fix spellcheck

* [ci]Fix task identation

* [ci]Add script to guard against asset conflicts

* [ci]Add more deps.json audit steps in the release build

* Add xbf to spellcheck expects

* Fix typo in asset conflict check scripts

* Fix some more dependency conflicts

* Downgrade CsWinRT to have the same dll version as sdk

* [ci]Do a recursive check for every deps.json

* Fix spellcheck error inside comment

* [ci]Fix asset script error

* [ci]Name deps.json verify tasks a bit better

* [ci]Improve deps json verify script output

* [ci]Update WinRT version to the same running in CI

* Also upgrade CsWinRT in NOTICE.MD

* [PowerRename]Move XAML files to own path

* [Common]Fix Settings executable path

* [ci]Verify there's no xbf files in app directories

* [installer]Fix firewall path

* [Monaco]Move new files to their proper assets path

* [Monaco]Fix paths for new files after merge

* [Feedback]Removed unneeded build conditions

* [Feedback]Clear vcxproj direct reference to frameworks

* [Feedback]RunPlugins name to hold PTRun plugins

* [Feedback]Remove unneeded foreach

* [Feedback]Shortcut Guide svgs with ** in project file

* [Feedback]Fix spellcheck
This commit is contained in:
Jaime Bernardo
2023-07-20 00:12:46 +01:00
committed by GitHub
parent 1f44085e41
commit 864b862952
762 changed files with 2005 additions and 3118 deletions

View File

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 822 B

View File

@@ -20,19 +20,19 @@ std::wstring cached_position = L"";
Toolbar::Toolbar()
{
toolbar = this;
darkImages.camOnMicOn = Gdiplus::Image::FromFile(L"modules/VideoConference/Icons/On-On Dark.png");
darkImages.camOffMicOn = Gdiplus::Image::FromFile(L"modules/VideoConference/Icons/On-Off Dark.png");
darkImages.camOnMicOff = Gdiplus::Image::FromFile(L"modules/VideoConference/Icons/Off-On Dark.png");
darkImages.camOffMicOff = Gdiplus::Image::FromFile(L"modules/VideoConference/Icons/Off-Off Dark.png");
darkImages.camUnusedMicOn = Gdiplus::Image::FromFile(L"modules/VideoConference/Icons/On-NotInUse Dark.png");
darkImages.camUnusedMicOff = Gdiplus::Image::FromFile(L"modules/VideoConference/Icons/Off-NotInUse Dark.png");
darkImages.camOnMicOn = Gdiplus::Image::FromFile(L"Assets/VCM/On-On Dark.png");
darkImages.camOffMicOn = Gdiplus::Image::FromFile(L"Assets/VCM/On-Off Dark.png");
darkImages.camOnMicOff = Gdiplus::Image::FromFile(L"Assets/VCM/Off-On Dark.png");
darkImages.camOffMicOff = Gdiplus::Image::FromFile(L"Assets/VCM/Off-Off Dark.png");
darkImages.camUnusedMicOn = Gdiplus::Image::FromFile(L"Assets/VCM/On-NotInUse Dark.png");
darkImages.camUnusedMicOff = Gdiplus::Image::FromFile(L"Assets/VCM/Off-NotInUse Dark.png");
lightImages.camOnMicOn = Gdiplus::Image::FromFile(L"modules/VideoConference/Icons/On-On Light.png");
lightImages.camOffMicOn = Gdiplus::Image::FromFile(L"modules/VideoConference/Icons/On-Off Light.png");
lightImages.camOnMicOff = Gdiplus::Image::FromFile(L"modules/VideoConference/Icons/Off-On Light.png");
lightImages.camOffMicOff = Gdiplus::Image::FromFile(L"modules/VideoConference/Icons/Off-Off Light.png");
lightImages.camUnusedMicOn = Gdiplus::Image::FromFile(L"modules/VideoConference/Icons/On-NotInUse Light.png");
lightImages.camUnusedMicOff = Gdiplus::Image::FromFile(L"modules/VideoConference/Icons/Off-NotInUse Light.png");
lightImages.camOnMicOn = Gdiplus::Image::FromFile(L"Assets/VCM/On-On Light.png");
lightImages.camOffMicOn = Gdiplus::Image::FromFile(L"Assets/VCM/On-Off Light.png");
lightImages.camOnMicOff = Gdiplus::Image::FromFile(L"Assets/VCM/Off-On Light.png");
lightImages.camOffMicOff = Gdiplus::Image::FromFile(L"Assets/VCM/Off-Off Light.png");
lightImages.camUnusedMicOn = Gdiplus::Image::FromFile(L"Assets/VCM/On-NotInUse Light.png");
lightImages.camUnusedMicOff = Gdiplus::Image::FromFile(L"Assets/VCM/Off-NotInUse Light.png");
}
void Toolbar::scheduleModuleSettingsUpdate()

View File

@@ -6,8 +6,9 @@
<ProjectGuid>{5ABA70DE-3A3F-41F6-A1F5-D1F74F54F9BB}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>overlaywindow</RootNamespace>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<ProjectName>VideoConferenceModule</ProjectName>
<OutDir>..\..\..\..\$(Platform)\$(Configuration)\</OutDir>
<TargetName>PowerToys.VideoConferenceModule</TargetName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
@@ -35,15 +36,9 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\VideoConference\</OutDir>
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\</IntDir>
<TargetName>PowerToys.VideoConferenceModule</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\VideoConference\</OutDir>
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\</IntDir>
<TargetName>PowerToys.VideoConferenceModule</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
@@ -67,10 +62,6 @@
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>shlwapi.lib;gdiplus.lib;dwmapi.lib;uxtheme.lib;shcore.lib;Wtsapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>xcopy /y /I "$(ProjectDir)Icons\*" "$(OutDir)Icons"
xcopy /y /I "$(ProjectDir)black.bmp*" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
@@ -90,10 +81,6 @@ xcopy /y /I "$(ProjectDir)black.bmp*" "$(OutDir)"</Command>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>shlwapi.lib;gdiplus.lib;dwmapi.lib;uxtheme.lib;shcore.lib;Wtsapi32.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>xcopy /y /I "$(ProjectDir)Icons\*" "$(OutDir)Icons"
xcopy /y /I "$(ProjectDir)black.bmp*" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="AudioDeviceNotificationClient.h" />
@@ -121,34 +108,58 @@ xcopy /y /I "$(ProjectDir)black.bmp*" "$(OutDir)"</Command>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Icons\Off-NotInUse Dark.svg" />
<None Include="Icons\Off-NotInUse Light.svg" />
<None Include="Icons\Off-Off Dark.svg" />
<None Include="Icons\Off-Off Light.svg" />
<None Include="Icons\Off-On Dark.svg" />
<None Include="Icons\Off-On Light.svg" />
<None Include="Icons\On-NotInUse Dark.svg" />
<None Include="Icons\On-NotInUse Light.svg" />
<None Include="Icons\On-Off Dark.svg" />
<None Include="Icons\On-Off Light.svg" />
<None Include="Icons\On-On Dark.svg" />
<None Include="Icons\On-On Light.svg" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Image Include="black.bmp" />
<Image Include="Icons\Off-NotInUse Dark.png" />
<Image Include="Icons\Off-NotInUse Light.png" />
<Image Include="Icons\Off-Off Dark.png" />
<Image Include="Icons\Off-Off Light.png" />
<Image Include="Icons\Off-On Dark.png" />
<Image Include="Icons\Off-On Light.png" />
<Image Include="Icons\On-NotInUse Dark.png" />
<Image Include="Icons\On-NotInUse Light.png" />
<Image Include="Icons\On-Off Dark.png" />
<Image Include="Icons\On-Off Light.png" />
<Image Include="Icons\On-On Dark.png" />
<Image Include="Icons\On-On Light.png" />
<Content Include="Assets\VCM\black.bmp">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\VCM\Off-NotInUse Dark.png">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\VCM\Off-NotInUse Light.png">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\VCM\Off-Off Dark.png">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\VCM\Off-Off Light.png">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\VCM\Off-On Dark.png">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\VCM\Off-On Light.png">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\VCM\On-NotInUse Dark.png">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\VCM\On-NotInUse Light.png">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\VCM\On-Off Dark.png">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\VCM\On-Off Light.png">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\VCM\On-On Dark.png">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\VCM\On-On Light.png">
<DeploymentContent>true</DeploymentContent>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@@ -18,89 +18,55 @@
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<Image Include="black.bmp" />
<Image Include="Icons\Off-NotInUse Dark.png">
<Filter>Icons</Filter>
</Image>
<Image Include="Icons\Off-NotInUse Light.png">
<Filter>Icons</Filter>
</Image>
<Image Include="Icons\Off-Off Dark.png">
<Filter>Icons</Filter>
</Image>
<Image Include="Icons\Off-Off Light.png">
<Filter>Icons</Filter>
</Image>
<Image Include="Icons\Off-On Dark.png">
<Filter>Icons</Filter>
</Image>
<Image Include="Icons\Off-On Light.png">
<Filter>Icons</Filter>
</Image>
<Image Include="Icons\On-NotInUse Dark.png">
<Filter>Icons</Filter>
</Image>
<Image Include="Icons\On-NotInUse Light.png">
<Filter>Icons</Filter>
</Image>
<Image Include="Icons\On-Off Dark.png">
<Filter>Icons</Filter>
</Image>
<Image Include="Icons\On-Off Light.png">
<Filter>Icons</Filter>
</Image>
<Image Include="Icons\On-On Dark.png">
<Filter>Icons</Filter>
</Image>
<Image Include="Icons\On-On Light.png">
<Filter>Icons</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Icons\Off-NotInUse Dark.svg">
<Filter>Icons</Filter>
</None>
<None Include="Icons\Off-NotInUse Light.svg">
<Filter>Icons</Filter>
</None>
<None Include="Icons\Off-Off Dark.svg">
<Filter>Icons</Filter>
</None>
<None Include="Icons\Off-Off Light.svg">
<Filter>Icons</Filter>
</None>
<None Include="Icons\Off-On Dark.svg">
<Filter>Icons</Filter>
</None>
<None Include="Icons\Off-On Light.svg">
<Filter>Icons</Filter>
</None>
<None Include="Icons\On-NotInUse Dark.svg">
<Filter>Icons</Filter>
</None>
<None Include="Icons\On-NotInUse Light.svg">
<Filter>Icons</Filter>
</None>
<None Include="Icons\On-Off Dark.svg">
<Filter>Icons</Filter>
</None>
<None Include="Icons\On-Off Light.svg">
<Filter>Icons</Filter>
</None>
<None Include="Icons\On-On Dark.svg">
<Filter>Icons</Filter>
</None>
<None Include="Icons\On-On Light.svg">
<Filter>Icons</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Filter Include="Icons">
<UniqueIdentifier>{735361e2-82fa-4034-b9c9-cd6aa099eaa5}</UniqueIdentifier>
<Filter Include="Assets">
<UniqueIdentifier>{efd98846-4568-41d4-a425-451c246802cd}</UniqueIdentifier>
</Filter>
<Filter Include="Assets\VCM">
<UniqueIdentifier>{e79f8c1a-b78b-4ba5-b923-f7db79eba776}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="VideoConferenceModule.rc" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\VCM\Off-NotInUse Dark.png">
<Filter>Assets\VCM</Filter>
</Content>
<Content Include="Assets\VCM\Off-NotInUse Light.png">
<Filter>Assets\VCM</Filter>
</Content>
<Content Include="Assets\VCM\Off-Off Dark.png">
<Filter>Assets\VCM</Filter>
</Content>
<Content Include="Assets\VCM\Off-Off Light.png">
<Filter>Assets\VCM</Filter>
</Content>
<Content Include="Assets\VCM\Off-On Dark.png">
<Filter>Assets\VCM</Filter>
</Content>
<Content Include="Assets\VCM\Off-On Light.png">
<Filter>Assets\VCM</Filter>
</Content>
<Content Include="Assets\VCM\On-NotInUse Dark.png">
<Filter>Assets\VCM</Filter>
</Content>
<Content Include="Assets\VCM\On-NotInUse Light.png">
<Filter>Assets\VCM</Filter>
</Content>
<Content Include="Assets\VCM\On-Off Dark.png">
<Filter>Assets\VCM</Filter>
</Content>
<Content Include="Assets\VCM\On-Off Light.png">
<Filter>Assets\VCM</Filter>
</Content>
<Content Include="Assets\VCM\On-On Dark.png">
<Filter>Assets\VCM</Filter>
</Content>
<Content Include="Assets\VCM\On-On Light.png">
<Filter>Assets\VCM</Filter>
</Content>
<Content Include="Assets\VCM\black.bmp">
<Filter>Assets\VCM</Filter>
</Content>
</ItemGroup>
</Project>

View File

@@ -534,8 +534,7 @@ void toggleProxyCamRegistration(const bool enable)
return;
}
auto vcmRoot = fs::path{ get_module_folderpath() } / "modules";
vcmRoot /= "VideoConference";
auto vcmRoot = fs::path{ get_module_folderpath() };
#if defined(_M_ARM64)
std::array<fs::path, 2> proxyFilters = { vcmRoot / "PowerToys.VideoConferenceProxyFilter_ARM64.dll", vcmRoot / "PowerToys.VideoConferenceProxyFilter_x86.dll" };
#else
@@ -687,7 +686,7 @@ void VideoConferenceModule::sendOverlayImageUpdate()
PathRemoveFileSpecW(powertoysDirectory);
std::wstring blankImagePath(powertoysDirectory);
blankImagePath += L"\\modules\\VideoConference\\black.bmp";
blankImagePath += L"\\Assets\\VCM\\black.bmp";
_imageOverlayChannel = SerializedSharedMemory::create_readonly(CameraOverlayImageChannel::endpoint(),
settings.imageOverlayPath != L"" ? settings.imageOverlayPath : blankImagePath);