From b0660582cc9260022053c83dcfddd47891700147 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 6 Apr 2016 12:35:24 -0700 Subject: Adds version info to all signed binaries on Windows. --- PC/bdist_wininst/bdist_wininst.vcxproj | 1 - PC/python_ver_rc.h | 4 +-- PC/sqlite3.rc | 49 ++++++++++++++++++++++++++++++++++ PCbuild/_bz2.vcxproj | 3 +++ PCbuild/_ctypes.vcxproj | 3 +++ PCbuild/_ctypes_test.vcxproj | 3 +++ PCbuild/_decimal.vcxproj | 3 +++ PCbuild/_elementtree.vcxproj | 3 +++ PCbuild/_hashlib.vcxproj | 3 +++ PCbuild/_lzma.vcxproj | 3 +++ PCbuild/_msi.vcxproj | 3 +++ PCbuild/_multiprocessing.vcxproj | 3 +++ PCbuild/_overlapped.vcxproj | 3 +++ PCbuild/_socket.vcxproj | 3 +++ PCbuild/_sqlite3.vcxproj | 3 +++ PCbuild/_ssl.vcxproj | 3 +++ PCbuild/_testbuffer.vcxproj | 3 +++ PCbuild/_testcapi.vcxproj | 3 +++ PCbuild/_testembed.vcxproj | 3 +++ PCbuild/_testimportmultiple.vcxproj | 3 +++ PCbuild/_testmultiphase.vcxproj | 3 +++ PCbuild/_tkinter.vcxproj | 3 +++ PCbuild/pyexpat.vcxproj | 3 +++ PCbuild/pylauncher.vcxproj | 1 - PCbuild/pyproject.props | 14 +++++----- PCbuild/python.vcxproj | 1 - PCbuild/python3dll.vcxproj | 1 - PCbuild/pythoncore.vcxproj | 1 - PCbuild/pythonw.vcxproj | 1 - PCbuild/pywlauncher.vcxproj | 1 - PCbuild/select.vcxproj | 3 +++ PCbuild/sqlite3.vcxproj | 12 +++++++++ PCbuild/unicodedata.vcxproj | 3 +++ PCbuild/winsound.vcxproj | 3 +++ 34 files changed, 139 insertions(+), 16 deletions(-) create mode 100644 PC/sqlite3.rc diff --git a/PC/bdist_wininst/bdist_wininst.vcxproj b/PC/bdist_wininst/bdist_wininst.vcxproj index 7971dc7..4dc5009 100644 --- a/PC/bdist_wininst/bdist_wininst.vcxproj +++ b/PC/bdist_wininst/bdist_wininst.vcxproj @@ -37,7 +37,6 @@ {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C} wininst - ClCompile false diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h index 8ad18ef..8ce03fe 100644 --- a/PC/python_ver_rc.h +++ b/PC/python_ver_rc.h @@ -10,10 +10,10 @@ #include "modsupport.h" #include "patchlevel.h" #ifdef _DEBUG -# include "pythonnt_rc_d.h" +# include # define PYTHON_DEBUG_EXT "_d" #else -# include "pythonnt_rc.h" +# include # define PYTHON_DEBUG_EXT #endif diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc new file mode 100644 index 0000000..84bd87d --- /dev/null +++ b/PC/sqlite3.rc @@ -0,0 +1,49 @@ +// Resource script for Sqlite DLL. + +#include + +// Include the manifest file that indicates we support all +// current versions of Windows. +#include +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 diff --git a/PCbuild/_bz2.vcxproj b/PCbuild/_bz2.vcxproj index 64c3dcd..9efb0d9 100644 --- a/PCbuild/_bz2.vcxproj +++ b/PCbuild/_bz2.vcxproj @@ -84,6 +84,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_ctypes.vcxproj b/PCbuild/_ctypes.vcxproj index 68b8e29..70bea45 100644 --- a/PCbuild/_ctypes.vcxproj +++ b/PCbuild/_ctypes.vcxproj @@ -97,6 +97,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} diff --git a/PCbuild/_ctypes_test.vcxproj b/PCbuild/_ctypes_test.vcxproj index c1260b5..b62407f 100644 --- a/PCbuild/_ctypes_test.vcxproj +++ b/PCbuild/_ctypes_test.vcxproj @@ -67,6 +67,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} diff --git a/PCbuild/_decimal.vcxproj b/PCbuild/_decimal.vcxproj index 943bfb0..9c9c19a 100644 --- a/PCbuild/_decimal.vcxproj +++ b/PCbuild/_decimal.vcxproj @@ -114,6 +114,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} diff --git a/PCbuild/_elementtree.vcxproj b/PCbuild/_elementtree.vcxproj index 414bd8b..725b5a9 100644 --- a/PCbuild/_elementtree.vcxproj +++ b/PCbuild/_elementtree.vcxproj @@ -92,6 +92,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_hashlib.vcxproj b/PCbuild/_hashlib.vcxproj index 5616a1e..b1300cb 100644 --- a/PCbuild/_hashlib.vcxproj +++ b/PCbuild/_hashlib.vcxproj @@ -71,6 +71,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_lzma.vcxproj b/PCbuild/_lzma.vcxproj index af50494..1f0696da 100644 --- a/PCbuild/_lzma.vcxproj +++ b/PCbuild/_lzma.vcxproj @@ -74,6 +74,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_msi.vcxproj b/PCbuild/_msi.vcxproj index f5ba7bf..3895d45 100644 --- a/PCbuild/_msi.vcxproj +++ b/PCbuild/_msi.vcxproj @@ -69,6 +69,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_multiprocessing.vcxproj b/PCbuild/_multiprocessing.vcxproj index 1eb92b6..bb2bb41 100644 --- a/PCbuild/_multiprocessing.vcxproj +++ b/PCbuild/_multiprocessing.vcxproj @@ -73,6 +73,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_overlapped.vcxproj b/PCbuild/_overlapped.vcxproj index 55301ea..8cf8a86 100644 --- a/PCbuild/_overlapped.vcxproj +++ b/PCbuild/_overlapped.vcxproj @@ -69,6 +69,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_socket.vcxproj b/PCbuild/_socket.vcxproj index 03b6f75..d5c4d1b 100644 --- a/PCbuild/_socket.vcxproj +++ b/PCbuild/_socket.vcxproj @@ -72,6 +72,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj index 5e889d0..5456bb5 100644 --- a/PCbuild/_sqlite3.vcxproj +++ b/PCbuild/_sqlite3.vcxproj @@ -91,6 +91,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj index 73c9571..d75ebd6 100644 --- a/PCbuild/_ssl.vcxproj +++ b/PCbuild/_ssl.vcxproj @@ -71,6 +71,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_testbuffer.vcxproj b/PCbuild/_testbuffer.vcxproj index 8cbf125..1f45b29 100644 --- a/PCbuild/_testbuffer.vcxproj +++ b/PCbuild/_testbuffer.vcxproj @@ -69,6 +69,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} diff --git a/PCbuild/_testcapi.vcxproj b/PCbuild/_testcapi.vcxproj index dbf44e6..365b07c 100644 --- a/PCbuild/_testcapi.vcxproj +++ b/PCbuild/_testcapi.vcxproj @@ -69,6 +69,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_testembed.vcxproj b/PCbuild/_testembed.vcxproj index f0e4d9f..14a926e 100644 --- a/PCbuild/_testembed.vcxproj +++ b/PCbuild/_testembed.vcxproj @@ -66,6 +66,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_testimportmultiple.vcxproj b/PCbuild/_testimportmultiple.vcxproj index cec042c..37c1a64 100644 --- a/PCbuild/_testimportmultiple.vcxproj +++ b/PCbuild/_testimportmultiple.vcxproj @@ -69,6 +69,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_testmultiphase.vcxproj b/PCbuild/_testmultiphase.vcxproj index 647b380..106927c 100644 --- a/PCbuild/_testmultiphase.vcxproj +++ b/PCbuild/_testmultiphase.vcxproj @@ -69,6 +69,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj index f3185eb..6793106 100644 --- a/PCbuild/_tkinter.vcxproj +++ b/PCbuild/_tkinter.vcxproj @@ -74,6 +74,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/pyexpat.vcxproj b/PCbuild/pyexpat.vcxproj index 4e7621ec..99c7286 100644 --- a/PCbuild/pyexpat.vcxproj +++ b/PCbuild/pyexpat.vcxproj @@ -73,6 +73,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/pylauncher.vcxproj b/PCbuild/pylauncher.vcxproj index 6a21785..2d4b5f6 100644 --- a/PCbuild/pylauncher.vcxproj +++ b/PCbuild/pylauncher.vcxproj @@ -38,7 +38,6 @@ {7B2727B5-5A3F-40EE-A866-43A13CD31446} pylauncher py - ClCompile false diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index 7033cc3..c56292a 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -75,7 +75,7 @@ true - $(PySourcePath)PC;$(PySourcePath)Include;%(AdditionalIncludeDirectories) + $(PySourcePath)PC;$(PySourcePath)Include;$(IntDir);%(AdditionalIncludeDirectories) $(_DebugPreprocessorDefinition)%(PreprocessorDefinitions) 0x0409 @@ -92,17 +92,17 @@ - - + diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj index 0ae4882..f9580be 100644 --- a/PCbuild/python.vcxproj +++ b/PCbuild/python.vcxproj @@ -36,7 +36,6 @@ {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - ClCompile diff --git a/PCbuild/python3dll.vcxproj b/PCbuild/python3dll.vcxproj index 18ff4a8..cbb618f 100644 --- a/PCbuild/python3dll.vcxproj +++ b/PCbuild/python3dll.vcxproj @@ -39,7 +39,6 @@ python3dll Win32Proj python3 - ClCompile false diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index 9cbe8b9..3a1b5ba 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -48,7 +48,6 @@ - ClCompile true diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj index b0a209a..caed1e8 100644 --- a/PCbuild/pythonw.vcxproj +++ b/PCbuild/pythonw.vcxproj @@ -36,7 +36,6 @@ {F4229CC3-873C-49AE-9729-DD308ED4CD4A} - ClCompile false diff --git a/PCbuild/pywlauncher.vcxproj b/PCbuild/pywlauncher.vcxproj index 882f1c4..eabf883 100644 --- a/PCbuild/pywlauncher.vcxproj +++ b/PCbuild/pywlauncher.vcxproj @@ -38,7 +38,6 @@ {1D4B18D3-7C12-4ECB-9179-8531FF876CE6} pywlauncher pyw - ClCompile false diff --git a/PCbuild/select.vcxproj b/PCbuild/select.vcxproj index 3cd0694..d6112ab 100644 --- a/PCbuild/select.vcxproj +++ b/PCbuild/select.vcxproj @@ -68,6 +68,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/sqlite3.vcxproj b/PCbuild/sqlite3.vcxproj index b6246fa..c841c5a 100644 --- a/PCbuild/sqlite3.vcxproj +++ b/PCbuild/sqlite3.vcxproj @@ -56,6 +56,12 @@ <_ProjectFileVersion>10.0.30319.1 + <_SqliteVersion>$([System.Text.RegularExpressions.Regex]::Match(`$(sqlite3Dir)`, `((\d+)\.(\d+)\.(\d+)\.(\d+))\\?$`).Groups) + $(_SqliteVersion.Split(`;`)[1]) + $(_SqliteVersion.Split(`;`)[2]) + $(_SqliteVersion.Split(`;`)[3]) + $(_SqliteVersion.Split(`;`)[4]) + $(_SqliteVersion.Split(`;`)[5]) @@ -63,6 +69,9 @@ SQLITE_API=__declspec(dllexport);%(PreprocessorDefinitions) Level1 + + SQLITE_VERSION=$(SqliteVersion);SQLITE_MAJOR_VERSION=$(SqliteMajorVersion);SQLITE_MINOR_VERSION=$(SqliteMinorVersion);SQLITE_MICRO_VERSION=$(SqliteMicroVersion);SQLITE_PATCH_VERSION=$(SqlitePatchVersion);%(PreprocessorDefinitions) + @@ -71,6 +80,9 @@ + + + diff --git a/PCbuild/unicodedata.vcxproj b/PCbuild/unicodedata.vcxproj index a3071fb..317c1a8 100644 --- a/PCbuild/unicodedata.vcxproj +++ b/PCbuild/unicodedata.vcxproj @@ -72,6 +72,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false diff --git a/PCbuild/winsound.vcxproj b/PCbuild/winsound.vcxproj index 540235a..12913ef 100644 --- a/PCbuild/winsound.vcxproj +++ b/PCbuild/winsound.vcxproj @@ -68,6 +68,9 @@ + + + {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} false -- cgit v0.12