]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Adds version info to all signed binaries on Windows.
authorSteve Dower <steve.dower@microsoft.com>
Wed, 6 Apr 2016 19:35:24 +0000 (12:35 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Wed, 6 Apr 2016 19:35:24 +0000 (12:35 -0700)
34 files changed:
PC/bdist_wininst/bdist_wininst.vcxproj
PC/python_ver_rc.h
PC/sqlite3.rc [new file with mode: 0644]
PCbuild/_bz2.vcxproj
PCbuild/_ctypes.vcxproj
PCbuild/_ctypes_test.vcxproj
PCbuild/_decimal.vcxproj
PCbuild/_elementtree.vcxproj
PCbuild/_hashlib.vcxproj
PCbuild/_lzma.vcxproj
PCbuild/_msi.vcxproj
PCbuild/_multiprocessing.vcxproj
PCbuild/_overlapped.vcxproj
PCbuild/_socket.vcxproj
PCbuild/_sqlite3.vcxproj
PCbuild/_ssl.vcxproj
PCbuild/_testbuffer.vcxproj
PCbuild/_testcapi.vcxproj
PCbuild/_testembed.vcxproj
PCbuild/_testimportmultiple.vcxproj
PCbuild/_testmultiphase.vcxproj
PCbuild/_tkinter.vcxproj
PCbuild/pyexpat.vcxproj
PCbuild/pylauncher.vcxproj
PCbuild/pyproject.props
PCbuild/python.vcxproj
PCbuild/python3dll.vcxproj
PCbuild/pythoncore.vcxproj
PCbuild/pythonw.vcxproj
PCbuild/pywlauncher.vcxproj
PCbuild/select.vcxproj
PCbuild/sqlite3.vcxproj
PCbuild/unicodedata.vcxproj
PCbuild/winsound.vcxproj

index 7971dc760ed75eabc1bc069f5ce029e322dc5663..4dc5009b58e6ac539cda6e5a1e218bacd3b1acc3 100644 (file)
@@ -37,7 +37,6 @@
   <PropertyGroup Label="Globals">
     <ProjectGuid>{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}</ProjectGuid>
     <RootNamespace>wininst</RootNamespace>
-    <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
     <SupportPGO>false</SupportPGO>
   </PropertyGroup>
   <Import Project="..\..\PCBuild\python.props" />
index 8ad18ef78fa2fb63407440055b253beaf64c6a75..8ce03fe18b1c3b9443021fcfa7271d06c39eb965 100644 (file)
 #include "modsupport.h"
 #include "patchlevel.h"
 #ifdef _DEBUG
-#   include "pythonnt_rc_d.h"
+#   include <pythonnt_rc_d.h>
 #   define PYTHON_DEBUG_EXT "_d"
 #else
-#   include "pythonnt_rc.h"
+#   include <pythonnt_rc.h>
 #   define PYTHON_DEBUG_EXT
 #endif
 
diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc
new file mode 100644 (file)
index 0000000..84bd87d
--- /dev/null
@@ -0,0 +1,49 @@
+// Resource script for Sqlite DLL.
+
+#include <winver.h>
+
+// Include the manifest file that indicates we support all
+// current versions of Windows.
+#include <winuser.h>
+2 RT_MANIFEST "python.manifest"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+#define _S(x) #x
+#define S(x) _S(x)
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION SQLITE_MAJOR_VERSION, SQLITE_MINOR_VERSION, SQLITE_MICRO_VERSION, SQLITE_PATCH_VERSION
+ PRODUCTVERSION SQLITE_MAJOR_VERSION, SQLITE_MINOR_VERSION, SQLITE_MICRO_VERSION, SQLITE_PATCH_VERSION
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "000004b0"
+        BEGIN
+            VALUE "CompanyName", "SQLite3\0"
+            VALUE "FileDescription", "SQLite3\0"
+            VALUE "FileVersion", S(SQLITE_VERSION) "\0"
+            VALUE "InternalName", "SQLite3 DLL\0"
+            VALUE "LegalCopyright", "Unspecified\0"
+            VALUE "OriginalFilename", "sqlite3.dll\0"
+            VALUE "ProductName", "SQLite3\0"
+            VALUE "ProductVersion", S(SQLITE_VERSION) "\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x0, 1200
+    END
+END
index 64c3dcde14fa8ce7dd795eb600722d788e5d57d2..9efb0d9a792d6c543d1f166e94de851c9f1c4daa 100644 (file)
@@ -83,6 +83,9 @@
     <ClInclude Include="$(bz2Dir)\bzlib.h" />
     <ClInclude Include="$(bz2Dir)\bzlib_private.h" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 68b8e2971d1b65bad727b251b1b51c59fc60e57c..70bea457d2a9fe5f2b1056d76e57f2a34a1ae232 100644 (file)
@@ -96,6 +96,9 @@
       <Outputs>$(IntDir)win64.obj;%(Outputs)</Outputs>
     </CustomBuild>
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index c1260b53f3ecbcfdb7a8c58b38991360e3c059ee..b62407fadf062809ec4b600ef1823561d5501c16 100644 (file)
@@ -66,6 +66,9 @@
   <ItemGroup>
     <ClCompile Include="..\Modules\_ctypes\_ctypes_test.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 943bfb0990345caef975dff8cf95aa20960295ae..9c9c19abbe334a90f322dac505261edcf08bb2a7 100644 (file)
       <Outputs>$(IntDir)vcdiv64.obj;%(Outputs)</Outputs>
     </CustomBuild>
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 414bd8bebb8216f1de97d5814a7f60fddfdc7754..725b5a967bebc962bd602847c211dd8af0c64afe 100644 (file)
@@ -91,6 +91,9 @@
     <ClCompile Include="..\Modules\expat\xmlrole.c" />
     <ClCompile Include="..\Modules\expat\xmltok.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 5616a1e4cabdee51ec0b002e00484d28ee831715..b1300cb8c9d55e89301c0b6b0654e3f13985dc19 100644 (file)
@@ -70,6 +70,9 @@
   <ItemGroup>
     <ClCompile Include="..\Modules\_hashopenssl.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index af50494ebde69fa8fa9e619fab09f0230436d805..1f0696da82ecd5537c470e809f754a57e358fbc3 100644 (file)
@@ -73,6 +73,9 @@
   <ItemGroup>
     <ClCompile Include="..\Modules\_lzmamodule.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index f5ba7bff7627493cfa8dcbe5dd4b2144d0ee2371..3895d450f35d0ebeeb487fac5dada084a996d8f9 100644 (file)
@@ -68,6 +68,9 @@
   <ItemGroup>
     <ClCompile Include="..\PC\_msi.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 1eb92b67dc241d603d3140a0cc9884656ad3a981..bb2bb4114c985b002ad3677e4a354745e0ad5acb 100644 (file)
@@ -72,6 +72,9 @@
     <ClCompile Include="..\Modules\_multiprocessing\multiprocessing.c" />
     <ClCompile Include="..\Modules\_multiprocessing\semaphore.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 55301ea9dc2958b99e08da4951400580323adcef..8cf8a8677bb378e286ab8299aefcb1fff8583a09 100644 (file)
@@ -68,6 +68,9 @@
   <ItemGroup>
     <ClCompile Include="..\Modules\overlapped.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 03b6f7558eb4304116f730b22194e4ddb65064b1..d5c4d1b5b6f5d99254846fa724c83101ce7851b5 100644 (file)
@@ -71,6 +71,9 @@
   <ItemGroup>
     <ClCompile Include="..\Modules\socketmodule.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 5e889d0de00f4494bac31cbdae1ecfa9313a635a..5456bb5b238513ab61023893d8f85a2040b50cee 100644 (file)
@@ -90,6 +90,9 @@
     <ClCompile Include="..\Modules\_sqlite\statement.c" />
     <ClCompile Include="..\Modules\_sqlite\util.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 73c95713a0cb9671e97bb0590c885afe4c95fcbc..d75ebd656a7f08e30d8dd7991a24c339115e35b7 100644 (file)
@@ -70,6 +70,9 @@
   <ItemGroup>
     <ClCompile Include="..\Modules\_ssl.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 8cbf1251c365eb1c893bf69b982c7a71063819f3..1f45b298102641185b265305dcf6f89810a0030a 100644 (file)
@@ -68,6 +68,9 @@
   <ItemGroup>
     <ClCompile Include="..\Modules\_testbuffer.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index dbf44e6e94146219bb5968df5932c1f346a7112a..365b07c5c5c8e52a9ce6bc3080f693960b51ac7b 100644 (file)
@@ -68,6 +68,9 @@
   <ItemGroup>
     <ClCompile Include="..\Modules\_testcapimodule.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index f0e4d9f87465aef57c4bf16645fc7b95627092f2..14a926e9456d9f27cfc16924327230d06212b105 100644 (file)
@@ -65,6 +65,9 @@
   <ItemGroup>
     <ClCompile Include="..\Programs\_testembed.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index cec042c202c65065e7cbfabae77fbc6caaffbe5d..37c1a64ac8ccbedd37c19f9caee5d56a1716746d 100644 (file)
@@ -68,6 +68,9 @@
   <ItemGroup>
     <ClCompile Include="..\Modules\_testimportmultiple.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 647b38029de95faf1cd3cbcd6d9c14529906619f..106927c67b94372e091785ca145fce0ef2e84781 100644 (file)
@@ -68,6 +68,9 @@
   <ItemGroup>
     <ClCompile Include="..\Modules\_testmultiphase.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index f3185eb28b8cb511a4c11c165573e7c70280d4fd..67931067d3bcf73b0171689b84f1c189768f22d0 100644 (file)
@@ -73,6 +73,9 @@
     <ClCompile Include="..\Modules\_tkinter.c" />
     <ClCompile Include="..\Modules\tkappinit.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 4e7621ec926b3ff4397b86c26bd9452214cf45dc..99c7286b2bdfde1e1862c87e84a52d36ba727910 100644 (file)
@@ -72,6 +72,9 @@
     <ClCompile Include="..\Modules\expat\xmlrole.c" />
     <ClCompile Include="..\Modules\expat\xmltok.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 6a2178583e1e2eead361ef97567f99c06bbb428e..2d4b5f6445c014c5151ad84bc073f14f7254e996 100644 (file)
@@ -38,7 +38,6 @@
     <ProjectGuid>{7B2727B5-5A3F-40EE-A866-43A13CD31446}</ProjectGuid>
     <RootNamespace>pylauncher</RootNamespace>
     <TargetName>py</TargetName>
-    <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
     <SupportPGO>false</SupportPGO>
   </PropertyGroup>
   <Import Project="python.props" />
index 7033cc3b7dfcb1e0ac8e9db97c03a5bbc7709684..c56292ab5eea4f81e9549eff27e44cbbfd099c14 100644 (file)
@@ -75,7 +75,7 @@
       <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate'">true</LinkTimeCodeGeneration>
     </Lib>
     <ResourceCompile>
-      <AdditionalIncludeDirectories>$(PySourcePath)PC;$(PySourcePath)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(PySourcePath)PC;$(PySourcePath)Include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <Culture>0x0409</Culture>
     </ResourceCompile>
   </ItemDefinitionGroup>
 
   <Target Name="GeneratePythonNtRcH"
-          BeforeTargets="$(MakeVersionInfoBeforeTarget)"
+          BeforeTargets="ClCompile"
           Inputs="$(PySourcePath)Include\patchlevel.h"
-          Outputs="$(PySourcePath)PC\pythonnt_rc$(PyDebugExt).h">
-    <WriteLinesToFile File="$(PySourcePath)PC\pythonnt_rc$(PyDebugExt).h" Overwrite="true" Encoding="ascii"
-                      Lines='/* This file created by python.props /t:GeneratePythonNtRcH */
+          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 "$(PyDllName).dll"
+#define PYTHON_DLL_NAME "$(TargetName)$(TargetExt)"
 ' />
     <ItemGroup>
-        <FileWrites Include="$(PySourcePath)PC\pythonnt_rc$(PyDebugExt).h" />
+        <FileWrites Include="$(IntDir)pythonnt_rc.h" />
     </ItemGroup>
   </Target>
 
index 0ae4882ad16aca9bc5de0a3e6bf11016db3c4ad9..f9580be9bfaf571fdda3d92fd85b4c331df33c0a 100644 (file)
@@ -36,7 +36,6 @@
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}</ProjectGuid>
-    <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
   </PropertyGroup>
   <Import Project="python.props" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
index 18ff4a83e912f23239b117621a0d373e8aa4b2c1..cbb618f283c5c937941ccd0744785000338aacf1 100644 (file)
@@ -39,7 +39,6 @@
     <RootNamespace>python3dll</RootNamespace>
     <Keyword>Win32Proj</Keyword>
     <TargetName>python3</TargetName>
-    <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
     <SupportPGO>false</SupportPGO>
   </PropertyGroup>
   <Import Project="python.props" />
index 9cbe8b9384c08046aa4f7a03cc0354b25a73c87b..3a1b5ba8bee4d9912226b68900019b84f0459a71 100644 (file)
@@ -48,7 +48,6 @@
   <ImportGroup Label="ExtensionSettings">
   </ImportGroup>
   <PropertyGroup>
-    <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
     <KillPython>true</KillPython>
   </PropertyGroup>
   <ImportGroup Label="PropertySheets">
index b0a209af42f5e4c9dd3e4051d891d4eb6a0de421..caed1e8dcfaa42b2c7bd6782932fd44ef0e44296 100644 (file)
@@ -36,7 +36,6 @@
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{F4229CC3-873C-49AE-9729-DD308ED4CD4A}</ProjectGuid>
-    <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
     <SupportPGO>false</SupportPGO>
   </PropertyGroup>
   <Import Project="python.props" />
index 882f1c4d24bddf073fa4b02469737d0f35038946..eabf883a4a95967c1dfc166d7d4e72f05f09eb86 100644 (file)
@@ -38,7 +38,6 @@
     <ProjectGuid>{1D4B18D3-7C12-4ECB-9179-8531FF876CE6}</ProjectGuid>
     <RootNamespace>pywlauncher</RootNamespace>
     <TargetName>pyw</TargetName>
-    <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
     <SupportPGO>false</SupportPGO>
   </PropertyGroup>
   <Import Project="python.props" />
index 3cd0694baa5f3062611dc58d948c70a98ea4718b..d6112ab6fe3f06a53aba379fb0c00dd697443806 100644 (file)
@@ -67,6 +67,9 @@
   <ItemGroup>
     <ClCompile Include="..\Modules\selectmodule.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index b6246fa78c546af8136581d65bac6c347fe10b48..c841c5a8eab84a01b2509ed1e1a9df6f4d02ed72 100644 (file)
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <_SqliteVersion>$([System.Text.RegularExpressions.Regex]::Match(`$(sqlite3Dir)`, `((\d+)\.(\d+)\.(\d+)\.(\d+))\\?$`).Groups)</_SqliteVersion>
+    <SqliteVersion>$(_SqliteVersion.Split(`;`)[1])</SqliteVersion>
+    <SqliteMajorVersion>$(_SqliteVersion.Split(`;`)[2])</SqliteMajorVersion>
+    <SqliteMinorVersion>$(_SqliteVersion.Split(`;`)[3])</SqliteMinorVersion>
+    <SqliteMicroVersion>$(_SqliteVersion.Split(`;`)[4])</SqliteMicroVersion>
+    <SqlitePatchVersion>$(_SqliteVersion.Split(`;`)[5])</SqlitePatchVersion>
   </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
@@ -63,6 +69,9 @@
       <PreprocessorDefinitions>SQLITE_API=__declspec(dllexport);%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <WarningLevel>Level1</WarningLevel>
     </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>SQLITE_VERSION=$(SqliteVersion);SQLITE_MAJOR_VERSION=$(SqliteMajorVersion);SQLITE_MINOR_VERSION=$(SqliteMinorVersion);SQLITE_MICRO_VERSION=$(SqliteMicroVersion);SQLITE_PATCH_VERSION=$(SqlitePatchVersion);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
     <ClInclude Include="$(sqlite3Dir)\sqlite3.h" />
@@ -71,6 +80,9 @@
   <ItemGroup>
     <ClCompile Include="$(sqlite3Dir)\sqlite3.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\sqlite3.rc" />
+  </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
index a3071fbf8eea29429425d6a5eea771d6146f8663..317c1a8a56d4243ed9b2f64e39eb098c272ba724 100644 (file)
@@ -71,6 +71,9 @@
   <ItemGroup>
     <ClCompile Include="..\Modules\unicodedata.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
index 540235af22e2914513b52eca6ac85a22bcfa3427..12913efdeff1dae42df1e23bcb04fbdfe9f5b483 100644 (file)
@@ -67,6 +67,9 @@
   <ItemGroup>
     <ClCompile Include="..\PC\winsound.c" />
   </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
       <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>