Merge from 3.5
This commit is contained in:
commit
fb2125daf3
|
@ -21,6 +21,15 @@
|
||||||
<CleanAllTarget>CleanAll</CleanAllTarget>
|
<CleanAllTarget>CleanAll</CleanAllTarget>
|
||||||
<BuildInParallel>true</BuildInParallel>
|
<BuildInParallel>true</BuildInParallel>
|
||||||
</Projects>
|
</Projects>
|
||||||
|
<Projects2>
|
||||||
|
<Platform>$(Platform)</Platform>
|
||||||
|
<Configuration>$(Configuration)</Configuration>
|
||||||
|
<Properties></Properties>
|
||||||
|
<BuildTarget>Build</BuildTarget>
|
||||||
|
<CleanTarget>Clean</CleanTarget>
|
||||||
|
<CleanAllTarget>CleanAll</CleanAllTarget>
|
||||||
|
<BuildInParallel>true</BuildInParallel>
|
||||||
|
</Projects2>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- pythonXY.dll -->
|
<!-- pythonXY.dll -->
|
||||||
|
@ -35,6 +44,8 @@
|
||||||
</Projects>
|
</Projects>
|
||||||
<!-- python3.dll -->
|
<!-- python3.dll -->
|
||||||
<Projects Include="python3dll.vcxproj" />
|
<Projects Include="python3dll.vcxproj" />
|
||||||
|
<!-- pyshellext.dll -->
|
||||||
|
<Projects Include="pyshellext.vcxproj" />
|
||||||
<!-- py[w].exe -->
|
<!-- py[w].exe -->
|
||||||
<Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" />
|
<Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" />
|
||||||
<!-- _freeze_importlib -->
|
<!-- _freeze_importlib -->
|
||||||
|
@ -58,9 +69,9 @@
|
||||||
</Projects>
|
</Projects>
|
||||||
|
|
||||||
<!-- python[w].exe -->
|
<!-- python[w].exe -->
|
||||||
<Projects Include="python.vcxproj;pythonw.vcxproj">
|
<Projects2 Include="python.vcxproj;pythonw.vcxproj">
|
||||||
<BuildInParallel>false</BuildInParallel>
|
<BuildInParallel>false</BuildInParallel>
|
||||||
</Projects>
|
</Projects2>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="Build">
|
<Target Name="Build">
|
||||||
|
@ -69,9 +80,20 @@
|
||||||
BuildInParallel="%(BuildInParallel)"
|
BuildInParallel="%(BuildInParallel)"
|
||||||
StopOnFirstFailure="true"
|
StopOnFirstFailure="true"
|
||||||
Targets="%(BuildTarget)" />
|
Targets="%(BuildTarget)" />
|
||||||
|
<MSBuild Projects="@(Projects2)"
|
||||||
|
Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
|
||||||
|
BuildInParallel="%(BuildInParallel)"
|
||||||
|
StopOnFirstFailure="true"
|
||||||
|
Targets="%(BuildTarget)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="Clean">
|
<Target Name="Clean">
|
||||||
|
<MSBuild Projects="@(Projects2)"
|
||||||
|
Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
|
||||||
|
BuildInParallel="%(BuildInParallel)"
|
||||||
|
StopOnFirstFailure="false"
|
||||||
|
Condition="%(CleanTarget) != ''"
|
||||||
|
Targets="%(CleanTarget)" />
|
||||||
<MSBuild Projects="@(Projects)"
|
<MSBuild Projects="@(Projects)"
|
||||||
Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
|
Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
|
||||||
BuildInParallel="%(BuildInParallel)"
|
BuildInParallel="%(BuildInParallel)"
|
||||||
|
@ -81,6 +103,12 @@
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="CleanAll">
|
<Target Name="CleanAll">
|
||||||
|
<MSBuild Projects="@(Projects2)"
|
||||||
|
Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
|
||||||
|
BuildInParallel="%(BuildInParallel)"
|
||||||
|
StopOnFirstFailure="false"
|
||||||
|
Condition="%(CleanAllTarget) != ''"
|
||||||
|
Targets="%(CleanAllTarget)" />
|
||||||
<MSBuild Projects="@(Projects)"
|
<MSBuild Projects="@(Projects)"
|
||||||
Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
|
Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
|
||||||
BuildInParallel="%(BuildInParallel)"
|
BuildInParallel="%(BuildInParallel)"
|
||||||
|
|
|
@ -4,10 +4,8 @@
|
||||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||||
<OutDir>$(BuildPath)</OutDir>
|
<OutDir>$(BuildPath)</OutDir>
|
||||||
<OutDir Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)</OutDir>
|
|
||||||
<OutDir Condition="!HasTrailingSlash($(OutDir))">$(OutDir)\</OutDir>
|
<OutDir Condition="!HasTrailingSlash($(OutDir))">$(OutDir)\</OutDir>
|
||||||
<Py_IntDir Condition="'$(Py_IntDir)' == ''">$(SolutionDir)obj\</Py_IntDir>
|
<Py_IntDir Condition="'$(PyIntDir)' == ''">$(SolutionDir)obj\</Py_IntDir>
|
||||||
<IntDir Condition="!HasTrailingSlash($(IntDir))">$(IntDir)\</IntDir>
|
|
||||||
<IntDir>$(Py_IntDir)\$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir>
|
<IntDir>$(Py_IntDir)\$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir>
|
||||||
<IntDir Condition="$(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate'">$(Py_IntDir)\$(ArchName)_PGO\$(ProjectName)\</IntDir>
|
<IntDir Condition="$(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate'">$(Py_IntDir)\$(ArchName)_PGO\$(ProjectName)\</IntDir>
|
||||||
<TargetName Condition="'$(TargetName)' == ''">$(ProjectName)</TargetName>
|
<TargetName Condition="'$(TargetName)' == ''">$(ProjectName)</TargetName>
|
||||||
|
@ -29,7 +27,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)PC;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
@ -85,9 +83,8 @@
|
||||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
<TargetEnvironment>Win32</TargetEnvironment>
|
<TargetEnvironment>Win32</TargetEnvironment>
|
||||||
<TargetEnvironment Condition="'$(Platform)' == 'x64'">X64</TargetEnvironment>
|
<TargetEnvironment Condition="'$(Platform)' == 'x64'">X64</TargetEnvironment>
|
||||||
<TypeLibraryName>$(OutDir)wininst.tlb</TypeLibraryName>
|
<TypeLibraryName>$(OutDir)%(Filename).tlb</TypeLibraryName>
|
||||||
<HeaderFileName>
|
<HeaderFileName>$(IntDir)%(Filename)_h.h</HeaderFileName>
|
||||||
</HeaderFileName>
|
|
||||||
</Midl>
|
</Midl>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,13 @@
|
||||||
<PySourcePath Condition="!HasTrailingSlash($(PySourcePath))">$(PySourcePath)\</PySourcePath>
|
<PySourcePath Condition="!HasTrailingSlash($(PySourcePath))">$(PySourcePath)\</PySourcePath>
|
||||||
|
|
||||||
<!-- Directory where build outputs are put -->
|
<!-- Directory where build outputs are put -->
|
||||||
<BuildPath Condition="'$(PyBuildPath)' == ''">$(PySourcePath)PCBuild\$(ArchName)\</BuildPath>
|
<BuildPath32 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCBuild\win32\</BuildPath32>
|
||||||
<BuildPath Condition="'$(PyBuildPath)' != ''">$(PyBuildPath)</BuildPath>
|
<BuildPath32 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\win32\</BuildPath32>
|
||||||
|
<BuildPath64 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCBuild\amd64\</BuildPath64>
|
||||||
|
<BuildPath64 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\amd64\</BuildPath64>
|
||||||
|
<BuildPath Condition="'$(ArchName)' == 'win32'">$(BuildPath32)</BuildPath>
|
||||||
|
<BuildPath Condition="'$(ArchName)' == 'amd64'">$(BuildPath64)</BuildPath>
|
||||||
|
<BuildPath Condition="'$(BuildPath)' == ''">$(PySourcePath)PCBuild\$(ArchName)\</BuildPath>
|
||||||
<BuildPath Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath>
|
<BuildPath Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath>
|
||||||
|
|
||||||
<!-- Directories of external projects. tcltk is handled in tcltk.props -->
|
<!-- Directories of external projects. tcltk is handled in tcltk.props -->
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<IntDir>$(PySourcePath)PCBuild\obj\$(Configuration)_$(Platform)_Setup\Bootstrap\</IntDir>
|
<IntDir>$(Py_IntDir)\$(Configuration)_$(Platform)_Setup\Bootstrap\</IntDir>
|
||||||
<OutDir>$(IntDir)</OutDir>
|
<OutDir>$(IntDir)</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<TargetPath>$(OutputPath)\en-us\$(TargetName)$(TargetExt)</TargetPath>
|
<TargetPath>$(OutputPath)\en-us\$(TargetName)$(TargetExt)</TargetPath>
|
||||||
<CleanCommand>rmdir /q/s "$(IntermediateOutputPath)\zip_$(ArchName)"</CleanCommand>
|
<CleanCommand>rmdir /q/s "$(IntermediateOutputPath)\zip_$(ArchName)"</CleanCommand>
|
||||||
<Arguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py"</Arguments>
|
<Arguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py"</Arguments>
|
||||||
<Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -a $(ArchName)</Arguments>
|
<Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -b "$(OutDir.TrimEnd('\'))"</Arguments>
|
||||||
<Environment>set DOC_FILENAME=python$(PythonVersion).chm
|
<Environment>set DOC_FILENAME=python$(PythonVersion).chm
|
||||||
set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT</Environment>
|
set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT</Environment>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -90,23 +90,23 @@ def include_in_tools(p):
|
||||||
return p.suffix.lower() in {'.py', '.pyw', '.txt'}
|
return p.suffix.lower() in {'.py', '.pyw', '.txt'}
|
||||||
|
|
||||||
FULL_LAYOUT = [
|
FULL_LAYOUT = [
|
||||||
('/', 'PCBuild/$arch', 'python.exe', is_not_debug),
|
('/', '$build', 'python.exe', is_not_debug),
|
||||||
('/', 'PCBuild/$arch', 'pythonw.exe', is_not_debug),
|
('/', '$build', 'pythonw.exe', is_not_debug),
|
||||||
('/', 'PCBuild/$arch', 'python{0.major}.dll'.format(sys.version_info), is_not_debug),
|
('/', '$build', 'python{0.major}.dll'.format(sys.version_info), is_not_debug),
|
||||||
('/', 'PCBuild/$arch', 'python{0.major}{0.minor}.dll'.format(sys.version_info), is_not_debug),
|
('/', '$build', 'python{0.major}{0.minor}.dll'.format(sys.version_info), is_not_debug),
|
||||||
('DLLs/', 'PCBuild/$arch', '*.pyd', is_not_debug),
|
('DLLs/', '$build', '*.pyd', is_not_debug),
|
||||||
('DLLs/', 'PCBuild/$arch', '*.dll', is_not_debug_or_python),
|
('DLLs/', '$build', '*.dll', is_not_debug_or_python),
|
||||||
('include/', 'include', '*.h', None),
|
('include/', 'include', '*.h', None),
|
||||||
('include/', 'PC', 'pyconfig.h', None),
|
('include/', 'PC', 'pyconfig.h', None),
|
||||||
('Lib/', 'Lib', '**/*', include_in_lib),
|
('Lib/', 'Lib', '**/*', include_in_lib),
|
||||||
('libs/', 'PCBuild/$arch', '*.lib', include_in_libs),
|
('libs/', '$build', '*.lib', include_in_libs),
|
||||||
('Tools/', 'Tools', '**/*', include_in_tools),
|
('Tools/', 'Tools', '**/*', include_in_tools),
|
||||||
]
|
]
|
||||||
|
|
||||||
EMBED_LAYOUT = [
|
EMBED_LAYOUT = [
|
||||||
('/', 'PCBuild/$arch', 'python*.exe', is_not_debug),
|
('/', '$build', 'python*.exe', is_not_debug),
|
||||||
('/', 'PCBuild/$arch', '*.pyd', is_not_debug),
|
('/', '$build', '*.pyd', is_not_debug),
|
||||||
('/', 'PCBuild/$arch', '*.dll', is_not_debug),
|
('/', '$build', '*.dll', is_not_debug),
|
||||||
('python{0.major}{0.minor}.zip'.format(sys.version_info), 'Lib', '**/*', include_in_lib),
|
('python{0.major}{0.minor}.zip'.format(sys.version_info), 'Lib', '**/*', include_in_lib),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -168,18 +168,18 @@ def rglob(root, pattern, condition):
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('-s', '--source', metavar='dir', help='The directory containing the repository root', type=Path)
|
parser.add_argument('-s', '--source', metavar='dir', help='The directory containing the repository root', type=Path)
|
||||||
parser.add_argument('-o', '--out', metavar='file', help='The name of the output self-extracting archive', type=Path, default=None)
|
parser.add_argument('-o', '--out', metavar='file', help='The name of the output archive', type=Path, default=None)
|
||||||
parser.add_argument('-t', '--temp', metavar='dir', help='A directory to temporarily extract files into', type=Path, default=None)
|
parser.add_argument('-t', '--temp', metavar='dir', help='A directory to temporarily extract files into', type=Path, default=None)
|
||||||
parser.add_argument('-e', '--embed', help='Create an embedding layout', action='store_true', default=False)
|
parser.add_argument('-e', '--embed', help='Create an embedding layout', action='store_true', default=False)
|
||||||
parser.add_argument('-a', '--arch', help='Specify the architecture to use (win32/amd64)', type=str, default="win32")
|
parser.add_argument('-b', '--build', help='Specify the build directory', type=Path)
|
||||||
ns = parser.parse_args()
|
ns = parser.parse_args()
|
||||||
|
|
||||||
source = ns.source or (Path(__file__).resolve().parent.parent.parent)
|
source = ns.source or (Path(__file__).resolve().parent.parent.parent)
|
||||||
out = ns.out
|
out = ns.out
|
||||||
arch = ns.arch
|
build = ns.build
|
||||||
assert isinstance(source, Path)
|
assert isinstance(source, Path)
|
||||||
assert not out or isinstance(out, Path)
|
assert not out or isinstance(out, Path)
|
||||||
assert isinstance(arch, str)
|
assert isinstance(build, Path)
|
||||||
|
|
||||||
if ns.temp:
|
if ns.temp:
|
||||||
temp = ns.temp
|
temp = ns.temp
|
||||||
|
@ -202,7 +202,10 @@ def main():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for t, s, p, c in layout:
|
for t, s, p, c in layout:
|
||||||
s = source / s.replace("$arch", arch)
|
if s == '$build':
|
||||||
|
s = build
|
||||||
|
else:
|
||||||
|
s = source / s
|
||||||
copied = copy_to_layout(temp / t.rstrip('/'), rglob(s, p, c))
|
copied = copy_to_layout(temp / t.rstrip('/'), rglob(s, p, c))
|
||||||
print('Copied {} files'.format(copied))
|
print('Copied {} files'.format(copied))
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<IntermediateOutputPath>$(PySourcePath)PCBuild\obj\$(Configuration)_$(Platform)_Setup\$(OutputName)</IntermediateOutputPath>
|
<IntermediateOutputPath>$(Py_IntDir)\$(Configuration)_$(Platform)_Setup\$(OutputName)</IntermediateOutputPath>
|
||||||
<IntermediateOutputPath Condition="'$(OutputSuffix)' != ''">$(IntermediateOutputPath)_$(OutputSuffix)</IntermediateOutputPath>
|
<IntermediateOutputPath Condition="'$(OutputSuffix)' != ''">$(IntermediateOutputPath)_$(OutputSuffix)</IntermediateOutputPath>
|
||||||
<OutputPath Condition="'$(OutputPath)' == ''">$(BuildPath)</OutputPath>
|
<OutputPath Condition="'$(OutputPath)' == ''">$(BuildPath)</OutputPath>
|
||||||
<OutputPath Condition="!HasTrailingSlash($(OutputPath))">$(OutputPath)\</OutputPath>
|
<OutputPath Condition="!HasTrailingSlash($(OutputPath))">$(OutputPath)\</OutputPath>
|
||||||
|
@ -124,6 +124,12 @@
|
||||||
<LinkerBindInputPaths Include="$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT">
|
<LinkerBindInputPaths Include="$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT">
|
||||||
<BindName>redist</BindName>
|
<BindName>redist</BindName>
|
||||||
</LinkerBindInputPaths>
|
</LinkerBindInputPaths>
|
||||||
|
<LinkerBindInputPaths Include="$(BuildPath32)">
|
||||||
|
<BindName>build32</BindName>
|
||||||
|
</LinkerBindInputPaths>
|
||||||
|
<LinkerBindInputPaths Include="$(BuildPath64)">
|
||||||
|
<BindName>build64</BindName>
|
||||||
|
</LinkerBindInputPaths>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="_ValidateMsiProps" BeforeTargets="PrepareForBuild">
|
<Target Name="_ValidateMsiProps" BeforeTargets="PrepareForBuild">
|
||||||
|
|
Loading…
Reference in New Issue