]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add Win32 version resources to the applicable binaries built by the MSVC makefile.
authormistachkin <mistachkin@noemail.net>
Mon, 3 Sep 2012 10:32:32 +0000 (10:32 +0000)
committermistachkin <mistachkin@noemail.net>
Mon, 3 Sep 2012 10:32:32 +0000 (10:32 +0000)
FossilOrigin-Name: e2f27d28b590164bc6b0d856e79c9345e2188d03

Makefile.msc
manifest
manifest.uuid
src/sqlite3.rc [new file with mode: 0644]

index 9a160c4287da10d24e6564e2ed85e4187220b0a0..bc80e27c8c2c952bb94d63edda6afbd34d259f7e 100644 (file)
@@ -82,6 +82,14 @@ CC = cl.exe
 LD = link.exe
 !ENDIF
 
+# Check for the predefined command macro RC.  This should point to the resource
+# compiler binary for the target platform.  If it is not defined, simply define
+# it to the legacy default value 'rc.exe'.
+#
+!IFNDEF RC
+RC = rc.exe
+!ENDIF
+
 # Check for the command macro NCC.  This should point to the compiler binary
 # for the platform the compilation process is taking place on.  If it is not
 # defined, simply define it to have the same value as the CC macro.  When
@@ -150,6 +158,7 @@ NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
 # same unless your are cross-compiling.)
 #
 TCC = $(CC) -W3 -DSQLITE_OS_WIN=1 -I. -I$(TOP)\src -fp:precise
+RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP)\src
 
 # When compiling the library for use in the WinRT environment,
 # the following compile-time options must be used as well to
@@ -158,7 +167,9 @@ TCC = $(CC) -W3 -DSQLITE_OS_WIN=1 -I. -I$(TOP)\src -fp:precise
 #
 !IF $(FOR_WINRT)!=0
 TCC = $(TCC) -DSQLITE_OS_WINRT=1
+RCC = $(RCC) -DSQLITE_OS_WINRT=1
 TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_PARTITION_APP
+RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_PARTITION_APP
 !ENDIF
 
 # Also, we need to dynamically link to the correct MSVC runtime
@@ -186,7 +197,9 @@ TCC = $(TCC) -MT
 #
 !IF $(USE_AMALGAMATION)==0
 TCC = $(TCC) -I$(TOP)\ext\fts3
+RCC = $(RCC) -I$(TOP)\ext\fts3
 TCC = $(TCC) -I$(TOP)\ext\rtree
+RCC = $(RCC) -I$(TOP)\ext\rtree
 !ENDIF
 
 # Define -DNDEBUG to compile without debugging (i.e., for production usage)
@@ -196,18 +209,22 @@ TCC = $(TCC) -I$(TOP)\ext\rtree
 !IF $(DEBUG)==0
 TCC = $(TCC) -DNDEBUG
 BCC = $(BCC) -DNDEBUG
+RCC = $(RCC) -DNDEBUG
 !ENDIF
 
 !IF $(DEBUG)>1
 TCC = $(TCC) -DSQLITE_DEBUG
+RCC = $(RCC) -DSQLITE_DEBUG
 !ENDIF
 
 !IF $(DEBUG)>3
 TCC = $(TCC) -DSQLITE_DEBUG_OS_TRACE=1
+RCC = $(RCC) -DSQLITE_DEBUG_OS_TRACE=1
 !ENDIF
 
 !IF $(DEBUG)>4
 TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE
+RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE
 !ENDIF
 
 #
@@ -216,30 +233,35 @@ TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE
 #
 TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
 BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
+RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
 
 #
 # Prevent warnings about "deprecated" POSIX functions being used.
 #
 TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
 BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
+RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
 
 #
 # Use the SQLite debugging heap subsystem?
 #
 !IF $(MEMDEBUG)!=0
 TCC = $(TCC) -DSQLITE_MEMDEBUG=1
+RCC = $(RCC) -DSQLITE_MEMDEBUG=1
 
 #
 # Use native Win32 heap subsystem instead of malloc/free?
 #
 !ELSEIF $(WIN32HEAP)!=0
 TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
+RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
 
 #
 # Validate the heap on every call into the native Win32 heap subsystem?
 #
 !IF $(DEBUG)>2
 TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
+RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
 !ENDIF
 !ENDIF
 
@@ -298,10 +320,12 @@ LIBREADLINE =
 # Should the database engine be compiled threadsafe
 #
 TCC = $(TCC) -DSQLITE_THREADSAFE=1
+RCC = $(RCC) -DSQLITE_THREADSAFE=1
 
 # Do threads override each others locks by default (1), or do we test (-1)
 #
 TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
+RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
 
 # Any target libraries which libsqlite must be linked against
 #
@@ -316,6 +340,7 @@ TLIBS =
 # tables to always be in memory.
 #
 TCC = $(TCC) -DSQLITE_TEMP_STORE=1
+RCC = $(RCC) -DSQLITE_TEMP_STORE=1
 
 # Enable/disable loadable extensions, and other optional features
 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
@@ -333,16 +358,19 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
 # END required Windows option
 
 TCC = $(TCC) $(OPT_FEATURE_FLAGS)
+RCC = $(RCC) $(OPT_FEATURE_FLAGS)
 
 # Add in any optional parameters specified on the make commane line
 # ie.  make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
 TCC = $(TCC) $(OPTS)
+RCC = $(RCC) $(OPTS)
 
 # If symbols are enabled, enable PDBs.
 # If debugging is enabled, disable all optimizations and enable PDBs.
 !IF $(DEBUG)>0
 TCC = $(TCC) -Od -D_DEBUG
 BCC = $(BCC) -Od -D_DEBUG
+RCC = $(RCC) -D_DEBUG
 !ELSE
 TCC = $(TCC) -O2
 BCC = $(BCC) -O2
@@ -356,12 +384,17 @@ BCC = $(BCC) -Zi
 # If ICU support is enabled, add the compiler options for it.
 !IF $(USE_ICU)!=0
 TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
+RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
 TCC = $(TCC) -I$(TOP)\ext\icu
+RCC = $(RCC) -I$(TOP)\ext\icu
 TCC = $(TCC) -I$(ICUINCDIR)
+RCC = $(RCC) -I$(ICUINCDIR)
 !ENDIF
 
-# libtool compile/link
+# Command line prefixes for compiling code, compiling resources,
+# linking, etc.
 LTCOMPILE = $(TCC) -Fo$@
+LTRCOMPILE = $(RCC) -r
 LTLIB = lib.exe
 LTLINK = $(TCC) -Fe$@
 
@@ -733,10 +766,10 @@ libsqlite3.lib:   $(LIBOBJ)
 libtclsqlite3.lib:     tclsqlite.lo libsqlite3.lib
        $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS)
 
-sqlite3.exe:   $(TOP)\src\shell.c libsqlite3.lib sqlite3.h
+sqlite3.exe:   $(TOP)\src\shell.c libsqlite3.lib sqlite3res.lo sqlite3.h
        $(LTLINK) $(READLINE_FLAGS) \
                $(TOP)\src\shell.c \
-               /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBREADLINE) $(LTLIBS) $(TLIBS)
+               /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib sqlite3res.lo $(LIBREADLINE) $(LTLIBS) $(TLIBS)
 
 # This target creates a directory named "tsrc" and fills it with
 # copies of all of the C source code and header files needed to
@@ -784,6 +817,17 @@ parse.lo:  parse.c $(HDR)
 opcodes.lo:    opcodes.c
        $(LTCOMPILE) -c opcodes.c
 
+# Rule to build the Win32 resources object file.
+#
+sqlite3res.lo: $(TOP)\src\sqlite3.rc $(HDR)
+       echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
+       for /F %%V in ('type VERSION') do ( \
+               echo #define SQLITE_RESOURCE_VERSION %%V \
+               | $(NAWK) "/.*/ { gsub(/[.]/,\",\");print }" >> sqlite3rc.h \
+       )
+       echo #endif >> sqlite3rc.h
+       $(LTRCOMPILE) -fo sqlite3res.lo $(TOP)\src\sqlite3.rc
+
 # Rules to build individual *.lo files from files in the src directory.
 #
 alter.lo:      $(TOP)\src\alter.c $(HDR)
@@ -999,9 +1043,9 @@ tclsqlite.lo:      $(TOP)\src\tclsqlite.c $(HDR)
 tclsqlite-shell.lo:    $(TOP)\src\tclsqlite.c $(HDR)
        $(LTCOMPILE) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
 
-tclsqlite3.exe:        tclsqlite-shell.lo libsqlite3.lib
+tclsqlite3.exe:        tclsqlite-shell.lo libsqlite3.lib sqlite3res.lo
        $(LTLINK) tclsqlite-shell.lo \
-               /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LTLIBS) $(TLIBS)
+               /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib sqlite3res.lo $(LTLIBS) $(TLIBS)
 
 # Rules to build opcodes.c and opcodes.h
 #
@@ -1114,11 +1158,11 @@ TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
 !ENDIF
 
-testfixture.exe:       $(TESTFIXTURE_SRC) $(HDR)
+testfixture.exe:       $(TESTFIXTURE_SRC) sqlite3res.lo $(HDR)
        $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
                -DBUILD_sqlite -I$(TCLINCDIR) \
                $(TESTFIXTURE_SRC) \
-               /link $(LTLINKOPTS) $(LTLIBPATHS) $(LTLIBS) $(TLIBS)
+               /link $(LTLINKOPTS) $(LTLIBPATHS) sqlite3res.lo $(LTLIBS) $(TLIBS)
 
 fulltest:      testfixture.exe sqlite3.exe
        .\testfixture.exe $(TOP)\test\all.test
@@ -1136,9 +1180,9 @@ sqlite3_analyzer.c: sqlite3.c $(TOP)\src\test_stat.c $(TOP)\src\tclsqlite.c $(TO
        $(NAWK) -f $(TOP)\tool\tostr.awk $(TOP)\tool\spaceanal.tcl >> $@
        echo ; return zMainloop; } >> $@
 
-sqlite3_analyzer.exe:  sqlite3_analyzer.c
+sqlite3_analyzer.exe:  sqlite3_analyzer.c sqlite3res.lo
        $(LTLINK) -DBUILD_sqlite -DTCLSH=2 -I$(TCLINCDIR) sqlite3_analyzer.c \
-               /link $(LTLINKOPTS) $(LTLIBPATHS) $(LTLIBS) $(TLIBS)
+               /link $(LTLINKOPTS) $(LTLIBPATHS) sqlite3res.lo $(LTLIBS) $(TLIBS)
 
 clean:
        del /Q *.lo *.ilk *.lib *.obj *.pdb sqlite3.exe libsqlite3.lib
@@ -1157,11 +1201,11 @@ clean:
        del /Q testfixture.exe testfixture.exp test.db
        del /Q sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
        del /Q sqlite3.c
+       del /Q sqlite3rc.h
        del /Q sqlite3_analyzer.exe sqlite3_analyzer.exp sqlite3_analyzer.c
        del /Q sqlite-output.vsix
 
-#
-# Windows section
+# Dynamic link library section.
 #
 dll: sqlite3.dll
 
@@ -1171,5 +1215,5 @@ sqlite3.def: libsqlite3.lib
                | $(NAWK) "/ 1 _?sqlite3_/ { sub(/^.* _?/,\"\");print }" \
                | sort >> sqlite3.def
 
-sqlite3.dll: $(LIBOBJ) sqlite3.def
-       $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ) $(LTLIBS) $(TLIBS)
+sqlite3.dll: $(LIBOBJ) sqlite3res.lo sqlite3.def
+       $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ) sqlite3res.lo $(LTLIBS) $(TLIBS)
index efe83245c07764d270eb8ca01e6d673a35fc52b5..02deface94f3a14697f7deaa98d586ac1c7fdfd3 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C In\sthe\sspellfix\sphonehash()\sfunction,\sadd\sletter\sW\sinto\sthe\ssame\scharacter\nclass\sas\sV.
-D 2012-08-31T14:55:05.521
+C Add\sWin32\sversion\sresources\sto\sthe\sapplicable\sbinaries\sbuilt\sby\sthe\sMSVC\smakefile.
+D 2012-09-03T10:32:32.046
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in abd5c10d21d1395f140d9e50ea999df8fa4d6376
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
-F Makefile.msc f00ec5dc2e78eb63d32c3125ab7a999aa7fcf924
+F Makefile.msc d6127b1d8488a7733a23c89175ab9b7899987adf
 F Makefile.vxworks 879f034a64062a364b21000266bbd5bc6e0c19b9
 F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
 F VERSION a71848df48082f1d6585d4b0819d530fc455485d
@@ -179,6 +179,7 @@ F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0
 F src/select.c f843c872a97baa1594c2cc3d4c003409a7bd03af
 F src/shell.c 87953c5d9c73d9494db97d1607e2e2280418f261
 F src/sqlite.h.in c447d35212736c4c77d86bc2d00f6cf4d4c12131
+F src/sqlite3.rc fea433eb0a59f4c9393c8e6d76a6e2596b1fe0c0
 F src/sqlite3ext.h 6904f4aadf976f95241311fbffb00823075d9477
 F src/sqliteInt.h 053e03a532beb909ead2df0721db67cdb4c48ae8
 F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d
@@ -1013,7 +1014,10 @@ F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9
-P 527340abff18aedbcb0f82ac1296a9f548e24ac4
-R 12ea0046f8ada46a86a2cc753f34f9c0
-U drh
-Z 80f09e05bcc34157b6c058b371e0115a
+P 7536101317c00fbb5bf555120feb55b9bc40e8ba
+R 24121e4a9d0fc498cf79976cfed87444
+T *branch * win32Resources
+T *sym-win32Resources *
+T -sym-trunk *
+U mistachkin
+Z 3bf23bfb661a7d15378c710920999b0d
index ad95b5a920495919225905dccdb98ced0a21d05b..fc61106319f4e7e81e182ab8c3e1d2ac0832defc 100644 (file)
@@ -1 +1 @@
-7536101317c00fbb5bf555120feb55b9bc40e8ba
\ No newline at end of file
+e2f27d28b590164bc6b0d856e79c9345e2188d03
\ No newline at end of file
diff --git a/src/sqlite3.rc b/src/sqlite3.rc
new file mode 100644 (file)
index 0000000..969876d
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+** 2012 September 2
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains code and resources that are specific to Windows.
+*/
+
+#if !defined(_WIN32_WCE)
+#include "winresrc.h"
+#else
+#include "windows.h"
+#endif
+
+#include "sqlite3.h"
+#include "sqlite3rc.h"
+
+/*
+ * English (U.S.) resources
+ */
+
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif /* _WIN32 */
+
+/*
+ * Version
+ */
+
+VS_VERSION_INFO VERSIONINFO
+  FILEVERSION SQLITE_RESOURCE_VERSION
+  PRODUCTVERSION SQLITE_RESOURCE_VERSION
+  FILEFLAGSMASK 0x3F
+#if defined(_DEBUG)
+  FILEFLAGS 0x1L
+#else
+  FILEFLAGS 0x0L
+#endif
+  FILEOS VOS__WINDOWS32
+  FILETYPE VFT_APP
+  FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+    BLOCK "040904b0"
+    BEGIN
+      VALUE "CompanyName", "SQLite Development Team"
+      VALUE "FileDescription", "SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine."
+      VALUE "FileVersion", SQLITE_VERSION
+      VALUE "InternalName", "sqlite3"
+      VALUE "LegalCopyright", "http://www.sqlite.org/copyright.html"
+      VALUE "ProductName", "SQLite"
+      VALUE "ProductVersion", SQLITE_VERSION
+      VALUE "SourceId", SQLITE_SOURCE_ID
+    END
+  END
+  BLOCK "VarFileInfo"
+  BEGIN
+    VALUE "Translation", 0x409, 1200
+  END
+END