summaryrefslogtreecommitdiffstats
path: root/Tools/msi/exe/exe.wixproj
blob: 071501ce6e6f5702c4d9fe92ea7baddd477de448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <ProjectGuid>{6BD53305-B03E-49DC-85FB-5551B8CCC843}</ProjectGuid>
        <SchemaVersion>2.0</SchemaVersion>
        <OutputName>exe</OutputName>
        <OutputType>Package</OutputType>
    </PropertyGroup>
    <PropertyGroup>
        <!-- Shortcut validation is not necessary -->
        <SuppressICEs>ICE43</SuppressICEs>
    </PropertyGroup>
    <Import Project="..\msi.props" />
    <ItemGroup>
        <Compile Include="exe.wxs" />
        <Compile Include="exe_files.wxs" />
        <Compile Include="exe_reg.wxs" />
    </ItemGroup>
    <ItemGroup>
        <EmbeddedResource Include="*.wxl" />
        <WxlTemplate Include="*.wxl_template" />
    </ItemGroup>
    
    <Target Name="_GenerateLicense" AfterTargets="PrepareForBuild">
        <ItemGroup>
            <LicenseFiles Include="$(PySourcePath)LICENSE;
                                   crtlicense.txt;
                                   $(bz2Dir)LICENSE;
                                   $(opensslOutDir)LICENSE;
                                   $(tcltkDir)tcllicense.terms;
                                   $(tcltkDir)tklicense.terms;
                                   $(tcltkDir)tixlicense.terms" />
            <_LicenseFiles Include="@(LicenseFiles)">
                <Content>$([System.IO.File]::ReadAllText(%(FullPath)))</Content>
            </_LicenseFiles>
        </ItemGroup>
        
        <WriteLinesToFile File="$(BuildPath)LICENSE"
                          Overwrite="true"
                          Lines="@(_LicenseFiles->'%(Content)')" />
    </Target>
    
    <Target Name="_CopyMiscNews" AfterTargets="PrepareForBuild" Condition="Exists('$(PySourcePath)Misc\NEWS')">
        <Copy SourceFiles="$(PySourcePath)Misc\NEWS" DestinationFiles="$(BuildPath)NEWS.txt" />
    </Target>
    
    <Target Name="_MergeMiscNewsWithBlurb" AfterTargets="PrepareForBuild" Condition="$(Blurb) != '' and !Exists('$(PySourcePath)Misc\NEWS')">
        <Exec Command="$(Blurb) merge -f &quot;$(BuildPath)NEWS.txt&quot;" WorkingDirectory="$(PCbuild)" />
    </Target>
    
    <Target Name="_MergeMiscNewsWithPython" AfterTargets="PrepareForBuild" Condition="$(Blurb) == '' and !Exists('$(PySourcePath)Misc\NEWS')">
        <ItemGroup>
            <HostPython Include="$(ExternalsDir)python*\tools\python.exe" />
            <HostPython Include="@(HostPython)" Condition="Exists(%(FullPath))" />
            <HostPython Include="py" Condition="@(HostPython) == ''" />
        </ItemGroup>
        <PropertyGroup>
            <HostPython>@(HostPython)</HostPython>
            <HostPython Condition="$(HostPython.Contains(';'))">$(HostPython.Remove($(HostPython.IndexOf(';'))))</HostPython>
        </PropertyGroup>
        <Exec Command="&quot;$(HostPython)&quot; -m pip install -U blurb" WorkingDirectory="$(PCbuild)" />
        <Exec Command="&quot;$(HostPython)&quot; -m blurb merge -f &quot;$(BuildPath)NEWS.txt&quot;" WorkingDirectory="$(PCbuild)" />
    </Target>
    
    <Import Project="..\msi.targets" />
</Project>