1<?xml version="1.0" encoding="utf-8"?> 2<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 <ItemGroup Label="ProjectConfigurations"> 4 <ProjectConfiguration Include="Debug|Win32"> 5 <Configuration>Debug</Configuration> 6 <Platform>Win32</Platform> 7 </ProjectConfiguration> 8 <ProjectConfiguration Include="Release|Win32"> 9 <Configuration>Release</Configuration> 10 <Platform>Win32</Platform> 11 </ProjectConfiguration> 12 <ProjectConfiguration Include="PGInstrument|Win32"> 13 <Configuration>PGInstrument</Configuration> 14 <Platform>Win32</Platform> 15 </ProjectConfiguration> 16 <ProjectConfiguration Include="PGInstrument|x64"> 17 <Configuration>PGInstrument</Configuration> 18 <Platform>x64</Platform> 19 </ProjectConfiguration> 20 <ProjectConfiguration Include="PGUpdate|Win32"> 21 <Configuration>PGUpdate</Configuration> 22 <Platform>Win32</Platform> 23 </ProjectConfiguration> 24 <ProjectConfiguration Include="PGUpdate|x64"> 25 <Configuration>PGUpdate</Configuration> 26 <Platform>x64</Platform> 27 </ProjectConfiguration> 28 <ProjectConfiguration Include="Debug|x64"> 29 <Configuration>Debug</Configuration> 30 <Platform>x64</Platform> 31 </ProjectConfiguration> 32 <ProjectConfiguration Include="Release|x64"> 33 <Configuration>Release</Configuration> 34 <Platform>x64</Platform> 35 </ProjectConfiguration> 36 </ItemGroup> 37 <PropertyGroup Label="Globals"> 38 <ProjectGuid>{B5FD6F1D-129E-4BFF-9340-03606FAC7283}</ProjectGuid> 39 </PropertyGroup> 40 41 <Import Project="python.props" /> 42 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> 43 44 <PropertyGroup Label="Configuration"> 45 <ConfigurationType>Makefile</ConfigurationType> 46 <Bitness>32</Bitness> 47 <Bitness Condition="$(Platform) == 'x64'">64</Bitness> 48 <ArchName>x86</ArchName> 49 <ArchName Condition="$(Platform) == 'x64'">amd64</ArchName> 50 <OpenSSLPlatform>VC-WIN32</OpenSSLPlatform> 51 <OpenSSLPlatform Condition="$(Platform) == 'x64'">VC-WIN64A</OpenSSLPlatform> 52 <SupportSigning>true</SupportSigning> 53 </PropertyGroup> 54 55 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> 56 <Import Project="pyproject.props" /> 57 58 <PropertyGroup> 59 <IntDir>$(opensslDir)\tmp$(Bitness)dll</IntDir> 60 <OutDir>$(opensslOutDir)</OutDir> 61 <NMakeBuildCommandLine>setlocal 62set VCINSTALLDIR=$(VCInstallDir) 63if not exist "$(IntDir.TrimEnd('\'))" mkdir "$(IntDir.TrimEnd('\'))" 64cd /D "$(IntDir.TrimEnd('\'))" 65$(Perl) "$(opensslDir)\configure" $(OpenSSLPlatform) no-asm 66nmake 67</NMakeBuildCommandLine> 68 </PropertyGroup> 69 70 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> 71 72 <Target Name="_PatchUplink" BeforeTargets="Build"> 73 <PropertyGroup> 74 <Uplink>$(opensslDir)\ms\uplink.c</Uplink> 75 <BeforePatch>((h = GetModuleHandle(NULL)) == NULL)</BeforePatch> 76 <AfterPatch>((h = GetModuleHandleA("_ssl.pyd")) == NULL) if ((h = GetModuleHandleA("_ssl_d.pyd")) == NULL) if ((h = GetModuleHandle(NULL)) == NULL /*patched*/)</AfterPatch> 77 </PropertyGroup> 78 <Error Text="Cannot find $(Uplink)" Condition="!Exists($(Uplink))" /> 79 <PropertyGroup> 80 <_Original>$([System.IO.File]::ReadAllText($(Uplink)))</_Original> 81 <_Patched>$(_Original.Replace($(BeforePatch), $(AfterPatch)))</_Patched> 82 <IsPatched>false</IsPatched> 83 <IsPatched Condition="$(_Patched) == $(_Original)">true</IsPatched> 84 </PropertyGroup> 85 <Message Text="$(Uplink) is already patched" Importance="normal" Condition="$(IsPatched)" /> 86 <Message Text="Patching $(Uplink)" Importance="high" Condition="!$(IsPatched)" /> 87 <WriteLinesToFile File="$(Uplink)" 88 Lines="$(_Patched)" 89 Overwrite="true" 90 Encoding="ASCII" 91 Condition="!$(IsPatched)" /> 92 </Target> 93 94 <Target Name="_CopyToOutput" AfterTargets="Build"> 95 <ItemGroup> 96 <_Built Include="$(opensslDir)\LICENSE" /> 97 <_Built Include="$(IntDir)\libcrypto.lib;$(IntDir)\libcrypto-*.dll;$(IntDir)\libcrypto-*.pdb" /> 98 <_Built Include="$(IntDir)\libssl.lib;$(IntDir)\libssl-*.dll;$(IntDir)\libssl-*.pdb" /> 99 <_AppLink Include="$(opensslDir)\ms\applink.c" /> 100 <_Include Include="$(opensslDir)\Include\openssl\*.h" /> 101 <_Include Include="$(IntDir)\include\openssl\*.h" /> 102 </ItemGroup> 103 <MakeDir Directories="$(opensslOutDir)\include\openssl" /> 104 <Copy SourceFiles="@(_Built)" DestinationFolder="$(opensslOutDir)" /> 105 <Copy SourceFiles="@(_AppLink)" DestinationFolder="$(opensslOutDir)\include" /> 106 <Copy SourceFiles="@(_Include)" DestinationFolder="$(opensslOutDir)\include\openssl" /> 107 </Target> 108 109 <Target Name="SignFiles" AfterTargets="Build" Condition="$(_SignCommand) != ''"> 110 <ItemGroup> 111 <FilesToSign Include="$(opensslOutDir)\lib*.dll" /> 112 </ItemGroup> 113 <Exec Command="$(_SignCommand) %(FilesToSign.FullPath)" ContinueOnError="true" /> 114 </Target> 115 116 <Target Name="Clean" /> 117 <Target Name="CleanAll"> 118 <Delete Files="$(TargetPath);$(BuildPath)$(tclDLLName)" /> 119 <RemoveDir Directories="$(IntDir)" /> 120 </Target> 121 122 <Target Name="LocateNMake"> 123 <PropertyGroup> 124 <OutputFilename Condition="$(OutputFilename) == ''">$(Temp)\nmake.loc</OutputFilename> 125 </PropertyGroup> 126 <ItemGroup> 127 <_NMakeExe Include="$(VC_ExecutablePath_x86_x86)\nmake.exe" Condition="$(VC_ExecutablePath_x86_x86) != ''" /> 128 </ItemGroup> 129 <MakeDir Directories="$([System.IO.Path]::GetDirectoryName($(OutputFilename)))" /> 130 <WriteLinesToFile File="$(OutputFilename)" Lines="@(_NMakeExe)" /> 131 </Target> 132 133 <Target Name="ResolveAssemblyReferences" /> 134</Project>