Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 3 | |
| 4 | <Target Name="ProcessInstallFiles" AfterTargets="PrepareForBuild" Condition="@(InstallFiles) != ''"> |
| 5 | <PropertyGroup> |
| 6 | <_FileListTarget>$(IntermediateOutputPath)$(MSBuildProjectName).g.csv</_FileListTarget> |
| 7 | <_InstallFilesTarget>$(IntermediateOutputPath)$(MSBuildProjectName).g.wxs</_InstallFilesTarget> |
| 8 | </PropertyGroup> |
| 9 | |
| 10 | <ItemGroup> |
| 11 | <InstallFiles> |
| 12 | <_Source>%(Source)$([msbuild]::MakeRelative(%(SourceBase), %(FullPath)))</_Source> |
| 13 | <_Target>%(Target_)$([msbuild]::MakeRelative(%(TargetBase), %(FullPath)))</_Target> |
| 14 | </InstallFiles> |
| 15 | </ItemGroup> |
| 16 | |
| 17 | <WriteLinesToFile File="$(_FileListTarget)" Lines="@(InstallFiles->'"%(_Source)","%(_Target)","%(Group)","%(DiskId)","%(Condition)"')" Overwrite="true" /> |
| 18 | <Exec Command='"$(PythonExe)" csv_to_wxs.py "$(_FileListTarget)" "$(_InstallFilesTarget)"' |
| 19 | WorkingDirectory="$(MSBuildThisFileDirectory)" /> |
| 20 | |
| 21 | <ItemGroup> |
| 22 | <FileWrites Include="$(_FileListTarget);$(_InstallFilesTarget)" /> |
| 23 | <Compile Include="$(_InstallFilesTarget)" /> |
| 24 | </ItemGroup> |
| 25 | </Target> |
| 26 | |
Steve Dower | d423396 | 2015-07-05 07:24:17 -0700 | [diff] [blame] | 27 | <Target Name="_TransformWxlTemplates" AfterTargets="PrepareForBuild" Inputs="@(WxlTemplate);$(PySourcePath)include\patchlevel.h" Outputs="$(IntermediateOutputPath)%(Filename).wxl"> |
Steve Dower | 4962141 | 2016-05-18 15:54:05 -0700 | [diff] [blame^] | 28 | <PropertyGroup Condition="'@(WxlTemplate)' != ''"> |
Steve Dower | 940f6a8 | 2015-10-31 12:17:11 -0700 | [diff] [blame] | 29 | <_Content>$([System.IO.File]::ReadAllText(%(WxlTemplate.FullPath)).Replace(`{{ShortVersion}}`, `$(MajorVersionNumber).$(MinorVersionNumber)$(PyTestExt)`).Replace(`{{LongVersion}}`, `$(PythonVersion)$(PyTestExt)`).Replace(`{{Bitness}}`, `$(Bitness)`))</_Content> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 30 | <_ExistingContent Condition="Exists('$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl')">$([System.IO.File]::ReadAllText($(IntermediateOutputPath)%(WxlTemplate.Filename).wxl))</_ExistingContent> |
| 31 | </PropertyGroup> |
| 32 | |
| 33 | <WriteLinesToFile File="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" |
| 34 | Lines="$(_Content)" |
| 35 | Overwrite="true" |
| 36 | Condition="$(_Content) != $(_ExistingContent)" /> |
| 37 | |
Steve Dower | 4962141 | 2016-05-18 15:54:05 -0700 | [diff] [blame^] | 38 | <ItemGroup Condition="'@(WxlTemplate)' != ''"> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 39 | <EmbeddedResource Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" /> |
| 40 | <FileWrites Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" /> |
| 41 | </ItemGroup> |
| 42 | </Target> |
| 43 | |
| 44 | <Import Project="$(WixTargetsPath)" /> |
| 45 | |
| 46 | <Target Name="SignCabs"> |
| 47 | <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" /> |
| 48 | <Exec Command="$(_SignCommand) @(SignCabs->'"%(FullPath)"',' ')" ContinueOnError="false" /> |
| 49 | </Target> |
| 50 | <Target Name="SignMsi"> |
| 51 | <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" /> |
| 52 | <Exec Command="$(_SignCommand) @(SignMsi->'"%(FullPath)"',' ')" ContinueOnError="false" /> |
| 53 | </Target> |
| 54 | <Target Name="SignBundleEngine"> |
| 55 | <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" /> |
| 56 | <Exec Command="$(_SignCommand) @(SignBundleEngine->'"%(FullPath)"',' ')" ContinueOnError="false" /> |
| 57 | </Target> |
| 58 | <Target Name="SignBundle"> |
| 59 | <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" /> |
| 60 | <Exec Command="$(_SignCommand) @(SignBundle->'"%(FullPath)"',' ')" ContinueOnError="false" /> |
| 61 | </Target> |
| 62 | </Project> |