Author: [email protected]
Branch: windowsinstaller
Changeset: r95804:000052a98664
Date: 2018-12-25 19:20 +0000
http://bitbucket.org/pypy/pypy/changeset/000052a98664/
Log: Got windows msi installer to build. It is not currently in a usable
state.
diff --git a/PC/icons/setup.ico b/PC/icons/setup.ico
new file mode 100644
index
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e54364b3af11d3173c8b48d8ee32bce18f85f2ec
GIT binary patch
[cut]
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
new file mode 100644
--- /dev/null
+++ b/PCbuild/pyproject.props
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
TreatAsLocalProperty="Py_IntDir">
+ <PropertyGroup Label="Globals">
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' ==
''">10.0</VisualStudioVersion>
+ <OutDir>$(BuildPath)</OutDir>
+ <OutDir Condition="!HasTrailingSlash($(OutDir))">$(OutDir)\</OutDir>
+ <Py_IntDir Condition="'$(Py_IntDir)' ==
''">$(MSBuildThisFileDirectory)obj\</Py_IntDir>
+
<IntDir>$(Py_IntDir)\$(MajorVersionNumber)$(MinorVersionNumber)$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir>
+ <IntDir>$(IntDir.Replace(`\\`, `\`))</IntDir>
+ <TargetName Condition="'$(TargetName)' == ''">$(ProjectName)</TargetName>
+ <TargetName>$(TargetName)$(PyDebugExt)</TargetName>
+ <GenerateManifest>false</GenerateManifest>
+ <EmbedManifest>false</EmbedManifest>
+ <SupportPGO Condition="'$(SupportPGO)' == ''">true</SupportPGO>
+ <SupportSigning Condition="'$(SupportSigning)' == ''">true</SupportSigning>
+ <SupportSigning Condition="'$(Configuration)' ==
'Debug'">false</SupportSigning>
+ <SupportSigning Condition="'$(ConfigurationType)' ==
'StaticLibrary'">false</SupportSigning>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <_DebugPreprocessorDefinition>NDEBUG;</_DebugPreprocessorDefinition>
+ <_DebugPreprocessorDefinition Condition="$(Configuration) ==
'Debug'">_DEBUG;</_DebugPreprocessorDefinition>
+ <_PlatformPreprocessorDefinition>_WIN32;</_PlatformPreprocessorDefinition>
+ <_PlatformPreprocessorDefinition Condition="$(Platform) ==
'x64'">_WIN64;_M_X64;</_PlatformPreprocessorDefinition>
+ <_PydPreprocessorDefinition Condition="$(TargetExt) ==
'.pyd'">Py_BUILD_CORE_MODULE;</_PydPreprocessorDefinition>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+
<AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)Include\internal;$(PySourcePath)PC;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+
<PreprocessorDefinitions>WIN32;$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
+
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling></ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet
Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
+ <InlineFunctionExpansion
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">OnlyExplicitInline</InlineFunctionExpansion>
+ <InlineFunctionExpansion
Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">OnlyExplicitInline</InlineFunctionExpansion>
+ </ClCompile>
+ <ClCompile Condition="$(Configuration) == 'Debug'">
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ </ClCompile>
+ <ClCompile Condition="$(ICCBuild) == 'true'">
+ <FloatingPointModel>Strict</FloatingPointModel>
+ </ClCompile>
+ <Link>
+
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+
<IgnoreSpecificDefaultLibraries>LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <TargetMachine>MachineX86</TargetMachine>
+ <TargetMachine Condition="'$(Platform)' ==
'x64'">MachineX64</TargetMachine>
+ <ProfileGuidedDatabase
Condition="$(SupportPGO)">$(OutDir)$(TargetName).pgd</ProfileGuidedDatabase>
+ <LinkTimeCodeGeneration Condition="$(Configuration) ==
'Release'">UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) ==
'PGInstrument'">PGInstrument</LinkTimeCodeGeneration>
+ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) ==
'PGUpdate'">PGUpdate</LinkTimeCodeGeneration>
+ </Link>
+ <Lib>
+ <LinkTimeCodeGeneration Condition="$(Configuration) ==
'Release'">true</LinkTimeCodeGeneration>
+ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) ==
'PGInstrument'">true</LinkTimeCodeGeneration>
+ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) ==
'PGUpdate'">true</LinkTimeCodeGeneration>
+ </Lib>
+ <ResourceCompile>
+
<AdditionalIncludeDirectories>$(PySourcePath)PC;$(PySourcePath)Include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+
<PreprocessorDefinitions>$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Midl>
+
<PreprocessorDefinitions>$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TargetEnvironment Condition="'$(Platform)' ==
'x64'">X64</TargetEnvironment>
+ <OutputDirectory>$(IntDir)</OutputDirectory>
+
<InterfaceIdentifierFileName>$(MSBuildProjectName)_i.c</InterfaceIdentifierFileName>
+ <ProxyFileName>$(MSBuildProjectName)_p.c</ProxyFileName>
+ </Midl>
+ </ItemDefinitionGroup>
+
+ <Target Name="GeneratePythonNtRcH"
+ BeforeTargets="ClCompile"
+ Inputs="$(PySourcePath)Include\patchlevel.h"
+ Outputs="$(IntDir)pythonnt_rc.h">
+ <WriteLinesToFile File="$(IntDir)pythonnt_rc.h" Overwrite="true"
Encoding="ascii"
+ Lines='/* This file created by pyproject.props
/t:GeneratePythonNtRcH */
+#define FIELD3 $(Field3Value)
+#define MS_DLL_ID "$(SysWinVer)"
+#define PYTHON_DLL_NAME "$(TargetName)$(TargetExt)"
+' />
+ <ItemGroup>
+ <FileWrites Include="$(IntDir)pythonnt_rc.h" />
+ </ItemGroup>
+ </Target>
+
+ <UsingTask TaskName="KillPython" TaskFactory="CodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+ <ParameterGroup>
+ <FileName Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Using Namespace="System.Diagnostics"/>
+ <Using Namespace="System.IO"/>
+ <Using Namespace="System.Runtime.InteropServices"/>
+ <Using Namespace="System.Text"/>
+ <Code Type="Method" Language="cs">
+<![CDATA[
+[DllImport("kernel32.dll", SetLastError=true, CharSet=CharSet.Unicode)]
+public static extern bool QueryFullProcessImageName([In]IntPtr hProcess,
[In]int dwFlags,
+ [Out]StringBuilder
lpExeName, ref int lpdwSize);
+public override bool Execute() {
+ string fullPath = Path.GetFullPath(FileName);
+ Log.LogMessage("Looking for " + fullPath, MessageImportance.Normal);
+ foreach (Process p in Process.GetProcesses()) {
+ try {
+ int pathLength = 32768;
+ StringBuilder pathBuilder = new StringBuilder(pathLength);
+ if (QueryFullProcessImageName(p.Handle, 0, pathBuilder, ref
pathLength)) {
+ string exeName = Path.GetFullPath(pathBuilder.ToString());
+ Log.LogMessage("Found running process: " + exeName,
MessageImportance.Low);
+ if (fullPath.Equals(exeName,
StringComparison.OrdinalIgnoreCase)) {
+ Log.LogMessage("Terminating " + exeName,
MessageImportance.High);
+ p.Kill();
+ }
+ }
+ } catch {
+ }
+ }
+ return true;
+}
+]]>
+ </Code>
+ </Task>
+ </UsingTask>
+
+ <Target Name="KillPython" BeforeTargets="PrepareForBuild"
Condition="'$(KillPython)' == 'true'">
+ <Message Text="Killing any running python$(PyDebugExt)$(PyTestExt).exe
instances..." Importance="high" />
+ <KillPython FileName="$(OutDir)python$(PyDebugExt)$(PyTestExt).exe" />
+ </Target>
+
+ <!--
+ A default target to handle msbuild pcbuild.proj /t:CleanAll.
+
+ Some externals projects don't respond to /t:Clean, so we invoke
+ CleanAll on them when we really want to clean up.
+ -->
+ <Target Name="CleanAll" DependsOnTargets="Clean">
+ <MSBuild Projects="@(ProjectReference->'%(FullPath)')"
+ Properties="Configuration=$(Configuration);Platform=$(Platform)"
+ BuildInParallel="true"
+ StopOnFirstFailure="false"
+ Condition="Exists(%(FullPath))"
+ Targets="CleanAll" />
+ </Target>
+
+ <Target Name="CopyPGCFiles" BeforeTargets="PrepareForBuild"
Condition="$(Configuration) == 'PGUpdate'">
+ <ItemGroup>
+ <_PGCFiles Include="$(OutDir)instrumented\$(TargetName)!*.pgc" />
+ <_PGDFile Include="$(OutDir)instrumented\$(TargetName).pgd" />
+ <_CopyFiles Include="@(_PGCFiles);@(_PGDFile)"
Condition="Exists(%(FullPath))" />
+ </ItemGroup>
+ <Delete Files="@(_CopyFiles->'$(OutDir)%(Filename)%(Extension)')" />
+ <Error Text="PGO run did not succeed (no $(TargetName)!*.pgc files) and
there is no data to merge"
+ Condition="$(RequirePGCFiles) == 'true' and @(_PGCFiles) == ''" />
+ <Copy SourceFiles="@(_CopyFiles)"
+ DestinationFolder="$(OutDir)"
+ UseHardLinksIfPossible="true"
+ OverwriteReadOnlyFiles="true" />
+ </Target>
+
+ <PropertyGroup>
+ <SdkBinPath Condition="'$(SdkBinPath)' == '' or
!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
Kits\Installed
Roots@KitsRoot10)\bin\$(DefaultWindowsSDKVersion)\x86</SdkBinPath>
+ <SdkBinPath
Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
Kits\Installed Roots@KitsRoot10)\bin\x86</SdkBinPath>
+ <SdkBinPath
Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
Kits\Installed Roots@KitsRoot81)\bin\x86</SdkBinPath>
+ <SdkBinPath
Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
Kits\Installed Roots@KitsRoot)\bin\x86</SdkBinPath>
+ <SdkBinPath
Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
SDKs\Windows\v7.1A@InstallationFolder)\Bin\</SdkBinPath>
+ <_SignCommand Condition="Exists($(SdkBinPath)) and '$(SigningCertificate)'
!= '' and $(SupportSigning)">"$(SdkBinPath)\signtool.exe" sign /q /a /n
"$(SigningCertificate)" /fd sha256 /t
http://timestamp.verisign.com/scripts/timestamp.dll /d "Python
$(PythonVersion)"</_SignCommand>
+ <_MakeCatCommand
Condition="Exists($(SdkBinPath))">"$(SdkBinPath)\makecat.exe"</_MakeCatCommand>
+ </PropertyGroup>
+
+ <Target Name="_SignBuild" AfterTargets="AfterBuild"
Condition="'$(SigningCertificate)' != '' and $(SupportSigning)">
+ <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and
rebuild" Condition="'$(_SignCommand)' == ''" />
+ <Exec Command='$(_SignCommand) "$(TargetPath)" || $(_SignCommand)
"$(TargetPath)" || $(_SignCommand) "$(TargetPath)"' ContinueOnError="false" />
+ </Target>
+</Project>
diff --git a/PCbuild/python.props b/PCbuild/python.props
new file mode 100644
--- /dev/null
+++ b/PCbuild/python.props
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Platform Condition="'$(Platform)' == ''">Win32</Platform>
+ <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
+ <!--
+ Use the latest available version of Visual Studio to build. To override
+ this and build with an earlier version, pass "/p:PlatformToolset=v100"
+ (for example) when building.
+
+ We set BasePlatformToolset for ICC's benefit, it's otherwise ignored.
+ -->
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and
('$(MSBuildToolsVersion)' == '15.0' or '$(VisualStudioVersion)' ==
'15.0')">v141</BasePlatformToolset>
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and
'$(VCTargetsPath14)' != ''">v140</BasePlatformToolset>
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and
'$(VCTargetsPath12)' != ''">v120</BasePlatformToolset>
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and
'$(VCTargetsPath11)' != ''">v110</BasePlatformToolset>
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and
'$(VCTargetsPath10)' != ''">v100</BasePlatformToolset>
+
+ <PlatformToolset Condition="'$(PlatformToolset)' ==
''">$(BasePlatformToolset)</PlatformToolset>
+ <ICCBuild>false</ICCBuild>
+ <ICCBuild Condition="$(PlatformToolset.StartsWith(`Intel C++
Compiler`))">true</ICCBuild>
+
+ <!--
+ Convincing MSVC/MSBuild to prefer our platform names is too difficult,
+ so we define our own constant ArchName and use wherever we need it.
+ -->
+ <ArchName Condition="'$(ArchName)' == '' and $(Platform) ==
'x64'">amd64</ArchName>
+ <ArchName Condition="'$(ArchName)' == ''">win32</ArchName>
+
+ <!-- Root directory of the repository -->
+ <PySourcePath Condition="'$(PySourcePath)' ==
''">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\))</PySourcePath>
+ <PySourcePath
Condition="!HasTrailingSlash($(PySourcePath))">$(PySourcePath)\</PySourcePath>
+
+ <!-- Directory containing the translated python interpretter -->
+ <InterpreterPath Condition="'$(InterpreterPath)' ==
''">$(PySourcePath)pypy\goal\</InterpreterPath>
+
+ <!-- Directory where msi build outputs are put -->
+ <BuildPath32 Condition="'$(Py_OutDir)' ==
''">$(PySourcePath)PCbuild\win32\</BuildPath32>
+ <BuildPath32 Condition="'$(Py_OutDir)' !=
''">$(Py_OutDir)\win32\</BuildPath32>
+ <BuildPath Condition="'$(BuildPath)' == ''">$(BuildPath32)</BuildPath>
+ <BuildPath
Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath>
+ <BuildPath Condition="$(Configuration) ==
'PGInstrument'">$(BuildPath)instrumented\</BuildPath>
+
+ <!-- Directories of external projects. tcltk is handled in tcltk.props -->
+ <ExternalsDir>$(EXTERNALS_DIR)</ExternalsDir>
+ <ExternalsDir Condition="$(ExternalsDir) ==
''">$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`))</ExternalsDir>
+ <ExternalsDir
Condition="!HasTrailingSlash($(ExternalsDir))">$(ExternalsDir)\</ExternalsDir>
+ <sqlite3Dir>$(ExternalsDir)sqlite-3.21.0.0\</sqlite3Dir>
+ <bz2Dir>$(ExternalsDir)bzip2-1.0.6\</bz2Dir>
+ <lzmaDir>$(ExternalsDir)xz-5.2.2\</lzmaDir>
+ <opensslDir>$(ExternalsDir)openssl-1.1.0i\</opensslDir>
+
<opensslOutDir>$(ExternalsDir)openssl-bin-1.1.0i\$(ArchName)\</opensslOutDir>
+ <opensslIncludeDir>$(opensslOutDir)include</opensslIncludeDir>
+ <nasmDir>$(ExternalsDir)\nasm-2.11.06\</nasmDir>
+ <zlibDir>$(ExternalsDir)\zlib-1.2.11\</zlibDir>
+
+ <!-- Suffix for all binaries when building for debug -->
+ <PyDebugExt Condition="'$(PyDebugExt)' == '' and $(Configuration) ==
'Debug'">_d</PyDebugExt>
+
+ <!-- Suffix for versions/keys when building with test markers -->
+ <PyTestExt Condition="$(UseTestMarker) == 'true'">-test</PyTestExt>
+
+ <!-- Suffix for versions/keys when building for particular platforms -->
+ <PyArchExt Condition="'$(ArchName)' == 'win32'">-32</PyArchExt>
+
+ <!-- Full path of the resulting python.exe binary -->
+ <PythonExe Condition="'$(PythonExe)' ==
''">$(InterpreterPath)pypy3-c$(PyDebugExt).exe</PythonExe>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="$(DefaultWindowsSDKVersion) == ''">
+ <!--
+ Attempt to select the latest installed WinSDK. If we don't find any, then
we will
+ let the MSBuild targets determine which one it wants to use (typically the
earliest
+ possible version). Since we limit WINVER to Windows 7 anyway, it doesn't
really
+ matter which WinSDK version we use.
+ -->
+
<_RegistryVersion>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
SDKs\Windows\v10.0@ProductVersion)</_RegistryVersion>
+ <_RegistryVersion Condition="$(_RegistryVersion) ==
''">$(Registry:HKEY_LOCAL_MACHINE\WOW6432Node\SOFTWARE\Microsoft\Microsoft
SDKs\Windows\v10.0@ProductVersion)</_RegistryVersion>
+ <DefaultWindowsSDKVersion>10.0.17134.0</DefaultWindowsSDKVersion>
+ <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) ==
'10.0.16299'">10.0.16299.0</DefaultWindowsSDKVersion>
+ <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) ==
'10.0.15063'">10.0.15063.0</DefaultWindowsSDKVersion>
+ <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) ==
'10.0.14393'">10.0.14393.0</DefaultWindowsSDKVersion>
+ <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) ==
'10.0.10586'">10.0.10586.0</DefaultWindowsSDKVersion>
+ <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) ==
'10.0.10240'">10.0.10240.0</DefaultWindowsSDKVersion>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(OverrideVersion)' == ''">
+ <!--
+ Read version information from Include\patchlevel.h. The following
properties are set:
+
+ MajorVersionNumber - the '3' in '3.5.2a1'
+ MinorVersionNumber - the '5' in '3.5.2a1'
+ MicroVersionNumber - the '2' in '3.5.2a1'
+ ReleaseSerial - the '1' in '3.5.2a1'
+ ReleaseLevelName - the 'a1' in '3.5.2a1'
+ PythonVersionNumber - '3.5.2' for '3.5.2a1'
+ PythonVersion - '3.5.2a1'
+ PythonVersionHex - 0x030502a1 for '3.5.2a1'
+ ReleaseLevelNumber - 10 for alpha, 11 for beta, 12 for RC (gamma),
and 15 for final
+ Field3Value - 2101 for '3.5.2a1' (== 1000*2 + 10*10 ('a') +
1)
+ -->
+
<_PatchLevelContent>$([System.IO.File]::ReadAllText(`$(PySourcePath)Include\patchlevel.h`))</_PatchLevelContent>
+
<MajorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent),
`define\s+PY_MAJOR_VERSION\s+(\d+)`).Groups[1].Value)</MajorVersionNumber>
+
<MinorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent),
`define\s+PY_MINOR_VERSION\s+(\d+)`).Groups[1].Value)</MinorVersionNumber>
+
<MicroVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent),
`define\s+PY_MICRO_VERSION\s+(\d+)`).Groups[1].Value)</MicroVersionNumber>
+
<_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent),
`define\s+PY_RELEASE_LEVEL\s+PY_RELEASE_LEVEL_(\w+)`).Groups[1].Value)</_ReleaseLevel>
+
<ReleaseSerial>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent),
`define\s+PY_RELEASE_SERIAL\s+(\d+)`).Groups[1].Value)</ReleaseSerial>
+ <ReleaseLevelNumber>15</ReleaseLevelNumber>
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) ==
'ALPHA'">10</ReleaseLevelNumber>
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) ==
'BETA'">11</ReleaseLevelNumber>
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) ==
'GAMMA'">12</ReleaseLevelNumber>
+ <ReleaseLevelName Condition="$(_ReleaseLevel) ==
'ALPHA'">a$(ReleaseSerial)</ReleaseLevelName>
+ <ReleaseLevelName Condition="$(_ReleaseLevel) ==
'BETA'">b$(ReleaseSerial)</ReleaseLevelName>
+ <ReleaseLevelName Condition="$(_ReleaseLevel) ==
'GAMMA'">rc$(ReleaseSerial)</ReleaseLevelName>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(OverrideVersion)' != ''">
+ <!--
+ Override the version number when building by specifying OverrideVersion.
+ For example:
+
+ PCbuild\build.bat "/p:OverrideVersion=3.5.2a1"
+
+ Use the -V option to check your version is valid:
+
+ PCbuild\build.bat -V "/p:OverrideVersion=3.5.2a1"
+ PythonVersionNumber: 3.5.2
+ PythonVersion: 3.5.2a1
+ PythonVersionHex: 0x030502A1
+ Field3Value: 2101
+
+ Note that this only affects the version numbers embedded in resources and
+ installers, but not sys.version.
+ -->
+
<MajorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion),
`(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[1].Value)</MajorVersionNumber>
+
<MinorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion),
`(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[2].Value)</MinorVersionNumber>
+
<MicroVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion),
`(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[3].Value)</MicroVersionNumber>
+
<ReleaseLevelName>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion),
`(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[4].Value)</ReleaseLevelName>
+
<_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion),
`(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[5].Value)</_ReleaseLevel>
+
<ReleaseSerial>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion),
`(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[6].Value)</ReleaseSerial>
+ <ReleaseSerial Condition="'$(ReleaseSerial)' == ''">0</ReleaseSerial>
+ <ReleaseLevelNumber>15</ReleaseLevelNumber>
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) ==
'a'">10</ReleaseLevelNumber>
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) ==
'b'">11</ReleaseLevelNumber>
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) ==
'rc'">12</ReleaseLevelNumber>
+ </PropertyGroup>
+
+ <PropertyGroup>
+
<PythonVersionNumber>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</PythonVersionNumber>
+
<PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)$(ReleaseLevelName)</PythonVersion>
+ <PythonVersionHex>$([msbuild]::BitwiseOr(
+ $([msbuild]::Multiply($(MajorVersionNumber), 16777216)),
+ $([msbuild]::BitwiseOr(
+ $([msbuild]::Multiply($(MinorVersionNumber), 65536)),
+ $([msbuild]::BitwiseOr(
+ $([msbuild]::Multiply($(MicroVersionNumber), 256)),
+ $([msbuild]::BitwiseOr(
+ $([msbuild]::Multiply($(ReleaseLevelNumber), 16)),
+ $(ReleaseSerial)
+ ))
+ ))
+ ))
+ ))</PythonVersionHex>
+ <Field3Value>$([msbuild]::Add(
+ $(ReleaseSerial),
+ $([msbuild]::Add(
+ $([msbuild]::Multiply($(ReleaseLevelNumber), 10)),
+ $([msbuild]::Multiply($(MicroVersionNumber), 1000))
+ ))
+ ))</Field3Value>
+ <Field3Value Condition="$(UseTestMarker) ==
'true'">$([msbuild]::Add($(Field3Value), 9000))</Field3Value>
+
+ <!-- The name of the resulting pythonXY.dll (without the extension) -->
+
<PyDllName>python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt)</PyDllName>
+
+ <!-- The version and platform tag to include in .pyd filenames -->
+ <PydTag Condition="$(ArchName) ==
'win32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win32</PydTag>
+ <PydTag Condition="$(ArchName) ==
'amd64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64</PydTag>
+
+ <!-- The version number for sys.winver -->
+
<SysWinVer>$(MajorVersionNumber).$(MinorVersionNumber)$(PyArchExt)$(PyTestExt)</SysWinVer>
+ </PropertyGroup>
+
+ <!-- Displays the calculated version info -->
+ <Target Name="ShowVersionInfo">
+ <Message Importance="high" Text="PythonVersionNumber:
$(PythonVersionNumber)" />
+ <Message Importance="high" Text="PythonVersion: $(PythonVersion)" />
+ <Message Importance="high" Text="PythonVersionHex:
0x$([System.UInt32]::Parse($(PythonVersionHex)).ToString(`X08`))" />
+ <Message Importance="high" Text="Field3Value: $(Field3Value)" />
+ <Message Importance="high" Text="SysWinVer: $(SysWinVer)" />
+ <Message Importance="high" Text="PyDllName: $(PyDllName)" />
+ </Target>
+</Project>
diff --git a/pypy/tool/release/windowsinstaller/include/include.wixproj
b/pypy/tool/release/windowsinstaller/include/include.wixproj
--- a/pypy/tool/release/windowsinstaller/include/include.wixproj
+++ b/pypy/tool/release/windowsinstaller/include/include.wixproj
@@ -3,7 +3,7 @@
<PropertyGroup>
<ProjectGuid>{93912B72-A2D0-49C4-84DC-5B5B490B60AC}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
- <OutputName Condition="'$(OutputName)' == ''">dev</OutputName>
+ <OutputName Condition="'$(OutputName)' == ''">include</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit