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" TreatAsLocalProperty="ReleaseUri"> |
| 3 | <PropertyGroup> |
Steve Dower | e4969f5 | 2015-02-28 19:53:50 -0800 | [diff] [blame] | 4 | <TargetName>$(OutputName)</TargetName> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 5 | <DefineSolutionProperties>false</DefineSolutionProperties> |
| 6 | <TreatWarningsAsErrors>false</TreatWarningsAsErrors> |
| 7 | <SuppressIces>$(SuppressIces);ICE03;ICE57;ICE61</SuppressIces> |
| 8 | <CompilerSuppressSpecificWarnings>1026</CompilerSuppressSpecificWarnings> |
| 9 | <BuildForRelease Condition="'$(BuildForRelease)' == ''">false</BuildForRelease> |
| 10 | <SignOutput Condition="'$(SigningCertificate)' != ''">true</SignOutput> |
| 11 | <Configuration Condition="'$(Configuration)' == ''">Release</Configuration> |
| 12 | <Platform Condition="'$(Platform)' == ''">x86</Platform> |
| 13 | <InstallScope Condition="'$(InstallScope)' != 'perMachine'">perUser</InstallScope> |
Steve Dower | 425ec15 | 2016-10-09 20:18:52 -0700 | [diff] [blame] | 14 | <_MakeCatCommand Condition="'$(_MakeCatCommand)' == ''">makecat</_MakeCatCommand> |
Steve Dower | c4b7600 | 2015-10-01 15:18:53 -0700 | [diff] [blame] | 15 | </PropertyGroup> |
| 16 | |
| 17 | <Import Project="wix.props" /> |
Stefan Grönke | f1502d0 | 2017-09-25 18:58:10 +0200 | [diff] [blame^] | 18 | <Import Project="..\..\PCbuild\tcltk.props" /> |
Steve Dower | c4b7600 | 2015-10-01 15:18:53 -0700 | [diff] [blame] | 19 | |
| 20 | <PropertyGroup> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 21 | <!-- |
| 22 | This URI is used to generate the various GUIDs used by the installer. |
| 23 | Installers built with the same URI will upgrade each other or block |
| 24 | when attempting to downgrade. |
| 25 | |
| 26 | By default, this is the local computer name, which will produce |
| 27 | installers that do not interfere with other installers. Products |
| 28 | that intend to bundle Python should rebuild these modules with their |
| 29 | own URI to avoid conflicting with the official releases. |
| 30 | |
Steve Dower | c4b7600 | 2015-10-01 15:18:53 -0700 | [diff] [blame] | 31 | The official releases use "http://www.python.org/$(ArchName)" |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 32 | |
| 33 | This is not the same as the DownloadUrl property used in the bundle |
| 34 | projects. |
| 35 | --> |
Steve Dower | c4b7600 | 2015-10-01 15:18:53 -0700 | [diff] [blame] | 36 | <ReleaseUri Condition="'$(ReleaseUri)' == ''">$(ComputerName)/$(ArchName)/</ReleaseUri> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 37 | <ReleaseUri Condition="!$(ReleaseUri.EndsWith(`/`))">$(ReleaseUri)/</ReleaseUri> |
| 38 | </PropertyGroup> |
| 39 | |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 40 | |
| 41 | <ItemGroup> |
| 42 | <Compile Include="$(MSBuildThisFileDirectory)common.wxs" /> |
Steve Dower | 4962141 | 2016-05-18 15:54:05 -0700 | [diff] [blame] | 43 | <WxlTemplate Include="$(MSBuildThisFileDirectory)\*.wxl_template" Condition="$(IgnoreCommonWxlTemplates) != 'true'" /> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 44 | <WixExtension Include="WixUtilExtension"> |
| 45 | <HintPath>WixUtilExtension</HintPath> |
| 46 | <Name>WixUtilExtension</Name> |
| 47 | </WixExtension> |
| 48 | </ItemGroup> |
| 49 | |
| 50 | <PropertyGroup> |
Steve Dower | 6fd76bc | 2016-07-16 16:13:19 -0700 | [diff] [blame] | 51 | <IntermediateOutputPath>$(Py_IntDir)\$(Configuration)_$(Platform)_Setup\$(OutputName)</IntermediateOutputPath> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 52 | <IntermediateOutputPath Condition="'$(OutputSuffix)' != ''">$(IntermediateOutputPath)_$(OutputSuffix)</IntermediateOutputPath> |
| 53 | <OutputPath Condition="'$(OutputPath)' == ''">$(BuildPath)</OutputPath> |
| 54 | <OutputPath Condition="!HasTrailingSlash($(OutputPath))">$(OutputPath)\</OutputPath> |
| 55 | <OutDir>$(OutputPath)</OutDir> |
| 56 | <ReuseCabinetCache>true</ReuseCabinetCache> |
Steve Dower | d28a8a9 | 2015-10-23 09:50:49 -0700 | [diff] [blame] | 57 | <CRTRedist Condition="'$(CRTRedist)' == ''">$(ExternalsDir)\windows-installer\redist</CRTRedist> |
Steve Dower | 102f72c | 2015-03-24 21:25:16 -0700 | [diff] [blame] | 58 | <CRTRedist Condition="!Exists($(CRTRedist))"></CRTRedist> |
| 59 | <DocFilename>python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm</DocFilename> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 60 | |
Steve Dower | b85b4275 | 2015-07-08 22:43:48 -0700 | [diff] [blame] | 61 | <InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(Field3Value).0</InstallerVersion> |
| 62 | </PropertyGroup> |
| 63 | |
| 64 | <PropertyGroup Condition="!$(BuildForRelease)"> |
| 65 | <RevisionNumber Condition="'$(RevisionNumber)' == ''">$([System.Math]::Floor($([System.DateTime]::Now.Subtract($([System.DateTime]::new(2001, 1, 1))).TotalDays)))</RevisionNumber> |
| 66 | <PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)dev$(RevisionNumber)</PythonVersion> |
| 67 | <InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(RevisionNumber).0</InstallerVersion> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 68 | </PropertyGroup> |
| 69 | |
| 70 | <PropertyGroup> |
| 71 | <Bitness>32-bit</Bitness> |
| 72 | <Bitness Condition="$(Platform) == 'x64'">64-bit</Bitness> |
Steve Dower | 0533826 | 2016-07-24 18:04:29 -0700 | [diff] [blame] | 73 | <PlatformArchitecture>32bit</PlatformArchitecture> |
| 74 | <PlatformArchitecture Condition="$(Platform) == 'x64'">64bit</PlatformArchitecture> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 75 | <DefineConstants> |
| 76 | $(DefineConstants); |
Steve Dower | b85b4275 | 2015-07-08 22:43:48 -0700 | [diff] [blame] | 77 | Version=$(InstallerVersion); |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 78 | ShortVersion=$(MajorVersionNumber).$(MinorVersionNumber); |
| 79 | LongVersion=$(PythonVersion); |
| 80 | MajorVersionNumber=$(MajorVersionNumber); |
| 81 | MinorVersionNumber=$(MinorVersionNumber); |
| 82 | UpgradeMinimumVersion=$(MajorVersionNumber).$(MinorVersionNumber).0.0; |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 83 | NextMajorVersionNumber=$(MajorVersionNumber).$([msbuild]::Add($(MinorVersionNumber), 1)).0.0; |
Steve Dower | 102f72c | 2015-03-24 21:25:16 -0700 | [diff] [blame] | 84 | Bitness=$(Bitness); |
Steve Dower | 0533826 | 2016-07-24 18:04:29 -0700 | [diff] [blame] | 85 | PlatformArchitecture=$(PlatformArchitecture); |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 86 | PyDebugExt=$(PyDebugExt); |
Steve Dower | 940f6a8 | 2015-10-31 12:17:11 -0700 | [diff] [blame] | 87 | PyArchExt=$(PyArchExt); |
| 88 | PyTestExt=$(PyTestExt); |
Steve Dower | 4943749 | 2015-07-08 20:18:44 -0700 | [diff] [blame] | 89 | OptionalFeatureName=$(OutputName); |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 90 | </DefineConstants> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 91 | <DefineConstants Condition="'$(CRTRedist)' != ''"> |
| 92 | $(DefineConstants);CRTRedist=$(CRTRedist); |
| 93 | </DefineConstants> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 94 | <DefineConstants Condition="$(Platform) != 'x64'"> |
Steve Dower | b84bcc4 | 2017-09-09 06:13:06 -0700 | [diff] [blame] | 95 | $(DefineConstants);Suffix32=-32;ssltag=-1_1; |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 96 | </DefineConstants> |
| 97 | <DefineConstants Condition="$(Platform) == 'x64'"> |
Steve Dower | b84bcc4 | 2017-09-09 06:13:06 -0700 | [diff] [blame] | 98 | $(DefineConstants);Suffix32=;ssltag=-1_1-x64; |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 99 | </DefineConstants> |
| 100 | </PropertyGroup> |
| 101 | |
| 102 | <ItemDefinitionGroup> |
| 103 | <InstallFiles> |
| 104 | <Group>generated_filelist</Group> |
| 105 | <Condition></Condition> |
| 106 | <DiskId></DiskId> |
Steve Dower | 425ec15 | 2016-10-09 20:18:52 -0700 | [diff] [blame] | 107 | <IncludeInCat>false</IncludeInCat> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 108 | </InstallFiles> |
| 109 | <LinkerBindInputPaths> |
| 110 | <Visible>false</Visible> |
| 111 | </LinkerBindInputPaths> |
| 112 | </ItemDefinitionGroup> |
| 113 | <ItemGroup> |
Steve Dower | 148827c | 2015-10-14 10:40:09 -0700 | [diff] [blame] | 114 | <LinkerBindInputPaths Include="$(PGOBuildPath);$(BuildPath)"> |
| 115 | <BindName></BindName> |
| 116 | </LinkerBindInputPaths> |
| 117 | <LinkerBindInputPaths Include="$(PySourcePath)Doc\build\htmlhelp"> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 118 | <BindName></BindName> |
| 119 | </LinkerBindInputPaths> |
| 120 | <LinkerBindInputPaths Include="$(PySourcePath)"> |
| 121 | <BindName>src</BindName> |
| 122 | </LinkerBindInputPaths> |
| 123 | <LinkerBindInputPaths Include="$(tcltkDir)"> |
| 124 | <BindName>tcltk</BindName> |
| 125 | </LinkerBindInputPaths> |
| 126 | <LinkerBindInputPaths Include="$(CRTRedist)" Condition="'$(CRTRedist)' != ''"> |
Steve Dower | e4969f5 | 2015-02-28 19:53:50 -0800 | [diff] [blame] | 127 | <BindName>redist</BindName> |
| 128 | </LinkerBindInputPaths> |
Steve Dower | fcbe1df | 2015-09-08 21:39:01 -0700 | [diff] [blame] | 129 | <LinkerBindInputPaths Include="$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT"> |
| 130 | <BindName>redist</BindName> |
| 131 | </LinkerBindInputPaths> |
Steve Dower | 6fd76bc | 2016-07-16 16:13:19 -0700 | [diff] [blame] | 132 | <LinkerBindInputPaths Include="$(BuildPath32)"> |
| 133 | <BindName>build32</BindName> |
| 134 | </LinkerBindInputPaths> |
| 135 | <LinkerBindInputPaths Include="$(BuildPath64)"> |
| 136 | <BindName>build64</BindName> |
| 137 | </LinkerBindInputPaths> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 138 | </ItemGroup> |
| 139 | |
| 140 | <Target Name="_ValidateMsiProps" BeforeTargets="PrepareForBuild"> |
| 141 | <Error Text="Platform '$(Platform)' is not supported. Use 'x86' or 'x64'." Condition="$(Platform) != 'x86' and $(Platform) != 'x64'" /> |
| 142 | </Target> |
| 143 | |
| 144 | <ItemGroup> |
| 145 | <_Uuid Include="CoreUpgradeCode"> |
| 146 | <Uri>upgradecode</Uri> |
| 147 | </_Uuid> |
| 148 | <_Uuid Include="UpgradeCode"> |
| 149 | <Uri>upgradecode/$(OutputName)</Uri> |
| 150 | </_Uuid> |
| 151 | <_Uuid Include="InstallDirectoryGuidSeed"> |
| 152 | <Uri>installdirectoryseed</Uri> |
| 153 | </_Uuid> |
| 154 | <_Uuid Include="PythonExeComponentGuid"> |
| 155 | <Uri>python.exe</Uri> |
| 156 | </_Uuid> |
| 157 | <_Uuid Include="PythonwExeComponentGuid"> |
| 158 | <Uri>pythonw.exe</Uri> |
| 159 | </_Uuid> |
| 160 | <_Uuid Include="RemoveLib2to3PickleComponentGuid"> |
| 161 | <Uri>lib2to3/pickles</Uri> |
| 162 | </_Uuid> |
Steve Dower | 0533826 | 2016-07-24 18:04:29 -0700 | [diff] [blame] | 163 | <_Uuid Include="CommonPythonRegComponentGuid"> |
| 164 | <Uri>registry</Uri> |
| 165 | </_Uuid> |
| 166 | <_Uuid Include="PythonRegComponentGuid"> |
| 167 | <Uri>registry/$(OutputName)</Uri> |
| 168 | </_Uuid> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 169 | </ItemGroup> |
Steve Dower | 4962141 | 2016-05-18 15:54:05 -0700 | [diff] [blame] | 170 | <Target Name="_GenerateGuids" AfterTargets="PrepareForBuild" Condition="$(TargetName) != 'launcher'"> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 171 | <PropertyGroup> |
Steve Dower | c49de35 | 2015-03-08 15:29:39 -0700 | [diff] [blame] | 172 | <_Uuids>@(_Uuid->'("%(Identity)", "$(MajorVersionNumber).$(MinorVersionNumber)/%(Uri)")',',')</_Uuids> |
Steve Dower | c4b7600 | 2015-10-01 15:18:53 -0700 | [diff] [blame] | 173 | <_GenerateCommand>import uuid; print('\n'.join('{}={}'.format(i, uuid.uuid5(uuid.UUID('c8d9733e-a70c-43ff-ab0c-e26456f11083'), '$(ReleaseUri.Replace(`{arch}`, `$(ArchName)`))' + j)) for i,j in [$(_Uuids.Replace(`"`,`'`))]))</_GenerateCommand> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 174 | </PropertyGroup> |
| 175 | |
Steve Dower | 19694ab | 2015-05-02 15:23:27 -0700 | [diff] [blame] | 176 | <Exec Command='"$(PythonExe)" -c "$(_GenerateCommand)" > "$(IntermediateOutputPath)$(OutputName)guids.txt"' |
| 177 | WorkingDirectory="$(MSBuildThisFileDirectory)" |
| 178 | IgnoreExitCode="false" /> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 179 | |
| 180 | <ReadLinesFromFile File="$(IntermediateOutputPath)$(OutputName)guids.txt"> |
| 181 | <Output TaskParameter="Lines" ItemName="_UuidValue" /> |
| 182 | </ReadLinesFromFile> |
| 183 | |
| 184 | <PropertyGroup> |
| 185 | <DefineConstants>$(DefineConstants);@(_UuidValue,';');</DefineConstants> |
| 186 | </PropertyGroup> |
| 187 | </Target> |
| 188 | </Project> |