Skip to content

Commit

Permalink
Small build changes (#4807)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
florelis committed Sep 12, 2024
1 parent 9116d5d commit 2b87fee
Show file tree
Hide file tree
Showing 7 changed files with 220 additions and 223 deletions.
406 changes: 203 additions & 203 deletions src/AppInstallerCLI.sln

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/AppInstallerCLICore/AppInstallerCLICore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@
<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'))" />
<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'))" />
<PropertyGroup>
<MicrosoftManagementConfigurationProcessorPath>$(OutputPath)..\Microsoft.Management.Configuration.Processor\Microsoft.Management.Configuration.Processor.winmd</MicrosoftManagementConfigurationProcessorPath>
<!-- The output path for this project is different on some builds where the RIDs are not used in the output. -->
<MicrosoftManagementConfigurationProcessorPath>$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\Microsoft.Management.Configuration.Processor.winmd</MicrosoftManagementConfigurationProcessorPath>
<MicrosoftManagementConfigurationProcessorPath Condition="!Exists('$(MicrosoftManagementConfigurationProcessorPath)')">$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\net6.0-windows10.0.22000.0\win\Microsoft.Management.Configuration.Processor.winmd</MicrosoftManagementConfigurationProcessorPath>
</PropertyGroup>
<Message Importance="high" Text="Microsoft.Management.Configuration.Processor.winmd -&gt; $(MicrosoftManagementConfigurationProcessorPath)" />
Expand Down
19 changes: 9 additions & 10 deletions src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj
Original file line number Diff line number Diff line change
Expand Up @@ -228,30 +228,29 @@
</PropertyGroup>
<Target Name="WinGetIncludeAdditionalFilesInPackage" AfterTargets="_ComputeAppxPackagePayload">
<PropertyGroup>
<WinGetAdditonalPackageFileRoot>$(SolutionDir)</WinGetAdditonalPackageFileRoot>
<WinGetAdditonalPackageFileRoot Condition="!Exists('$(WinGetAdditonalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\WindowsPackageManager\WindowsPackageManager.dll')">$(OutputPath)\..\..\..\..</WinGetAdditonalPackageFileRoot>
<WinGetAdditionalPackageFileRoot>$(SolutionDir)</WinGetAdditionalPackageFileRoot>
</PropertyGroup>
<Message Importance="normal" Text="WinGetAdditonalPackageFileRoot = $(WinGetAdditonalPackageFileRoot)" />
<Message Importance="normal" Text="WinGetAdditionalPackageFileRoot = $(WinGetAdditionalPackageFileRoot)" />
<ItemGroup>
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\WindowsPackageManager\WindowsPackageManager.dll">
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\WindowsPackageManager\WindowsPackageManager.dll">
<PackagePath>WindowsPackageManager.dll</PackagePath>
</WinGetAdditionalPackageFile>
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\Microsoft.Management.Deployment\Microsoft.Management.Deployment.winmd">
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\Microsoft.Management.Deployment\Microsoft.Management.Deployment.winmd">
<PackagePath>Microsoft.Management.Deployment.winmd</PackagePath>
</WinGetAdditionalPackageFile>
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\Microsoft.Management.Configuration\Microsoft.Management.Configuration.dll">
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\Microsoft.Management.Configuration\Microsoft.Management.Configuration.dll">
<PackagePath>Microsoft.Management.Configuration.dll</PackagePath>
</WinGetAdditionalPackageFile>
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\Microsoft.Management.Configuration\Microsoft.Management.Configuration.winmd">
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\Microsoft.Management.Configuration\Microsoft.Management.Configuration.winmd">
<PackagePath>Microsoft.Management.Configuration.winmd</PackagePath>
</WinGetAdditionalPackageFile>
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\**\Microsoft.Management.Configuration.Processor.winmd">
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\**\Microsoft.Management.Configuration.Processor.winmd">
<PackagePath>Microsoft.Management.Configuration.Processor.winmd</PackagePath>
</WinGetAdditionalPackageFile>
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Projection\**\Microsoft.Management.Configuration.Projection.dll">
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Projection\**\Microsoft.Management.Configuration.Projection.dll">
<PackagePath>ConfigurationRemotingServer\Microsoft.Management.Configuration.Projection.dll</PackagePath>
</WinGetAdditionalPackageFile>
<WinGetAdditionalPackageFile Include="$(WinGetAdditonalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\ConfigurationRemotingServer\net6.0-windows10.0.22000.0\$(ConfigServerRid)\**\*">
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\ConfigurationRemotingServer\net6.0-windows10.0.22000.0\$(ConfigServerRid)\**\*">
<PackagePath>ConfigurationRemotingServer</PackagePath>
<Recurse>true</Recurse>
</WinGetAdditionalPackageFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@

<Target Name="PwshFiles" AfterTargets="AfterBuild">
<ItemGroup>
<RefFiles Include="$(OutputPath)..\..\..\..\..\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\$(TargetFramework)\win\ref\**\*.*" />
<WinModuleFiles Include="$(OutputPath)..\..\..\..\..\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\$(TargetFramework)\win\Modules\**\*.*" />
<RefFiles Include="$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\$(TargetFramework)\win\ref\**\*.*" />
<WinModuleFiles Include="$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\$(TargetFramework)\win\Modules\**\*.*" />
<!-- The output path for this project is different on some builds where the RIDs are not used in the output. -->
<RefFiles Condition="!Exists(@(RefFiles))" Include="$(OutputPath)..\Microsoft.Management.Configuration.Processor\ref\**\*.*" />
<WinModuleFiles Condition="!Exists(@(WinModuleFiles))" Include="$(OutputPath)..\Microsoft.Management.Configuration.Processor\Modules\**\*.*" />
<RefFiles Condition="!Exists(@(RefFiles))" Include="$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\ref\**\*.*" />
<WinModuleFiles Condition="!Exists(@(WinModuleFiles))" Include="$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\Modules\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(RefFiles)" DestinationFolder="$(OutputPath)\ref\" />
<Copy SourceFiles="@(WinModuleFiles)" DestinationFolder="$(OutputPath)\Modules\%(RecursiveDir)\" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,15 @@
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<LinkIncremental>true</LinkIncremental>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
<SpectreMitigation>Spectre</SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='ReleaseStatic'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
<SpectreMitigation>Spectre</SpectreMitigation>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
Expand Down
2 changes: 1 addition & 1 deletion src/binver/binver.vcxitems
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<ClInclude Include="$(MSBuildThisFileDirectory)binver\version.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="$(MSBuildThisFileDirectory)binver\version.rc" Condition="'$(XefNativeAutoVersion)'!='true'" />
<ResourceCompile Include="$(MSBuildThisFileDirectory)binver\version.rc" Condition="'$(IsPipelineBuild)'!='true'" />
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)Update-BinVer.ps1" />
Expand Down
2 changes: 1 addition & 1 deletion src/binver/binver/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define VER_PRODUCTNAME_STR "WinGet CLI"
#define VER_PRODUCT_VERSION VER_FILE_VERSION
#define VER_PRODUCT_VERSION_STR VER_FILE_VERSION_STR
#define VER_ORIGINAL_FILENAME_STR "AppInstallerCLI.exe"
#define VER_ORIGINAL_FILENAME_STR "winget.exe"
#define VER_INTERNAL_NAME_STR VER_ORIGINAL_FILENAME_STR
#define VER_COPYRIGHT_STR "Copyright (c) Microsoft Corporation"

Expand Down

0 comments on commit 2b87fee

Please sign in to comment.