win32 -> x86, separate logging, fix(?) CI

This commit is contained in:
yuyoyuppe
2021-03-12 15:49:06 +03:00
parent 6dfd97c43f
commit eebffb1571
9 changed files with 26 additions and 16 deletions

View File

@@ -61,6 +61,10 @@ build:
- 'x64/**/*.pdb'
exclude:
- 'x64/Release/obj/**/*.pdb'
- from: 'x86/Release'
- to: 'Build_Output'
include:
- 'modules\VideoConference\VideoConferenceProxyFilter_x86.dll'
- from: 'x64/Release'
to: 'Build_Output'
include:
@@ -147,8 +151,7 @@ build:
- 'modules\PowerRename\PowerRenameExt.dll'
- 'modules\ShortcutGuide\ShortcutGuide.dll'
- 'modules\VideoConference\VideoConferenceModule.dll'
- 'modules\VideoConference\VideoConferenceProxyFilter.dll'
- 'modules\VideoConference\VideoConferenceProxyFilterx86.dll'
- 'modules\VideoConference\VideoConferenceProxyFilter_x64.dll'
- 'Notifications.dll'
- 'os-detection.dll'
- 'PowerToys.exe'

View File

@@ -77,8 +77,7 @@
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.18362.0
SET PTRoot=..\..\..\..
call "..\..\publish.cmd"
)
call "..\..\build_vcm_x86.cmd"</PreBuildEvent>
)</PreBuildEvent>
</PropertyGroup>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@@ -12,7 +12,7 @@
<?define RepoDir="$(var.ProjectDir)..\..\" ?>
<?define BinX64Dir="$(var.RepoDir)x64\$(var.Configuration)\" ?>
<?define BinX32Dir="$(var.RepoDir)Win32\$(var.Configuration)\" ?>
<?define BinX32Dir="$(var.RepoDir)x86\$(var.Configuration)\" ?>
<Product Id="*"
Name="PowerToys (Preview)"
@@ -597,10 +597,10 @@
<DirectoryRef Id="VideoConferenceInstallFolder" FileSource="$(var.BinX64Dir)modules\$(var.VideoConferenceProjectName)\">
<Component Id="Module_VideoConference" Guid="5996527a-40fc-432e-b3ac-abc0b4bd3887" Win64="yes">
<Condition>WINDOWSBUILDNUMBER >= 18362</Condition>
<File SelfRegCost="1" Source="$(var.BinX64Dir)modules\$(var.VideoConferenceProjectName)\VideoConferenceProxyFilter.dll" KeyPath="yes">
<File SelfRegCost="1" Source="$(var.BinX64Dir)modules\$(var.VideoConferenceProjectName)\VideoConferenceProxyFilter_x64.dll" KeyPath="yes">
<Class Id="{31AD75E9-8C3A-49C8-B9ED-5880D6B4A764}" Context="InprocServer32" ThreadingModel="apartment" Description="PowerToys VideoConference Mute" />
</File>
<File SelfRegCost="1" Source="$(var.BinX32Dir)modules\$(var.VideoConferenceProjectName)\VideoConferenceProxyFilterx86.dll">
<File SelfRegCost="1" Source="$(var.BinX32Dir)modules\$(var.VideoConferenceProjectName)\VideoConferenceProxyFilter_x86.dll">
<Class Id="{31AD75E9-8C3A-49C8-B9ED-5880D6B4A732}" Context="InprocServer32" ThreadingModel="apartment" Description="PowerToys VideoConference Mute" />
</File>
<File Source="$(var.BinX64Dir)modules\$(var.VideoConferenceProjectName)\VideoConferenceModule.dll" />

View File

@@ -1,3 +0,0 @@
msbuild ..\..\..\..\src\modules\videoconference\VideoConferenceProxyFilter\VideoConferenceProxyFilterx86.sln -p:Configuration="Release" -p:Platform="Win32"
exit 0

View File

@@ -79,6 +79,9 @@
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>mfplat.lib;mf.lib;mfreadwrite.lib;mfuuid.lib;shlwapi.lib;gdiplus.lib;dwmapi.lib;uxtheme.lib;shcore.lib;Wtsapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>call "$(ProjectDir)build_vcm_x86.cmd"</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>xcopy /y /I "$(ProjectDir)Icons\*" "$(OutDir)Icons"
xcopy /y /I "$(ProjectDir)black.bmp*" "$(OutDir)"</Command>

View File

@@ -0,0 +1,3 @@
msbuild ..\VideoConferenceProxyFilter\VideoConferenceProxyFilterx86.sln -p:Configuration="Release" -p:Platform="Win32"
exit 0

View File

@@ -63,10 +63,11 @@
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Platform)'!='Win32'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\modules\VideoConference\</OutDir>
<TargetName>VideoConferenceProxyFilter_x64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='Win32'">
<OutDir>..\..\..\..\$(Platform)\$(Configuration)\modules\VideoConference\</OutDir>
<TargetName>VideoConferenceProxyFilterx86</TargetName>
<OutDir>..\..\..\..\x86\$(Configuration)\modules\VideoConference\</OutDir>
<TargetName>VideoConferenceProxyFilter_x86</TargetName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@@ -9,7 +9,7 @@
#include <mfapi.h>
#pragma warning(disable: 4127)
#pragma warning(disable : 4127)
static std::mutex logMutex;
constexpr inline size_t maxLogSizeMegabytes = 10;
@@ -37,7 +37,11 @@ void LogToFile(std::wstring what, const bool verbose)
std::lock_guard lock{ logMutex };
std::wstring logFilePath = tempPath;
logFilePath += L"\\PowerToysVideoConference.log";
#if defined(_WIN64)
logFilePath += L"\\PowerToysVideoConference_x64.log";
#elif defined(_WIN32)
logFilePath += L"\\PowerToysVideoConference_x86.log";
#endif
size_t logSizeMBs = 0;
try
{

View File

@@ -53,8 +53,8 @@
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)\obj\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='Win32'">
<OutDir>..\..\..\..\$(Platform)\$(Configuration)\modules\VideoConference\</OutDir>
<IntDir>..\..\..\..\$(Platform)\$(Configuration)\obj\$(ProjectName)\</IntDir>
<OutDir>..\..\..\..\x86\$(Configuration)\modules\VideoConference\</OutDir>
<IntDir>..\..\..\..\x86\$(Configuration)\obj\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup>
<LinkIncremental>true</LinkIncremental>