Commit 68d663cf authored by Steve Dower's avatar Steve Dower Committed by GitHub

[bpo-30916] Pre-build OpenSSL and Tcl/Tk for Windows (#2688)

Updates ssl and tkinter projects to use pre-built externals
parent 49f6449e
......@@ -5,8 +5,19 @@ pushd %~dp0
set this=%~n0
if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build
call ..\PCBuild\find_python.bat %PYTHON%
if "%SPHINXBUILD%" EQU "" if "%PYTHON%" NEQ "" (
set SPHINXBUILD=%PYTHON%\..\Scripts\sphinx-build.exe
rem Cannot use %SPHINXBUILD% in the same block where we set it
if not exist "%PYTHON%\..\Scripts\sphinx-build.exe" (
echo Installing sphinx with %PYTHON%
"%PYTHON%" -m pip install sphinx
if errorlevel 1 exit /B
)
)
if "%PYTHON%" EQU "" set PYTHON=py
if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build
if "%1" NEQ "htmlhelp" goto :skiphhcsearch
if exist "%HTMLHELP%" goto :skiphhcsearch
......
......@@ -1244,6 +1244,7 @@ class ContextTests(unittest.TestCase):
self.assertEqual(ctx.cert_store_stats(), {"crl": 0, "x509": 1, "x509_ca": 0})
@unittest.skipUnless(sys.platform == "win32", "Windows specific")
@unittest.skipIf(hasattr(sys, "gettotalrefcount"), "Debug build does not share environment between CRTs")
def test_load_default_certs_env_windows(self):
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
ctx.load_default_certs()
......
Pre-build OpenSSL, Tcl and Tk and include the binaries in the build.
......@@ -21,11 +21,13 @@
#ifdef WITH_THREAD
#include "pythread.h"
/* Redefined below for Windows debug builds after important #includes */
#define _PySSL_FIX_ERRNO
#define PySSL_BEGIN_ALLOW_THREADS_S(save) \
do { if (_ssl_locks_count>0) { (save) = PyEval_SaveThread(); } } while (0)
#define PySSL_END_ALLOW_THREADS_S(save) \
do { if (_ssl_locks_count>0) { PyEval_RestoreThread(save); } } while (0)
do { if (_ssl_locks_count>0) { PyEval_RestoreThread(save); } _PySSL_FIX_ERRNO; } while (0)
#define PySSL_BEGIN_ALLOW_THREADS { \
PyThreadState *_save = NULL; \
PySSL_BEGIN_ALLOW_THREADS_S(_save);
......@@ -96,6 +98,40 @@ struct py_ssl_library_code {
int code;
};
#if defined(MS_WINDOWS) && defined(Py_DEBUG)
/* Debug builds on Windows rely on getting errno directly from OpenSSL.
* However, because it uses a different CRT, we need to transfer the
* value of errno from OpenSSL into our debug CRT.
*
* Don't be fooled - this is horribly ugly code. The only reasonable
* alternative is to do both debug and release builds of OpenSSL, which
* requires much uglier code to transform their automatically generated
* makefile. This is the lesser of all the evils.
*/
static void _PySSLFixErrno(void) {
HMODULE ucrtbase = GetModuleHandleW(L"ucrtbase.dll");
if (!ucrtbase) {
/* If ucrtbase.dll is not loaded but the SSL DLLs are, we likely
* have a catastrophic failure, but this function is not the
* place to raise it. */
return;
}
typedef int *(__stdcall *errno_func)(void);
errno_func ssl_errno = (errno_func)GetProcAddress(ucrtbase, "_errno");
if (ssl_errno) {
errno = *ssl_errno();
*ssl_errno() = 0;
} else {
errno = ENOTRECOVERABLE;
}
}
#undef _PySSL_FIX_ERRNO
#define _PySSL_FIX_ERRNO _PySSLFixErrno()
#endif
/* Include generated data (error codes) */
#include "_ssl_data.h"
......
......@@ -54,17 +54,15 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="pyproject.props" />
<Import Project="openssl.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
......@@ -78,14 +76,6 @@
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="ssleay.vcxproj">
<Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="libeay.vcxproj">
<Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
......
......@@ -54,21 +54,22 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="pyproject.props" />
<Import Project="openssl.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;crypt32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>ws2_32.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_ssl.c" />
<ClCompile Include="$(opensslIncludeDir)\applink.c">
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\PC\python_nt.rc" />
......@@ -78,14 +79,6 @@
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="libeay.vcxproj">
<Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="ssleay.vcxproj">
<Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="_socket.vcxproj">
<Project>{86937f53-c189-40ef-8ce8-8759d8e7d480}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
......@@ -94,4 +87,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
\ No newline at end of file
......@@ -9,5 +9,11 @@
<ClCompile Include="..\Modules\_ssl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(opensslIncludeDir)\applink.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\PC\python_nt.rc" />
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -76,19 +76,23 @@
<ItemGroup>
<ResourceCompile Include="..\PC\python_nt.rc" />
</ItemGroup>
<ItemGroup>
<_TclTkDLL Include="$(tcltkdir)\bin\$(tclDllName)" />
<_TclTkDLL Include="$(tcltkdir)\bin\$(tkDllName)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="tcl.vcxproj">
<Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>
</ProjectReference>
<ProjectReference Include="tk.vcxproj">
<Project>{7e85eccf-a72c-4da4-9e52-884508e80ba1}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<Target Name="_CopyTclTkDLL" Inputs="@(_TclTkDLL)" Outputs="@(_TclTkDLL->'$(OutDir)%(Filename)%(Extension)')" AfterTargets="Build">
<Copy SourceFiles="@(_TclTkDLL)" DestinationFolder="$(OutDir)" />
</Target>
<Target Name="_CleanTclTkDLL" BeforeTargets="Clean">
<Delete Files="@(_TclTkDLL->'$(OutDir)%(Filename)%(Extension)')" />
</Target>
</Project>
\ No newline at end of file
......@@ -5,8 +5,6 @@ echo.%~nx0 [flags and arguments] [quoted MSBuild options]
echo.
echo.Build CPython from the command line. Requires the appropriate
echo.version(s) of Microsoft Visual Studio to be installed (see readme.txt).
echo.Also requires Subversion (svn.exe) to be on PATH if the '-e' flag is
echo.given.
echo.
echo.After the flags recognized by this script, up to 9 arguments to be passed
echo.directly to MSBuild may be passed. If the argument contains an '=', the
......
......@@ -29,20 +29,21 @@
@where msbuild > "%TEMP%\msbuild.loc" 2> nul && set /P MSBUILD= < "%TEMP%\msbuild.loc" & del "%TEMP%\msbuild.loc"
@if exist "%MSBUILD%" set MSBUILD="%MSBUILD%" & (set _Py_MSBuild_Source=PATH) & goto :found
@rem VS 2017 sets exactly one install as the "main" install, so we may find MSBuild in there.
@reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v 15.0 /reg:32 >nul 2>nul
@if NOT ERRORLEVEL 1 @for /F "tokens=1,2*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v 15.0 /reg:32') DO @(
@if "%%i"=="15.0" @if exist "%%k\MSBuild\15.0\Bin\msbuild.exe" @(set MSBUILD="%%k\MSBuild\15.0\Bin\msbuild.exe")
)
@if exist %MSBUILD% (set _Py_MSBuild_Source=Visual Studio 2017 registry) & goto :found
@rem VS 2015 and earlier register MSBuild separately, so we can find it.
@rem Prefer MSBuild 14.0 over MSBuild 15.0, since the latter may not be able to find a VC14 install.
@reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath /reg:32 >nul 2>nul
@if NOT ERRORLEVEL 1 @for /F "tokens=1,2*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath /reg:32') DO @(
@if "%%i"=="MSBuildToolsPath" @if exist "%%k\msbuild.exe" @(set MSBUILD="%%k\msbuild.exe")
)
@if exist %MSBUILD% (set _Py_MSBuild_Source=registry) & goto :found
@rem VS 2017 sets exactly one install as the "main" install, so we may find MSBuild in there.
@reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v 15.0 /reg:32 >nul 2>nul
@if NOT ERRORLEVEL 1 @for /F "tokens=1,2*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v 15.0 /reg:32') DO @(
@if "%%i"=="15.0" @if exist "%%k\MSBuild\15.0\Bin\msbuild.exe" @(set MSBUILD="%%k\MSBuild\15.0\Bin\msbuild.exe")
)
@if exist %MSBUILD% (set _Py_MSBuild_Source=Visual Studio 2017 registry) & goto :found
@exit /b 1
......
@rem
@rem Searches for python.exe and may download a private copy from nuget.
@rem
@rem This file is supposed to modify the state of the caller (specifically
@rem the MSBUILD variable), so we do not use setlocal or echo, and avoid
@rem changing any other persistent state.
@rem
@rem No arguments provided means do full search
@if '%1' EQU '' goto :begin_search
@rem One argument may be the full path. Use a goto so we don't try to
@rem parse the next if statement - incorrect quoting in the multi-arg
@rem case can cause us to break immediately.
@if '%2' EQU '' goto :one_arg
@rem Entire command line may represent the full path if quoting failed.
@if exist "%*" (set PYTHON="%*") & (set _Py_Python_Source=from environment) & goto :found
@goto :begin_search
:one_arg
@if exist "%~1" (set PYTHON="%~1") & (set _Py_Python_Source=from environment) & goto :found
:begin_search
@set PYTHON=
@set _Py_EXTERNALS_DIR=%EXTERNAL_DIR%
@if "%_Py_EXTERNALS_DIR%"=="" (set _Py_EXTERNALS_DIR=%~dp0\..\externals)
@rem If we have Python in externals, use that one
@if exist "%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe" (set PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") & (set _Py_Python_Source=found in externals directory) & goto :found
@rem If py.exe finds a recent enough version, use that one
@py -3.6 -V >nul 2>&1 && (set PYTHON=py -3.6) && (set _Py_Python_Source=found with py.exe) && goto :found
@if NOT exist "%_Py_EXTERNALS_DIR%" mkdir "%_Py_EXTERNALS_DIR%"
@set _Py_NUGET=%NUGET%
@set _Py_NUGET_URL=%NUGET_URL%
@if "%_Py_NUGET%"=="" (set _Py_NUGET=%EXTERNALS_DIR%\nuget.exe)
@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://aka.ms/nugetclidl)
@if NOT exist "%_Py_NUGET%" (
@echo Downloading nuget...
@rem NB: Must use single quotes around NUGET here, NOT double!
@rem Otherwise, a space in the path would break things
@powershell.exe -Command Invoke-WebRequest %_Py_NUGET_URL% -OutFile '%_Py_NUGET%'
)
@echo Installing Python via nuget...
@"%_Py_NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%"
@rem Quote it here; it's not quoted later because "py -3.6" wouldn't work
@if not errorlevel 1 (set PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") & (set _Py_Python_Source=found on nuget.org) & goto :found
@exit /b 1
:found
@echo Using %PYTHON% (%_Py_Python_Source%)
@set _Py_Python_Source=
......@@ -4,20 +4,27 @@ rem Simple script to fetch source for external libraries
if "%PCBUILD%"=="" (set PCBUILD=%~dp0)
if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%PCBUILD%\..\externals)
if "%NUGET%"=="" (set NUGET=%EXTERNALS_DIR%\nuget.exe)
if "%NUGET_URL%"=="" (set NUGET_URL=https://aka.ms/nugetclidl)
set DO_FETCH=true
set DO_CLEAN=false
set IncludeTkinterSrc=false
set IncludeSSLSrc=false
:CheckOpts
if "%~1"=="--no-tkinter" (set IncludeTkinter=false) & shift & goto CheckOpts
if "%~1"=="--no-openssl" (set IncludeSSL=false) & shift & goto CheckOpts
if "%~1"=="--python" (set PYTHON_FOR_BUILD=%2) & shift & shift & goto CheckOpts
if "%~1"=="--tkinter-src" (set IncludeTkinterSrc=true) & shift & goto CheckOpts
if "%~1"=="--openssl-src" (set IncludeSSLSrc=true) & shift & goto CheckOpts
if "%~1"=="--python" (set PYTHON=%2) & shift & shift & goto CheckOpts
if "%~1"=="--organization" (set ORG=%2) & shift & shift & goto CheckOpts
if "%~1"=="-c" (set DO_CLEAN=true) & shift & goto CheckOpts
if "%~1"=="--clean" (set DO_CLEAN=true) & shift & goto CheckOpts
if "%~1"=="--clean-only" (set DO_FETCH=false) & goto clean
rem Include old options for compatibility
if "%~1"=="--no-tkinter" shift & goto CheckOpts
if "%~1"=="--no-openssl" shift & goto CheckOpts
if "x%~1" NEQ "x" goto usage
if "%DO_CLEAN%"=="false" goto fetch
......@@ -32,57 +39,41 @@ if "%DO_FETCH%"=="false" goto end
:fetch
if "%ORG%"=="" (set ORG=python)
if "%PYTHON_FOR_BUILD%"=="" (
echo Checking for installed python...
py -3.6 -V >nul 2>&1 && (set PYTHON_FOR_BUILD=py -3.6)
)
if "%PYTHON_FOR_BUILD%"=="" (
if NOT exist "%EXTERNALS_DIR%" mkdir "%EXTERNALS_DIR%"
if NOT exist "%NUGET%" (
echo Downloading nuget...
rem NB: Must use single quotes around NUGET here, NOT double!
rem Otherwise, a space in the path would break things
powershell.exe -Command Invoke-WebRequest %NUGET_URL% -OutFile '%NUGET%'
)
echo Installing Python via nuget...
"%NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%EXTERNALS_DIR%"
rem Quote it here; it's not quoted later because "py -3.6" wouldn't work
set PYTHON_FOR_BUILD="%EXTERNALS_DIR%\pythonx86\tools\python.exe"
)
call "%PCBUILD%find_python.bat" "%PYTHON%"
echo.Fetching external libraries...
set libraries=
set libraries=%libraries% bzip2-1.0.6
if NOT "%IncludeSSL%"=="false" set libraries=%libraries% openssl-1.0.2k
set libraries=%libraries% sqlite-3.14.2.0
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tcl-core-8.6.6.0
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tk-8.6.6.0
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tix-8.4.3.6
set libraries=%libraries% xz-5.2.2
set libraries=%libraries% bzip2-1.0.6
if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.0.2k
set libraries=%libraries% sqlite-3.14.2.0
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.6.0
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.6.0
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tix-8.4.3.6
set libraries=%libraries% xz-5.2.2
for %%e in (%libraries%) do (
if exist "%EXTERNALS_DIR%\%%e" (
echo.%%e already exists, skipping.
) else (
echo.Fetching %%e...
%PYTHON_FOR_BUILD% "%PCBUILD%get_external.py" -O %ORG% %%e
%PYTHON% "%PCBUILD%get_external.py" -O %ORG% %%e
)
)
echo.Fetching external binaries...
set binaries=
set binaries=%binaries%
if NOT "%IncludeSSL%"=="false" set binaries=%binaries% nasm-2.11.06
if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.0.2k
if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.6.0
if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06
for %%b in (%binaries%) do (
if exist "%EXTERNALS_DIR%\%%b" (
echo.%%b already exists, skipping.
) else (
echo.Fetching %%b...
%PYTHON_FOR_BUILD% "%PCBUILD%get_external.py" -b -O %ORG% %%b
%PYTHON% "%PCBUILD%get_external.py" -b -O %ORG% %%b
)
)
......
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Py_IntDir Condition="'$(Py_IntDir)' == ''">$(opensslDir)tmp\</Py_IntDir>
</PropertyGroup>
<Import Project="pyproject.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup>
<PreprocessorDefinitions Include="DSO_WIN32" />
<PreprocessorDefinitions Include="WIN32_LEAN_AND_MEAN" />
<PreprocessorDefinitions Include="L_ENDIAN" />
<PreprocessorDefinitions Include="_CRT_SECURE_NO_WARNINGS" />
<PreprocessorDefinitions Include="_CRT_SECURE_NO_DEPRECATE" />
<PreprocessorDefinitions Include="_WINSOCK_DEPRECATED_NO_WARNINGS" />
<PreprocessorDefinitions Include="OPENSSL_THREADS" />
<!-- <PreprocessorDefinitions Include="OPENSSL_SYSNAME_WIN32" /> -->
<PreprocessorDefinitions Include="OPENSSL_IA32_SSE2" />
<PreprocessorDefinitions Include="OPENSSL_BN_ASM_GF2m" />
<PreprocessorDefinitions Include="SHA1_ASM" />
<PreprocessorDefinitions Include="SHA256_ASM" />
<PreprocessorDefinitions Include="SHA512_ASM" />
<PreprocessorDefinitions Include="MD5_ASM" />
<PreprocessorDefinitions Include="AES_ASM" />
<PreprocessorDefinitions Include="VPAES_ASM" />
<PreprocessorDefinitions Include="WHIRLPOOL_ASM" />
<PreprocessorDefinitions Include="GHASH_ASM" />
<PreprocessorDefinitions Include="OPENSSL_NO_IDEA" />
<PreprocessorDefinitions Include="OPENSSL_NO_RC5" />
<PreprocessorDefinitions Include="OPENSSL_NO_MD2" />
<PreprocessorDefinitions Include="OPENSSL_NO_MDC2" />
<PreprocessorDefinitions Include="OPENSSL_NO_KRB5" />
<PreprocessorDefinitions Include="OPENSSL_NO_JPAKE" />
<PreprocessorDefinitions Include="OPENSSL_NO_RDRAND" />
<PreprocessorDefinitions Include="OPENSSL_NO_RSAX" />
<PreprocessorDefinitions Include="OPENSSL_NO_DYNAMIC_ENGINE" />
</ItemGroup>
<ItemGroup Condition="'$(Platform)'=='Win32'">
<PreprocessorDefinitions Include="OPENSSL_BN_ASM_PART_WORDS" />
<PreprocessorDefinitions Include="OPENSSL_BN_ASM_MONT" />
<PreprocessorDefinitions Include="RMD160_ASM" />
</ItemGroup>
<PropertyGroup>
<_PreprocessorDefinitionList>@(PreprocessorDefinitions)</_PreprocessorDefinitionList>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<!-- Suppress 64-bit truncation warnings - they aren't ours to worry about -->
<DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
<AdditionalIncludeDirectories>$(opensslDir);$(opensslIncludeDir);$(opensslDir)crypto;$(opensslDir)crypto\asn1;$(opensslDir)crypto\evp;$(opensslDir)crypto\modes</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(_PreprocessorDefinitionList);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(opensslOutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<Target Name="FindNasm">
<PropertyGroup>
<nasm Condition="$(Platform) == 'Win32'">nasm.exe -f win32</nasm>
<nasm Condition="$(Platform) == 'x64'">nasm.exe -f win64 -DNEAR -Ox -g</nasm>
</PropertyGroup>
<ItemGroup>
<_SSLDLL Include="$(opensslOutDir)\libeay32.dll" />
<_SSLDLL Include="$(opensslOutDir)\libeay32.pdb" />
<_SSLDLL Include="$(opensslOutDir)\ssleay32.dll" />
<_SSLDLL Include="$(opensslOutDir)\ssleay32.pdb" />
</ItemGroup>
<Target Name="_CopySSLDLL" Inputs="@(_SSLDLL)" Outputs="@(_SSLDLL->'$(OutDir)%(Filename)%(Extension)')" AfterTargets="Build">
<Copy SourceFiles="@(_SSLDLL)" DestinationFolder="$(OutDir)" />
</Target>
<Target Name="BuildNasmFiles" BeforeTargets="PreBuildEvent" DependsOnTargets="PrepareForBuild;FindNasm" Inputs="@(NasmCompile)" Outputs="@(NasmCompile->'$(IntDir)%(Filename).obj')">
<Exec Command='setlocal
set PATH=$(nasmDir);%PATH%
$(nasm) -o "$(IntDir)%(NasmCompile.Filename).obj" "%(NasmCompile.FullPath)"' />
<ItemGroup>
<Link Include="$(IntDir)%(NasmCompile.Filename).obj" />
<Lib Include="$(IntDir)%(NasmCompile.Filename).obj" />
</ItemGroup>
<Target Name="_CleanSSLDLL" BeforeTargets="Clean">
<Delete Files="@(_SSLDLL->'$(OutDir)%(Filename)%(Extension)')" />
</Target>
</Project>
</Project>
\ No newline at end of file
......@@ -35,85 +35,84 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{10615B24-73BF-4EFA-93AA-236916321317}</ProjectGuid>
<RootNamespace>ssleay</RootNamespace>
<ProjectGuid>{B5FD6F1D-129E-4BFF-9340-03606FAC7283}</ProjectGuid>
</PropertyGroup>
<Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<ConfigurationType>Makefile</ConfigurationType>
<Bitness>32</Bitness>
<Bitness Condition="$(Platform) == 'x64'">64</Bitness>
<ArchName>x86</ArchName>
<ArchName Condition="$(Platform) == 'x64'">amd64</ArchName>
<SupportSigning>true</SupportSigning>
</PropertyGroup>
<Import Project="openssl.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<!--
<ClCompile Include="$(opensslDir)ssl\bio_ssl.c" />
-->
<ClCompile Include="$(opensslDir)ssl\d1_both.c" />
<!--
<ClCompile Include="$(opensslDir)ssl\d1_clnt.c" />
<ClCompile Include="$(opensslDir)ssl\d1_enc.c" />
-->
<ClCompile Include="$(opensslDir)ssl\d1_lib.c" />
<!--
<ClCompile Include="$(opensslDir)ssl\d1_meth.c" />
-->
<ClCompile Include="$(opensslDir)ssl\d1_pkt.c" />
<ClCompile Include="$(opensslDir)ssl\d1_srtp.c" />
<!--
<ClCompile Include="$(opensslDir)ssl\d1_srvr.c" />
<ClCompile Include="$(opensslDir)ssl\kssl.c" />
-->
<ClCompile Include="$(opensslDir)ssl\s2_clnt.c" />
<ClCompile Include="$(opensslDir)ssl\s2_enc.c" />
<ClCompile Include="$(opensslDir)ssl\s2_lib.c" />
<ClCompile Include="$(opensslDir)ssl\s2_meth.c" />
<ClCompile Include="$(opensslDir)ssl\s2_pkt.c" />
<ClCompile Include="$(opensslDir)ssl\s2_srvr.c" />
<ClCompile Include="$(opensslDir)ssl\s23_clnt.c" />
<ClCompile Include="$(opensslDir)ssl\s23_lib.c" />
<ClCompile Include="$(opensslDir)ssl\s23_meth.c" />
<ClCompile Include="$(opensslDir)ssl\s23_pkt.c" />
<ClCompile Include="$(opensslDir)ssl\s23_srvr.c" />
<ClCompile Include="$(opensslDir)ssl\s3_both.c" />
<ClCompile Include="$(opensslDir)ssl\s3_cbc.c" />
<ClCompile Include="$(opensslDir)ssl\s3_clnt.c" />
<ClCompile Include="$(opensslDir)ssl\s3_enc.c" />
<ClCompile Include="$(opensslDir)ssl\s3_lib.c" />
<ClCompile Include="$(opensslDir)ssl\s3_meth.c" />
<ClCompile Include="$(opensslDir)ssl\s3_pkt.c" />
<ClCompile Include="$(opensslDir)ssl\s3_srvr.c" />
<ClCompile Include="$(opensslDir)ssl\ssl_algs.c" />
<ClCompile Include="$(opensslDir)ssl\ssl_asn1.c" />
<ClCompile Include="$(opensslDir)ssl\ssl_cert.c" />
<ClCompile Include="$(opensslDir)ssl\ssl_ciph.c" />
<ClCompile Include="$(opensslDir)ssl\ssl_err.c" />
<ClCompile Include="$(opensslDir)ssl\ssl_err2.c" />
<ClCompile Include="$(opensslDir)ssl\ssl_lib.c" />
<ClCompile Include="$(opensslDir)ssl\ssl_rsa.c" />
<ClCompile Include="$(opensslDir)ssl\ssl_sess.c" />
<!--
<ClCompile Include="$(opensslDir)ssl\ssl_stat.c" />
<ClCompile Include="$(opensslDir)ssl\ssl_txt.c" />
<ClCompile Include="$(opensslDir)ssl\ssl_utst.c" />
-->
<ClCompile Include="$(opensslDir)ssl\t1_clnt.c" />
<ClCompile Include="$(opensslDir)ssl\t1_enc.c" />
<ClCompile Include="$(opensslDir)ssl\t1_lib.c" />
<ClCompile Include="$(opensslDir)ssl\t1_meth.c" />
<ClCompile Include="$(opensslDir)ssl\t1_reneg.c" />
<ClCompile Include="$(opensslDir)ssl\t1_srvr.c" />
<ClCompile Include="$(opensslDir)ssl\tls_srp.c" />
<PrepareSSL Include="prepare_ssl.py" />
<Perl Include="$(Perl)" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="pyproject.props" />
<PropertyGroup>
<IntDir>$(opensslDir)\tmp$(Bitness)dll</IntDir>
<OutDir>$(opensslDir)\out$(Bitness)dll</OutDir>
<MakeFile>ms\ntdll$(Bitness).mak</MakeFile>
<NMakeOptions>LIB_D="$(opensslOutDir.TrimEnd(`\`))" OUT_D=out$(Bitness)dll TMP_D=tmp$(Bitness)dll INC_D=inc$(Bitness) INCO_D=inc$(Bitness)\openssl</NMakeOptions>
<NMakeBuildCommandLine>setlocal
set PATH=%PATH%;$(nasmDir);@(Perl->'%(RootDir)%(Directory)',';')
set VCINSTALLDIR=$(VCInstallDir)
cd /D "$(opensslDir.TrimEnd(`\`))"
if not exist "$(IntDir.TrimEnd('\'))" mkdir "$(IntDir.TrimEnd('\'))"
if not exist "$(OutDir.TrimEnd('\'))" mkdir "$(OutDir.TrimEnd('\'))"
if not exist "$(opensslOutDir.TrimEnd(`\`))" mkdir "$(opensslOutDir.TrimEnd(`\`))"
$(PYTHON) "@(PrepareSSL->'%(FullPath)')" "$(opensslDir.TrimEnd(`\`))" $(ArchName)
nmake -f $(MakeFile) $(NMakeOptions) headers lib
copy /y LICENSE "$(opensslOutDir)\LICENSE"
</NMakeBuildCommandLine>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Target Name="SuppressOriginalBuildinfH" Condition="Exists('$(opensslDir)crypto\buildinf.h')" BeforeTargets="CreateBuildinfH">
<Move SourceFiles="$(opensslDir)crypto\buildinf.h" DestinationFiles="$(opensslDir)crypto\buildinf.h.orig" />
</Target>
<Target Name="_CopyIncludes" AfterTargets="Build">
<ItemGroup>
<Sources Include="$(opensslDir)inc$(Bitness)\**\*.h" />
<Sources Include="$(opensslDir)ms\applink.c" />
</ItemGroup>
<Copy SourceFiles="%(Sources.FullPath)" DestinationFiles="$(opensslOutDir)\include\%(Sources.RecursiveDir)\%(Sources.Filename)%(Sources.Extension)" />
</Target>
<Target Name="SignFiles" AfterTargets="Build" Condition="$(_SignCommand) != ''">
<ItemGroup>
<FilesToSign Include="$(opensslOutDir)\libeay32.dll;$(opensslOutDir)\ssleay32.dll" />
</ItemGroup>
<Exec Command="$(_SignCommand) %(FilesToSign.FullPath)" ContinueOnError="true" />
</Target>
<Target Name="Clean" />
<Target Name="CleanAll">
<Delete Files="$(TargetPath)" />
<Delete Files="$(TargetPath);$(BuildPath)$(tclDLLName)" />
<RemoveDir Directories="$(IntDir)" />
</Target>
<Target Name="LocateNMake">
<PropertyGroup>
<OutputFilename Condition="$(OutputFilename) == ''">$(Temp)\nmake.loc</OutputFilename>
</PropertyGroup>
<ItemGroup>
<_NMakeExe Include="$(VC_ExecutablePath_x86_x86)\nmake.exe" Condition="$(VC_ExecutablePath_x86_x86) != ''" />
</ItemGroup>
<MakeDir Directories="$([System.IO.Path]::GetDirectoryName($(OutputFilename)))" />
<WriteLinesToFile File="$(OutputFilename)" Lines="@(_NMakeExe)" />
</Target>
<Target Name="ResolveAssemblyReferences" />
</Project>
\ No newline at end of file
......@@ -55,7 +55,7 @@
<!-- _ssl will build _socket as well, which may cause conflicts in parallel builds -->
<ExtensionModules Include="_socket" Condition="!$(IncludeSSL) or !$(IncludeExternals)" />
<ExternalModules Include="_ssl;_hashlib" Condition="$(IncludeSSL)" />
<ExternalModules Include="_tkinter;tix" Condition="$(IncludeTkinter)" />
<ExternalModules Include="_tkinter" Condition="$(IncludeTkinter)" />
<ExtensionModules Include="@(ExternalModules->'%(Identity)')" Condition="$(IncludeExternals)" />
<Projects Include="@(ExtensionModules->'%(Identity).vcxproj')" Condition="$(IncludeExtensions)" />
<!-- Test modules -->
......
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.6
VisualStudioVersion = 15.0.26621.2
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}"
ProjectSection(SolutionItems) = preProject
......@@ -83,16 +83,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testembed", "_testembed.vc
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testmultiphase", "_testmultiphase.vcxproj", "{16BFE6F0-22EF-40B5-B831-7E937119EF10}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcl", "tcl.vcxproj", "{B5FD6F1D-129E-4BFF-9340-03606FAC7283}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tix", "tix.vcxproj", "{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tk", "tk.vcxproj", "{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libeay", "libeay.vcxproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssleay", "ssleay.vcxproj", "{10615B24-73BF-4EFA-93AA-236916321317}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyshellext", "pyshellext.vcxproj", "{0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testconsole", "_testconsole.vcxproj", "{B244E787-C445-441C-BDF4-5A4F1A3A1E51}"
......@@ -621,86 +611,6 @@ Global
{16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|Win32.Build.0 = Release|Win32
{16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|x64.ActiveCfg = Release|x64
{16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|x64.Build.0 = Release|x64
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|Win32.ActiveCfg = Debug|Win32
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|Win32.Build.0 = Debug|Win32
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|x64.ActiveCfg = Debug|x64
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|x64.Build.0 = Debug|x64
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|Win32.ActiveCfg = Release|Win32
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|Win32.Build.0 = Release|Win32
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|x64.ActiveCfg = Release|x64
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|x64.Build.0 = Release|x64
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|Win32.ActiveCfg = Release|Win32
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|Win32.Build.0 = Release|Win32
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|x64.ActiveCfg = Release|x64
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|x64.Build.0 = Release|x64
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|Win32.ActiveCfg = Release|Win32
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|Win32.Build.0 = Release|Win32
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|x64.ActiveCfg = Release|x64
{B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|x64.Build.0 = Release|x64
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|Win32.ActiveCfg = Debug|Win32
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|Win32.Build.0 = Debug|Win32
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|x64.ActiveCfg = Debug|x64
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|x64.Build.0 = Debug|x64
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|Win32.ActiveCfg = Release|Win32
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|Win32.Build.0 = Release|Win32
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|x64.ActiveCfg = Release|x64
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|x64.Build.0 = Release|x64
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|Win32.ActiveCfg = Release|Win32
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|Win32.Build.0 = Release|Win32
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|x64.ActiveCfg = Release|x64
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|x64.Build.0 = Release|x64
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|Win32.ActiveCfg = Release|Win32
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|Win32.Build.0 = Release|Win32
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|x64.ActiveCfg = Release|x64
{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|x64.Build.0 = Release|x64
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|Win32.ActiveCfg = Debug|Win32
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|Win32.Build.0 = Debug|Win32
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|x64.ActiveCfg = Debug|x64
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|x64.Build.0 = Debug|x64
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|Win32.ActiveCfg = Release|Win32
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|Win32.Build.0 = Release|Win32
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|x64.ActiveCfg = Release|x64
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|x64.Build.0 = Release|x64
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|Win32.ActiveCfg = Release|Win32
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|Win32.Build.0 = Release|Win32
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|x64.ActiveCfg = Release|x64
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|x64.Build.0 = Release|x64
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|Win32.ActiveCfg = Release|Win32
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|Win32.Build.0 = Release|Win32
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|x64.ActiveCfg = Release|x64
{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|x64.Build.0 = Release|x64
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.ActiveCfg = Debug|Win32
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.Build.0 = Debug|Win32
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.ActiveCfg = Debug|x64
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.Build.0 = Debug|x64
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.ActiveCfg = Release|Win32
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.Build.0 = Release|Win32
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.ActiveCfg = Release|x64
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.Build.0 = Release|x64
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.ActiveCfg = Release|Win32
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.Build.0 = Release|Win32
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.ActiveCfg = Release|x64
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.Build.0 = Release|x64
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.ActiveCfg = Release|Win32
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.Build.0 = Release|Win32
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.ActiveCfg = Release|x64
{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.Build.0 = Release|x64
{10615B24-73BF-4EFA-93AA-236916321317}.Debug|Win32.ActiveCfg = Debug|Win32
{10615B24-73BF-4EFA-93AA-236916321317}.Debug|Win32.Build.0 = Debug|Win32
{10615B24-73BF-4EFA-93AA-236916321317}.Debug|x64.ActiveCfg = Debug|x64
{10615B24-73BF-4EFA-93AA-236916321317}.Debug|x64.Build.0 = Debug|x64
{10615B24-73BF-4EFA-93AA-236916321317}.PGInstrument|Win32.ActiveCfg = Release|Win32
{10615B24-73BF-4EFA-93AA-236916321317}.PGInstrument|Win32.Build.0 = Release|Win32
{10615B24-73BF-4EFA-93AA-236916321317}.PGInstrument|x64.ActiveCfg = Release|x64
{10615B24-73BF-4EFA-93AA-236916321317}.PGInstrument|x64.Build.0 = Release|x64
{10615B24-73BF-4EFA-93AA-236916321317}.PGUpdate|Win32.ActiveCfg = Release|Win32
{10615B24-73BF-4EFA-93AA-236916321317}.PGUpdate|Win32.Build.0 = Release|Win32
{10615B24-73BF-4EFA-93AA-236916321317}.PGUpdate|x64.ActiveCfg = Release|x64
{10615B24-73BF-4EFA-93AA-236916321317}.PGUpdate|x64.Build.0 = Release|x64
{10615B24-73BF-4EFA-93AA-236916321317}.Release|Win32.ActiveCfg = Release|Win32
{10615B24-73BF-4EFA-93AA-236916321317}.Release|Win32.Build.0 = Release|Win32
{10615B24-73BF-4EFA-93AA-236916321317}.Release|x64.ActiveCfg = Release|x64
{10615B24-73BF-4EFA-93AA-236916321317}.Release|x64.Build.0 = Release|x64
{0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Debug|Win32.ActiveCfg = Debug|Win32
{0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Debug|Win32.Build.0 = Debug|Win32
{0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Debug|x64.ActiveCfg = Debug|x64
......@@ -769,4 +679,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5C33FFD3-C8DC-4A54-B842-8BA9846BDFFE}
EndGlobalSection
EndGlobal
@echo off
if not defined HOST_PYTHON (
if "%1" EQU "Debug" (
shift
set HOST_PYTHON=python_d.exe
if not exist python37_d.dll exit 1
) ELSE (
set HOST_PYTHON=python.exe
if not exist python37.dll exit 1
)
)
%HOST_PYTHON% "%~dp0prepare_ssl.py" %1
rem Downloads and build sources for libraries we depend upon
goto Run
:Usage
echo.%~nx0 [flags and arguments]
echo.
echo.Download and build OpenSSL. This should only be performed in order to
echo.update the binaries kept online - in most cases, the files downloaded
echo.by the get_externals.bat script are sufficient for building CPython.
echo.
echo.Available flags:
echo. -h Display this help message
echo.
echo.Available arguments:
echo. --certificate (-c) The signing certificate to use for binaries.
echo. --organization The github organization to obtain sources from.
echo.
exit /b 127
:Run
setlocal
if "%PCBUILD%"=="" (set PCBUILD=%~dp0)
if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%PCBUILD%\..\externals)
set ORG_SETTING=
:CheckOpts
if "%~1"=="-h" shift & goto Usage
if "%~1"=="--certificate" (set SigningCertificate=%~2) && shift && shift & goto CheckOpts
if "%~1"=="-c" (set SigningCertificate=%~2) && shift && shift & goto CheckOpts
if "%~1"=="--organization" (set ORG_SETTING=--organization "%~2") && shift && shift && goto CheckOpts
if "%~1"=="" goto Build
echo Unrecognized option: %1
goto Usage
:Build
call "%PCBUILD%find_msbuild.bat" %MSBUILD%
if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)
call "%PCBUILD%find_python.bat" "%PYTHON%"
if ERRORLEVEL 1 (echo Cannot locate python.exe on PATH or as PYTHON variable & exit /b 3)
call "%PCBUILD%get_externals.bat" --openssl-src %ORG_SETTING%
if "%PERL%" == "" where perl > "%TEMP%\perl.loc" 2> nul && set /P PERL= <"%TEMP%\perl.loc" & del "%TEMP%\perl.loc"
if "%PERL%" == "" (echo Cannot locate perl.exe on PATH or as PERL variable & exit /b 4)
%MSBUILD% "%PCBUILD%openssl.vcxproj" /p:Configuration=Release /p:Platform=Win32
if errorlevel 1 exit /b
%MSBUILD% "%PCBUILD%openssl.vcxproj" /p:Configuration=Release /p:Platform=x64
if errorlevel 1 exit /b
......@@ -21,6 +21,7 @@
from __future__ import print_function
import os
import re
import sys
import subprocess
from shutil import copy
......@@ -64,32 +65,8 @@ def find_working_perl(perls):
print(" Please install ActivePerl and ensure it appears on your path")
def create_asms(makefile, tmp_d):
#create a custom makefile out of the provided one
asm_makefile = os.path.splitext(makefile)[0] + '.asm.mak'
with open(makefile) as fin, open(asm_makefile, 'w') as fout:
for line in fin:
# Keep everything up to the install target (it's convenient)
if line.startswith('install: all'):
break
fout.write(line)
asms = []
for line in fin:
if '.asm' in line and line.strip().endswith('.pl'):
asms.append(line.split(':')[0])
while line.strip():
fout.write(line)
line = next(fin)
fout.write('\n')
fout.write('asms: $(TMP_D) ')
fout.write(' '.join(asms))
fout.write('\n')
os.system('nmake /f {} PERL=perl TMP_D={} asms'.format(asm_makefile, tmp_d))
def copy_includes(makefile, suffix):
dir = 'include'+suffix+'\\openssl'
dir = 'inc'+suffix+'\\openssl'
try:
os.makedirs(dir)
except OSError:
......@@ -114,9 +91,29 @@ def run_configure(configure, do_script):
print(do_script)
os.system(do_script)
def fix_uplink():
# uplink.c tries to find the OPENSSL_Applink function exported from the current
# executable. However, we export it from _ssl[_d].pyd instead. So we update the
# module name here before building.
with open('ms\\uplink.c', 'r', encoding='utf-8') as f1:
code = list(f1)
os.replace('ms\\uplink.c', 'ms\\uplink.c.orig')
already_patched = False
with open('ms\\uplink.c', 'w', encoding='utf-8') as f2:
for line in code:
if not already_patched:
if re.search('MODIFIED FOR CPYTHON _ssl MODULE', line):
already_patched = True
elif re.match(r'^\s+if\s*\(\(h\s*=\s*GetModuleHandle[AW]?\(NULL\)\)\s*==\s*NULL\)', line):
f2.write("/* MODIFIED FOR CPYTHON _ssl MODULE */\n")
f2.write('if ((h = GetModuleHandleW(L"_ssl.pyd")) == NULL) if ((h = GetModuleHandleW(L"_ssl_d.pyd")) == NULL)\n')
already_patched = True
f2.write(line)
if not already_patched:
print("WARN: failed to patch ms\\uplink.c")
def prep(arch):
makefile_template = "ms\\nt{}.mak"
makefile_template = "ms\\ntdll{}.mak"
generated_makefile = makefile_template.format('')
if arch == "x86":
configure = "VC-WIN32"
......@@ -126,13 +123,12 @@ def prep(arch):
configure = "VC-WIN64A"
do_script = "ms\\do_win64a"
suffix = "64"
#os.environ["VSEXTCOMP_USECL"] = "MS_OPTERON"
else:
raise ValueError('Unrecognized platform: %s' % arch)
print("Creating the makefiles...")
sys.stdout.flush()
# run configure, copy includes, create asms
# run configure, copy includes, patch files
run_configure(configure, do_script)
makefile = makefile_template.format(suffix)
try:
......@@ -142,9 +138,8 @@ def prep(arch):
os.rename(generated_makefile, makefile)
copy_includes(makefile, suffix)
print('creating asms...')
create_asms(makefile, 'tmp'+suffix)
print('patching ms\\uplink.c...')
fix_uplink()
def main():
if len(sys.argv) == 1:
......@@ -152,12 +147,17 @@ def main():
"sources must be supplied")
sys.exit(1)
if len(sys.argv) > 2:
if len(sys.argv) == 3 and sys.argv[2] not in ('x86', 'amd64'):
print("Second argument must be x86 or amd64")
sys.exit(1)
if len(sys.argv) > 3:
print("Too many arguments supplied, all we need is the directory",
"containing OpenSSL sources")
"containing OpenSSL sources and optionally the architecture")
sys.exit(1)
ssl_dir = sys.argv[1]
arch = sys.argv[2] if len(sys.argv) >= 3 else None
if not os.path.isdir(ssl_dir):
print(ssl_dir, "is not an existing directory!")
......@@ -191,8 +191,11 @@ def main():
old_cwd = os.getcwd()
try:
os.chdir(ssl_dir)
for arch in ['amd64', 'x86']:
if arch:
prep(arch)
else:
for arch in ['amd64', 'x86']:
prep(arch)
finally:
os.chdir(old_cwd)
......
@echo off
rem Downloads and build sources for libraries we depend upon
goto Run
:Usage
echo.%~nx0 [flags and arguments]
echo.
echo.Download and build Tcl/Tk. This should only be performed in order to
echo.update the binaries kept online - in most cases, the files downloaded
echo.by the get_externals.bat script are sufficient for building CPython.
echo.
echo.Available flags:
echo. -h Display this help message
echo.
echo.Available arguments:
echo. --certificate (-c) The signing certificate to use for binaries.
echo. --organization The github organization to obtain sources from.
echo.
exit /b 127
:Run
setlocal
if "%PCBUILD%"=="" (set PCBUILD=%~dp0)
if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%PCBUILD%\..\externals)
set CERT_SETTING=
set ORG_SETTING=
:CheckOpts
if "%~1"=="-h" shift & goto Usage
if "%~1"=="--certificate" (set SigningCertificate=%~2) && shift && shift & goto CheckOpts
if "%~1"=="-c" (set SigningCertificate=%~2) && shift && shift & goto CheckOpts
if "%~1"=="--organization" (set ORG_SETTING=--organization "%~2") && shift && shift && goto CheckOpts
if "%~1"=="" goto Build
echo Unrecognized option: %1
goto Usage
:Build
call "%PCBUILD%find_msbuild.bat" %MSBUILD%
if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)
rem call "%PCBUILD%find_python.bat" "%PYTHON%"
rem if ERRORLEVEL 1 (echo Cannot locate python.exe on PATH or as PYTHON variable & exit /b 3)
call "%PCBUILD%get_externals.bat" --tkinter-src %ORG_SETTING%
%MSBUILD% "%PCBUILD%tcl.vcxproj" /p:Configuration=Release /p:Platform=Win32
%MSBUILD% "%PCBUILD%tk.vcxproj" /p:Configuration=Release /p:Platform=Win32
%MSBUILD% "%PCBUILD%tix.vcxproj" /p:Configuration=Release /p:Platform=Win32
%MSBUILD% "%PCBUILD%tcl.vcxproj" /p:Configuration=Release /p:Platform=x64
%MSBUILD% "%PCBUILD%tk.vcxproj" /p:Configuration=Release /p:Platform=x64
%MSBUILD% "%PCBUILD%tix.vcxproj" /p:Configuration=Release /p:Platform=x64
......@@ -152,7 +152,7 @@ foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses
<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 /n "$(SigningCertificate)" /fd sha256 /t http://timestamp.verisign.com/scripts/timestamp.dll /d "Python $(PythonVersion)"</_SignCommand>
<_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>
......
......@@ -46,8 +46,8 @@
<bz2Dir>$(ExternalsDir)bzip2-1.0.6\</bz2Dir>
<lzmaDir>$(ExternalsDir)xz-5.2.2\</lzmaDir>
<opensslDir>$(ExternalsDir)openssl-1.0.2k\</opensslDir>
<opensslIncludeDir>$(opensslDir)include32</opensslIncludeDir>
<opensslIncludeDir Condition="'$(ArchName)' == 'amd64'">$(opensslDir)include64</opensslIncludeDir>
<opensslOutDir>$(ExternalsDir)openssl-bin-1.0.2k\$(ArchName)\</opensslOutDir>
<opensslIncludeDir>$(opensslOutDir)include</opensslIncludeDir>
<nasmDir>$(ExternalsDir)\nasm-2.11.06\</nasmDir>
<!-- Suffix for all binaries when building for debug -->
......@@ -72,6 +72,8 @@
-->
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.15063'">10.0.15063.0</DefaultWindowsSDKVersion>
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.15063'">10.0.15063.0</DefaultWindowsSDKVersion>
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.14393'">10.0.14393.0</DefaultWindowsSDKVersion>
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.14393'">10.0.14393.0</DefaultWindowsSDKVersion>
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.10586'">10.0.10586.0</DefaultWindowsSDKVersion>
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.10586'">10.0.10586.0</DefaultWindowsSDKVersion>
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.10240'">10.0.10240.0</DefaultWindowsSDKVersion>
......
......@@ -48,16 +48,6 @@
<TargetPath>$(OutDir)bin\$(tclDLLName)</TargetPath>
</PropertyGroup>
<ItemGroup>
<ExpectedOutputs Include="
$(OutDir)\bin\$(tclDLLName);
$(OutDir)\bin\$(tclShExeName);
$(OutDir)\include\tcl.h;
$(OutDir)\lib\tcl$(TclMajorVersion);
$(OutDir)\lib\tcl$(TclMajorVersion).$(TclMinorVersion);
$(OutDir)\lib\$(tclLibName)" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
......@@ -66,28 +56,17 @@
<TclDirs>INSTALLDIR="$(OutDir.TrimEnd(`\`))" INSTALL_DIR="$(OutDir.TrimEnd(`\`))"</TclDirs>
<DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996"</DebugFlags>
<NMakeBuildCommandLine>setlocal
@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','
')
goto :eof
:build
set VCINSTALLDIR=$(VCInstallDir)
cd /D "$(tclDir)win"
nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) core shell dlls
nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) install-binaries install-libraries
copy /Y ..\license.terms "$(OutDir)\tcllicense.terms"
</NMakeBuildCommandLine>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Target Name="CopyDll" Inputs="$(OutDir)\bin\$(tclDLLName)" Outputs="$(BuildPath)$(tclDLLName)" AfterTargets="Build">
<Copy SourceFiles="$(OutDir)\bin\$(tclDLLName)" DestinationFiles="$(BuildPath)$(tclDLLName)" />
</Target>
<Target Name="Clean" />
<Target Name="CleanAll">
<Delete Files="$(TargetPath);$(BuildPath)$(tclDLLName)" />
<RemoveDir Directories="$(IntDir)" />
</Target>
<Target Name="ResolveAssemblyReferences" />
</Project>
\ No newline at end of file
......@@ -17,9 +17,8 @@
<tclDir>$(ExternalsDir)tcl-core-$(TclMajorVersion).$(TclMinorVersion).$(TclPatchLevel).$(TclRevision)\</tclDir>
<tkDir>$(ExternalsDir)tk-$(TkMajorVersion).$(TkMinorVersion).$(TkPatchLevel).$(TkRevision)\</tkDir>
<tixDir>$(ExternalsDir)tix-$(TixMajorVersion).$(TixMinorVersion).$(TixPatchLevel).$(TixRevision)\</tixDir>
<tcltkDir>$(ExternalsDir)tcltk\</tcltkDir>
<tcltkDir Condition="'$(Platform)' == 'x64'">$(ExternalsDir)tcltk64\</tcltkDir>
<TclDebugExt Condition="'$(Configuration)' == 'Debug'">g</TclDebugExt>
<tcltkDir>$(ExternalsDir)tcltk-$(TclMajorVersion).$(TclMinorVersion).$(TclPatchLevel).$(TclRevision)\$(ArchName)\</tcltkDir>
<!--<TclDebugExt Condition="'$(Configuration)' == 'Debug'">g</TclDebugExt>-->
<tclDLLName>tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).dll</tclDLLName>
<tclLibName>tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib</tclLibName>
<tclShExeName>tclsh$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).exe</tclShExeName>
......
......@@ -37,6 +37,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}</ProjectGuid>
<RootNamespace>tix</RootNamespace>
<SupportSigning>true</SupportSigning>
</PropertyGroup>
<Import Project="python.props" />
......@@ -49,10 +50,6 @@
<TargetPath>$(tixDLLPath)</TargetPath>
</PropertyGroup>
<ItemGroup>
<ExpectedOutputs Include="$(TargetPath)" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
......@@ -61,17 +58,22 @@
<DebugFlags Condition="'$(Configuration)' != 'Debug'">DEBUG=0 NODEBUG=1</DebugFlags>
<CFlags>-c -W3 -nologo -MD -wd4028 -wd4090</CFlags>
<NMakeBuildCommandLine>setlocal
@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','
')
goto :eof
:build
set VCINSTALLDIR=$(VCInstallDir)
cd /D "$(tixDir)win"
nmake /nologo -f makefile.vc MACHINE=$(TclMachine) cflags="$(CFlags)" $(DebugFlags) $(TclShortVersions) $(TixDirs) all install
copy /Y ..\license.terms "$(OutDir)\tixlicense.terms"
</NMakeBuildCommandLine>
<NMakeCleanCommandLine>rmdir /q/s "$(OutDir.TrimEnd(`\`))"</NMakeCleanCommandLine>
</PropertyGroup>
<Target Name="SignFiles" AfterTargets="Build" Condition="$(_SignCommand) != ''">
<ItemGroup>
<FilesToSign Include="$(OutDir)\bin\*.exe" />
<FilesToSign Include="$(OutDir)\bin\*.dll" />
</ItemGroup>
<Exec Command="$(_SignCommand) &quot;%(FilesToSign.FullPath)&quot;" ContinueOnError="true" />
</Target>
<ItemGroup>
<ProjectReference Include="tcl.vcxproj">
<Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>
......
......@@ -49,14 +49,6 @@
<TargetPath>$(OutDir)bin\$(tkDLLName)</TargetPath>
</PropertyGroup>
<ItemGroup>
<ExpectedOutputs Include="
$(OutDir)bin\$(tkDLLName);
$(OutDir)include\tk.h;
$(OutDir)lib\$(tkLibName);
$(OutDir)lib\tk$(TkMajorVersion).$(TkMinorVersion)" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
......@@ -65,14 +57,11 @@
<TkDirs>TCLDIR="$(tclDir.TrimEnd(`\`))" INSTALLDIR="$(OutDir.TrimEnd(`\`))"</TkDirs>
<DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996"</DebugFlags>
<NMakeBuildCommandLine>setlocal
@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','
')
goto :eof
:build
set VCINSTALLDIR=$(VCInstallDir)
cd /D "$(tkDir)win"
nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) all
nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) install-binaries install-libraries
copy /Y ..\license.terms "$(OutDir)\tklicense.terms"
</NMakeBuildCommandLine>
</PropertyGroup>
<ItemGroup>
......@@ -83,15 +72,7 @@ nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Target Name="CopyDll" Inputs="$(OutDir)\bin\$(tkDLLName)" Outputs="$(BuildPath)$(tkDLLName)" AfterTargets="Build">
<Copy SourceFiles="$(OutDir)\bin\$(tkDLLName)" DestinationFiles="$(BuildPath)$(tkDLLName)" />
</Target>
<Target Name="Clean" />
<Target Name="CleanAll">
<Delete Files="$(TargetPath);$(BuildPath)$(tkDLLName)" />
<RemoveDir Directories="$(IntDir)" />
</Target>
<Target Name="ResolveAssemblyReferences" />
</Project>
\ No newline at end of file
......@@ -76,9 +76,6 @@ if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable &
if "%SKIPBUILD%" EQU "1" goto skipdoc
if "%SKIPDOC%" EQU "1" goto skipdoc
if not defined PYTHON where py -q || echo Cannot find py on path and PYTHON is not set. && exit /B 1
if not defined SPHINXBUILD where sphinx-build -q || echo Cannot find sphinx-build on path and SPHINXBUILD is not set. && exit /B 1
call "%D%..\..\doc\make.bat" htmlhelp
if errorlevel 1 goto :eof
:skipdoc
......
......@@ -26,10 +26,10 @@
<LicenseFiles Include="$(PySourcePath)LICENSE;
crtlicense.txt;
$(bz2Dir)LICENSE;
$(opensslDir)LICENSE;
$(tclDir)license.terms;
$(tkDir)license.terms;
$(tixDir)license.terms" />
$(opensslOutDir)LICENSE;
$(tcltkDir)tcllicense.terms;
$(tcltkDir)tklicense.terms;
$(tcltkDir)tixlicense.terms" />
<_LicenseFiles Include="@(LicenseFiles)">
<Content>$([System.IO.File]::ReadAllText(%(FullPath)))</Content>
</_LicenseFiles>
......
......@@ -12,7 +12,7 @@ set DO_FETCH=true
set DO_CLEAN=false
:CheckOpts
if "%~1"=="--python" (set PYTHON_FOR_BUILD=%2) & shift & shift & goto CheckOpts
if "%~1"=="--python" (set PYTHON=%2) & shift & shift & goto CheckOpts
if "%~1"=="--organization" (set ORG=%2) & shift & shift & goto CheckOpts
if "%~1"=="-c" (set DO_CLEAN=true) & shift & goto CheckOpts
if "%~1"=="--clean" (set DO_CLEAN=true) & shift & goto CheckOpts
......@@ -32,23 +32,7 @@ if "%DO_FETCH%"=="false" goto end
if "%ORG%"=="" (set ORG=python)
if "%PYTHON_FOR_BUILD%"=="" (
echo Checking for installed python...
py -3.6 -V >nul 2>&1 && (set PYTHON_FOR_BUILD=py -3.6)
)
if "%PYTHON_FOR_BUILD%"=="" (
if NOT exist "%EXTERNALS_DIR%" mkdir "%EXTERNALS_DIR%"
if NOT exist "%NUGET%" (
echo Downloading nuget...
rem NB: Must use single quotes around NUGET here, NOT double!
rem Otherwise, a space in the path would break things
powershell.exe -Command Invoke-WebRequest %NUGET_URL% -OutFile '%NUGET%'
)
echo Installing Python via nuget...
"%NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%EXTERNALS_DIR%"
rem Quote it here; it's not quoted later because "py -3.6" wouldn't work
set PYTHON_FOR_BUILD="%EXTERNALS_DIR%\pythonx86\tools\python.exe"
)
call "%PCBUILD%\find_python.bat" "%PYTHON%"
echo.Fetching external libraries...
......@@ -59,7 +43,7 @@ for %%e in (%libraries%) do (
echo.%%e already exists, skipping.
) else (
echo.Fetching %%e...
%PYTHON_FOR_BUILD% "%PCBUILD%get_external.py" -e "%EXTERNALS_DIR%" -O %ORG% %%e
%PYTHON% "%PCBUILD%get_external.py" -e "%EXTERNALS_DIR%" -O %ORG% %%e
)
)
......@@ -79,7 +63,7 @@ for %%b in (%binaries%) do (
echo.%%b already exists, skipping.
) else (
echo.Fetching %%b...
%PYTHON_FOR_BUILD% "%PCBUILD%get_external.py" -e "%EXTERNALS_DIR%" -b -O %ORG% %%b
%PYTHON% "%PCBUILD%get_external.py" -e "%EXTERNALS_DIR%" -b -O %ORG% %%b
)
)
......
......@@ -14,6 +14,12 @@
<Component Id="sqlite3.dll" Directory="DLLs" Guid="*">
<File Name="sqlite3.dll" KeyPath="yes" />
</Component>
<Component Id="libeay32.dll" Directory="DLLs" Guid="*">
<File Name="libeay32.dll" KeyPath="yes" />
</Component>
<Component Id="ssleay32.dll" Directory="DLLs" Guid="*">
<File Name="ssleay32.dll" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
......@@ -30,6 +36,12 @@
<Component Id="sqlite3.pdb" Directory="DLLs" Guid="*">
<File Name="sqlite3.pdb" />
</Component>
<Component Id="libeay32.pdb" Directory="DLLs" Guid="*">
<File Name="libeay32.pdb" KeyPath="yes" />
</Component>
<Component Id="ssleay32.pdb" Directory="DLLs" Guid="*">
<File Name="ssleay32.pdb" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
......
......@@ -20,14 +20,6 @@
<WxlTemplate Include="*.wxl_template" />
</ItemGroup>
<ItemGroup>
<InstallFiles Include="$(tcltkDir)bin\*.dll" Exclude="$(tcltkDir)bin\*g.dll">
<SourceBase>$(tcltkDir)</SourceBase>
<Source>!(bindpath.tcltk)</Source>
<TargetBase>$(tcltkDir)bin</TargetBase>
<Target_>DLLs\</Target_>
<Group>tcltk_dlls</Group>
</InstallFiles>
<InstallFiles Include="$(tcltkDir)lib\**\*">
<SourceBase>$(tcltkDir)</SourceBase>
<Source>!(bindpath.tcltk)</Source>
......
......@@ -8,7 +8,6 @@
<Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
<ComponentGroupRef Id="tkinter_extension_d" />
<ComponentGroupRef Id="tcltk_dlls_d" />
</Feature>
</Product>
</Wix>
......@@ -5,9 +5,17 @@
<Component Id="_tkinter.pyd" Directory="DLLs" Guid="*">
<File Name="_tkinter.pyd" KeyPath="yes" />
</Component>
</ComponentGroup>
<ComponentGroup Id="tcltk_dlls">
<Component Id="_tkinter.lib" Directory="libs" Guid="*">
<File Name="_tkinter.lib" KeyPath="yes" />
</Component>
<Component Id="tcl86t.dll" Directory="DLLs" Guid="*">
<File Name="tcl86t.dll" KeyPath="yes" />
</Component>
<Component Id="tk86t.dll" Directory="DLLs" Guid="*">
<File Name="tk86t.dll" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment