diff options
author | Steve Dower <steve.dower@microsoft.com> | 2016-10-10 03:18:52 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2016-10-10 03:18:52 (GMT) |
commit | 425ec150ea52a5c164d0770df251381159bb54bb (patch) | |
tree | 98949edd89999228957911b793f367ff0a6dbe4f /Tools/msi/msi.targets | |
parent | b1321fba53123fde88278e074b1e16ed206a18ad (diff) | |
download | cpython-425ec150ea52a5c164d0770df251381159bb54bb.zip cpython-425ec150ea52a5c164d0770df251381159bb54bb.tar.gz cpython-425ec150ea52a5c164d0770df251381159bb54bb.tar.bz2 |
Issue #28402: Adds signed catalog files for stdlib on Windows.
Diffstat (limited to 'Tools/msi/msi.targets')
-rw-r--r-- | Tools/msi/msi.targets | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/Tools/msi/msi.targets b/Tools/msi/msi.targets index 86be35b..9283a1e 100644 --- a/Tools/msi/msi.targets +++ b/Tools/msi/msi.targets @@ -12,8 +12,10 @@ <_Source>%(Source)$([msbuild]::MakeRelative(%(SourceBase), %(FullPath)))</_Source> <_Target>%(Target_)$([msbuild]::MakeRelative(%(TargetBase), %(FullPath)))</_Target> </InstallFiles> + + <_CatalogFiles Include="@(InstallFiles)" Condition="%(InstallFiles.IncludeInCat) and ''!=$([System.IO.File]::ReadAllText(%(InstallFiles.FullPath)))" /> </ItemGroup> - + <WriteLinesToFile File="$(_FileListTarget)" Lines="@(InstallFiles->'"%(_Source)","%(_Target)","%(Group)","%(DiskId)","%(Condition)"')" Overwrite="true" /> <Exec Command='"$(PythonExe)" csv_to_wxs.py "$(_FileListTarget)" "$(_InstallFilesTarget)"' WorkingDirectory="$(MSBuildThisFileDirectory)" /> @@ -24,6 +26,35 @@ </ItemGroup> </Target> + <Target Name="GenerateCatalog" AfterTargets="ProcessInstallFiles" Condition="'@(_CatalogFiles)' != ''"> + <PropertyGroup> + <_CatFileSourceTarget>$(IntermediateOutputPath)$(MSBuildProjectName).cdf</_CatFileSourceTarget> + <_CatFileTarget>$(IntermediateOutputPath)python_$(MSBuildProjectName).cat</_CatFileTarget> + <_CatFile>[CatalogHeader] +Name=$([System.IO.Path]::GetFileName($(_CatFileTarget))) +ResultDir=$([System.IO.Path]::GetDirectoryName($(_CatFileTarget))) +PublicVersion=1 +CatalogVersion=2 +HashAlgorithms=SHA256 +PageHashes=false +EncodingType= + +[CatalogFiles] +@(_CatalogFiles->'<HASH>%(Filename)%(Extension)=%(FullPath)',' +') +</_CatFile> + </PropertyGroup> + + <WriteLinesToFile File="$(_CatFileSourceTarget)" Lines="$(_CatFile)" Overwrite="true" /> + <Exec Command='$(_MakeCatCommand) "$(_CatFileSourceTarget)"' WorkingDirectory="$(MSBuildThisFileDirectory)" /> + <Exec Command='$(_SignCommand) "$(_CatFileTarget)"' WorkingDirectory="$(MSBuildThisFileDirectory)" + Condition="Exists($(_CatFileTarget)) and '$(_SignCommand)' != ''" /> + + <ItemGroup> + <FileWrites Include="$(_CatFileSourceTarget);$(_CatFileTarget)" /> + </ItemGroup> + </Target> + <Target Name="_TransformWxlTemplates" AfterTargets="PrepareForBuild" Inputs="@(WxlTemplate);$(PySourcePath)include\patchlevel.h" Outputs="$(IntermediateOutputPath)%(Filename).wxl"> <PropertyGroup Condition="'@(WxlTemplate)' != ''"> <_Content>$([System.IO.File]::ReadAllText(%(WxlTemplate.FullPath)).Replace(`{{ShortVersion}}`, `$(MajorVersionNumber).$(MinorVersionNumber)$(PyTestExt)`).Replace(`{{LongVersion}}`, `$(PythonVersion)$(PyTestExt)`).Replace(`{{Bitness}}`, `$(Bitness)`))</_Content> |