Skip to content

Commit

Permalink
win32 -> x86, separate logging, fix(?) CI
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyoyuppe committed Apr 12, 2021
1 parent 6dfd97c commit eebffb1
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 16 deletions.
7 changes: 5 additions & 2 deletions .pipelines/pipeline.user.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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'
Expand Down
3 changes: 1 addition & 2 deletions installer/PowerToysSetup/PowerToysSetup.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions installer/PowerToysSetup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -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" />
Expand Down
3 changes: 0 additions & 3 deletions installer/PowerToysSetup/build_vcm_x86.cmd

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
msbuild ..\VideoConferenceProxyFilter\VideoConferenceProxyFilterx86.sln -p:Configuration="Release" -p:Platform="Win32"

exit 0
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
8 changes: 6 additions & 2 deletions src/modules/videoconference/VideoConferenceShared/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit eebffb1

Please sign in to comment.