Skip to content

Commit 2b87fee

Browse files
authored
Small build changes (#4807)
* Updates the paths where we search for the outputs of a projects in a way that reflects new changes to the internal builds * Renames the build configuration for static linking in the solution to `ReleaseStatic`, like in the projects * Changes the original file name that is baked into binaries to `winget.exe`. This isn't accurate for all binaries (only the main one) but it is not actually used in official builds
1 parent 9116d5d commit 2b87fee

File tree

7 files changed

+220
-223
lines changed

7 files changed

+220
-223
lines changed

src/AppInstallerCLI.sln

+203-203
Large diffs are not rendered by default.

src/AppInstallerCLICore/AppInstallerCLICore.vcxproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,8 @@
541541
<Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorTextNuget)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
542542
<Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorTextNuget)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
543543
<PropertyGroup>
544-
<MicrosoftManagementConfigurationProcessorPath>$(OutputPath)..\Microsoft.Management.Configuration.Processor\Microsoft.Management.Configuration.Processor.winmd</MicrosoftManagementConfigurationProcessorPath>
544+
<!-- The output path for this project is different on some builds where the RIDs are not used in the output. -->
545+
<MicrosoftManagementConfigurationProcessorPath>$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\Microsoft.Management.Configuration.Processor.winmd</MicrosoftManagementConfigurationProcessorPath>
545546
<MicrosoftManagementConfigurationProcessorPath Condition="!Exists('$(MicrosoftManagementConfigurationProcessorPath)')">$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\net6.0-windows10.0.22000.0\win\Microsoft.Management.Configuration.Processor.winmd</MicrosoftManagementConfigurationProcessorPath>
546547
</PropertyGroup>
547548
<Message Importance="high" Text="Microsoft.Management.Configuration.Processor.winmd -&gt; $(MicrosoftManagementConfigurationProcessorPath)" />

src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj

+9-10
Original file line numberDiff line numberDiff line change
@@ -228,30 +228,29 @@
228228
</PropertyGroup>
229229
<Target Name="WinGetIncludeAdditionalFilesInPackage" AfterTargets="_ComputeAppxPackagePayload">
230230
<PropertyGroup>
231-
<WinGetAdditonalPackageFileRoot>$(SolutionDir)</WinGetAdditonalPackageFileRoot>
232-
<WinGetAdditonalPackageFileRoot Condition="!Exists('$(WinGetAdditonalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\WindowsPackageManager\WindowsPackageManager.dll')">$(OutputPath)\..\..\..\..</WinGetAdditonalPackageFileRoot>
231+
<WinGetAdditionalPackageFileRoot>$(SolutionDir)</WinGetAdditionalPackageFileRoot>
233232
</PropertyGroup>
234-
<Message Importance="normal" Text="WinGetAdditonalPackageFileRoot = $(WinGetAdditonalPackageFileRoot)" />
233+
<Message Importance="normal" Text="WinGetAdditionalPackageFileRoot = $(WinGetAdditionalPackageFileRoot)" />
235234
<ItemGroup>
236-
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\WindowsPackageManager\WindowsPackageManager.dll">
235+
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\WindowsPackageManager\WindowsPackageManager.dll">
237236
<PackagePath>WindowsPackageManager.dll</PackagePath>
238237
</WinGetAdditionalPackageFile>
239-
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\Microsoft.Management.Deployment\Microsoft.Management.Deployment.winmd">
238+
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\Microsoft.Management.Deployment\Microsoft.Management.Deployment.winmd">
240239
<PackagePath>Microsoft.Management.Deployment.winmd</PackagePath>
241240
</WinGetAdditionalPackageFile>
242-
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\Microsoft.Management.Configuration\Microsoft.Management.Configuration.dll">
241+
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\Microsoft.Management.Configuration\Microsoft.Management.Configuration.dll">
243242
<PackagePath>Microsoft.Management.Configuration.dll</PackagePath>
244243
</WinGetAdditionalPackageFile>
245-
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\Microsoft.Management.Configuration\Microsoft.Management.Configuration.winmd">
244+
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\Microsoft.Management.Configuration\Microsoft.Management.Configuration.winmd">
246245
<PackagePath>Microsoft.Management.Configuration.winmd</PackagePath>
247246
</WinGetAdditionalPackageFile>
248-
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\**\Microsoft.Management.Configuration.Processor.winmd">
247+
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\**\Microsoft.Management.Configuration.Processor.winmd">
249248
<PackagePath>Microsoft.Management.Configuration.Processor.winmd</PackagePath>
250249
</WinGetAdditionalPackageFile>
251-
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Projection\**\Microsoft.Management.Configuration.Projection.dll">
250+
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Projection\**\Microsoft.Management.Configuration.Projection.dll">
252251
<PackagePath>ConfigurationRemotingServer\Microsoft.Management.Configuration.Projection.dll</PackagePath>
253252
</WinGetAdditionalPackageFile>
254-
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\ConfigurationRemotingServer\net6.0-windows10.0.22000.0\$(ConfigServerRid)\**\*">
253+
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\ConfigurationRemotingServer\net6.0-windows10.0.22000.0\$(ConfigServerRid)\**\*">
255254
<PackagePath>ConfigurationRemotingServer</PackagePath>
256255
<Recurse>true</Recurse>
257256
</WinGetAdditionalPackageFile>

src/ConfigurationRemotingServer/ConfigurationRemotingServer.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939

4040
<Target Name="PwshFiles" AfterTargets="AfterBuild">
4141
<ItemGroup>
42-
<RefFiles Include="$(OutputPath)..\..\..\..\..\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\$(TargetFramework)\win\ref\**\*.*" />
43-
<WinModuleFiles Include="$(OutputPath)..\..\..\..\..\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\$(TargetFramework)\win\Modules\**\*.*" />
42+
<RefFiles Include="$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\$(TargetFramework)\win\ref\**\*.*" />
43+
<WinModuleFiles Include="$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\$(TargetFramework)\win\Modules\**\*.*" />
4444
<!-- The output path for this project is different on some builds where the RIDs are not used in the output. -->
45-
<RefFiles Condition="!Exists(@(RefFiles))" Include="$(OutputPath)..\Microsoft.Management.Configuration.Processor\ref\**\*.*" />
46-
<WinModuleFiles Condition="!Exists(@(WinModuleFiles))" Include="$(OutputPath)..\Microsoft.Management.Configuration.Processor\Modules\**\*.*" />
45+
<RefFiles Condition="!Exists(@(RefFiles))" Include="$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\ref\**\*.*" />
46+
<WinModuleFiles Condition="!Exists(@(WinModuleFiles))" Include="$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\Modules\**\*.*" />
4747
</ItemGroup>
4848
<Copy SourceFiles="@(RefFiles)" DestinationFolder="$(OutputPath)\ref\" />
4949
<Copy SourceFiles="@(WinModuleFiles)" DestinationFolder="$(OutputPath)\Modules\%(RecursiveDir)\" />

src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/detours/detours.vcxproj

-3
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,15 @@
106106
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
107107
<LinkIncremental>true</LinkIncremental>
108108
<IntDir>$(Platform)\$(Configuration)\</IntDir>
109-
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
110109
</PropertyGroup>
111110
<PropertyGroup Condition="'$(Configuration)'=='Release'">
112111
<LinkIncremental>false</LinkIncremental>
113112
<IntDir>$(Platform)\$(Configuration)\</IntDir>
114-
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
115113
<SpectreMitigation>Spectre</SpectreMitigation>
116114
</PropertyGroup>
117115
<PropertyGroup Condition="'$(Configuration)'=='ReleaseStatic'">
118116
<LinkIncremental>false</LinkIncremental>
119117
<IntDir>$(Platform)\$(Configuration)\</IntDir>
120-
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
121118
<SpectreMitigation>Spectre</SpectreMitigation>
122119
</PropertyGroup>
123120
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

src/binver/binver.vcxitems

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<ClInclude Include="$(MSBuildThisFileDirectory)binver\version.h" />
1919
</ItemGroup>
2020
<ItemGroup>
21-
<ResourceCompile Include="$(MSBuildThisFileDirectory)binver\version.rc" Condition="'$(XefNativeAutoVersion)'!='true'" />
21+
<ResourceCompile Include="$(MSBuildThisFileDirectory)binver\version.rc" Condition="'$(IsPipelineBuild)'!='true'" />
2222
</ItemGroup>
2323
<ItemGroup>
2424
<None Include="$(MSBuildThisFileDirectory)Update-BinVer.ps1" />

src/binver/binver/version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#define VER_PRODUCTNAME_STR "WinGet CLI"
1717
#define VER_PRODUCT_VERSION VER_FILE_VERSION
1818
#define VER_PRODUCT_VERSION_STR VER_FILE_VERSION_STR
19-
#define VER_ORIGINAL_FILENAME_STR "AppInstallerCLI.exe"
19+
#define VER_ORIGINAL_FILENAME_STR "winget.exe"
2020
#define VER_INTERNAL_NAME_STR VER_ORIGINAL_FILENAME_STR
2121
#define VER_COPYRIGHT_STR "Copyright (c) Microsoft Corporation"
2222

0 commit comments

Comments
 (0)