mirror of https://github.com/python/cpython
62 lines
3.6 KiB
Plaintext
62 lines
3.6 KiB
Plaintext
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||
|
|
||
|
<Target Name="ProcessInstallFiles" AfterTargets="PrepareForBuild" Condition="@(InstallFiles) != ''">
|
||
|
<PropertyGroup>
|
||
|
<_FileListTarget>$(IntermediateOutputPath)$(MSBuildProjectName).g.csv</_FileListTarget>
|
||
|
<_InstallFilesTarget>$(IntermediateOutputPath)$(MSBuildProjectName).g.wxs</_InstallFilesTarget>
|
||
|
</PropertyGroup>
|
||
|
|
||
|
<ItemGroup>
|
||
|
<InstallFiles>
|
||
|
<_Source>%(Source)$([msbuild]::MakeRelative(%(SourceBase), %(FullPath)))</_Source>
|
||
|
<_Target>%(Target_)$([msbuild]::MakeRelative(%(TargetBase), %(FullPath)))</_Target>
|
||
|
</InstallFiles>
|
||
|
</ItemGroup>
|
||
|
|
||
|
<WriteLinesToFile File="$(_FileListTarget)" Lines="@(InstallFiles->'"%(_Source)","%(_Target)","%(Group)","%(DiskId)","%(Condition)"')" Overwrite="true" />
|
||
|
<Exec Command='"$(PythonExe)" csv_to_wxs.py "$(_FileListTarget)" "$(_InstallFilesTarget)"'
|
||
|
WorkingDirectory="$(MSBuildThisFileDirectory)" />
|
||
|
|
||
|
<ItemGroup>
|
||
|
<FileWrites Include="$(_FileListTarget);$(_InstallFilesTarget)" />
|
||
|
<Compile Include="$(_InstallFilesTarget)" />
|
||
|
</ItemGroup>
|
||
|
</Target>
|
||
|
|
||
|
<Target Name="_TransformWxlTemplates" AfterTargets="PrepareForBuild" Inputs="@(WxlTemplate)" Outputs="$(IntermediateOutputPath)%(Filename).wxl">
|
||
|
<PropertyGroup>
|
||
|
<_Content>$([System.IO.File]::ReadAllText(%(WxlTemplate.FullPath)).Replace(`{{ShortVersion}}`, `$(MajorVersionNumber).$(MinorVersionNumber)`).Replace(`{{LongVersion}}`, `$(PythonVersion)`).Replace(`{{Bitness}}`, `$(Bitness)`))</_Content>
|
||
|
<_ExistingContent Condition="Exists('$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl')">$([System.IO.File]::ReadAllText($(IntermediateOutputPath)%(WxlTemplate.Filename).wxl))</_ExistingContent>
|
||
|
</PropertyGroup>
|
||
|
|
||
|
<WriteLinesToFile File="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl"
|
||
|
Lines="$(_Content)"
|
||
|
Overwrite="true"
|
||
|
Condition="$(_Content) != $(_ExistingContent)" />
|
||
|
|
||
|
<ItemGroup>
|
||
|
<EmbeddedResource Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" />
|
||
|
<FileWrites Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" />
|
||
|
</ItemGroup>
|
||
|
</Target>
|
||
|
|
||
|
<Import Project="$(WixTargetsPath)" />
|
||
|
|
||
|
<Target Name="SignCabs">
|
||
|
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
|
||
|
<Exec Command="$(_SignCommand) @(SignCabs->'"%(FullPath)"',' ')" ContinueOnError="false" />
|
||
|
</Target>
|
||
|
<Target Name="SignMsi">
|
||
|
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
|
||
|
<Exec Command="$(_SignCommand) @(SignMsi->'"%(FullPath)"',' ')" ContinueOnError="false" />
|
||
|
</Target>
|
||
|
<Target Name="SignBundleEngine">
|
||
|
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
|
||
|
<Exec Command="$(_SignCommand) @(SignBundleEngine->'"%(FullPath)"',' ')" ContinueOnError="false" />
|
||
|
</Target>
|
||
|
<Target Name="SignBundle">
|
||
|
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
|
||
|
<Exec Command="$(_SignCommand) @(SignBundle->'"%(FullPath)"',' ')" ContinueOnError="false" />
|
||
|
</Target>
|
||
|
</Project>
|