-C Put\sauxiliary\slibraries\safter\slibsqlite3.a\sin\sthe\stestfixture\starget\sof\sthe\n"main.mk"\smakefile.
-D 2012-10-18T20:49:26.488
+C Add\sdetailed\scomments\sto\sthe\sbuild\stools\sused\sto\sgenerate\sthe\sVSIX\spackage.\s\sAlso,\sallow\sthe\sbuild\sconfigurations\sand\snative\slibrary\sdirectories\sto\sbe\soverridden\sfor\sthe\smulti-platform\sbuild\stool\sfor\sMSVC.
+D 2012-10-19T00:23:31.437
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5f4f26109f9d80829122e0e09f9cda008fa065fb
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F test/win32lock.test b2a539e85ae6b2d78475e016a9636b4451dc7fb9
F test/zeroblob.test caaecfb4f908f7bc086ed238668049f96774d688
F test/zerodamage.test e7f77fded01dfcdf92ac2c5400f1e35d7a21463c
-F tool/build-all-msvc.bat 76b835e0ab91e30f22d8aa48db9dea4d2dc59e9f x
+F tool/build-all-msvc.bat c4ff2f18b1a59bb370ce48fdd286b51a82fa0f5c x
F tool/build-shell.sh b64a481901fc9ffe5ca8812a2a9255b6cfb77381
F tool/checkSpacing.c 810e51703529a204fc4e1eb060e9ab663e3c06d2
F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
F tool/mksqlite3c.tcl 589c7f44e990be1b8443cfe4808dce392b0327fa
F tool/mksqlite3h.tcl 78013ad79a5e492e5f764f3c7a8ef834255061f8
F tool/mksqlite3internalh.tcl 3dca7bb5374cee003379b8cbac73714f610ef795
-F tool/mkvsix.tcl adc17f82e3812787fdb015098d006e31804d6aa5
+F tool/mkvsix.tcl c5e0d52592fb07a17626cd54e5f71295fb4d1b55
F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091
F tool/omittest.tcl 4665982e95a6e5c1bd806cf7bc3dea95be422d77
F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9
-P 5be96788a142362fa1f218191d2a93fdea46d93d
-R 3f8f18e3119674320ee09b7250162066
-U drh
-Z 482461e0a8744c4ec96bca6882c387ab
+P 8fc8548f52ab8fcfb53f88db68422e09c9b98da1
+R ecd8eecc21d562cb6365b84ab6aacfa3
+U mistachkin
+Z e537762f3e1c5212ff12ec99c30fc6e2
-8fc8548f52ab8fcfb53f88db68422e09c9b98da1
\ No newline at end of file
+0482c73bfdf80b0c0ce9abea706554d7ddf36f69
\ No newline at end of file
:: Multi-Platform Build Tool for MSVC\r
::\r
\r
+REM\r
+REM This batch script is used to build the SQLite DLL for multiple platforms\r
+REM and configurations using MSVC. The built SQLite DLLs, their associated\r
+REM import libraries, and optionally their symbols files, are placed within\r
+REM the directory specified on the command line, in sub-directories named for\r
+REM their respective platforms and configurations. This batch script must be\r
+REM run from inside a Visual Studio Command Prompt for the desired version of\r
+REM Visual Studio ^(the initial platform configured for the command prompt does\r
+REM not really matter^). Exactly one command line argument is required, the\r
+REM name of an existing directory to be used as the final destination directory\r
+REM for the generated output files, which will be placed in sub-directories\r
+REM created therein. Ideally, the directory specified should be empty.\r
+REM\r
+REM Example:\r
+REM\r
+REM CD /D C:\dev\sqlite\core\r
+REM tool\build-all-msvc.bat C:\Temp\r
+REM\r
+REM In the example above, "C:\dev\sqlite\core" represents the root of the\r
+REM source tree for SQLite and "C:\Temp" represents the final destination\r
+REM directory for the generated output files.\r
+REM\r
+REM There are several environment variables that may be set to modify the\r
+REM behavior of this batch script and its associated Makefile. The list of\r
+REM platforms to build may be overriden by using the PLATFORMS environment\r
+REM variable, which should contain a list of platforms ^(e.g. x86 x86_amd64\r
+REM x86_arm^). All platforms must be supported by the version of Visual Studio\r
+REM being used. The list of configurations to build may be overridden by\r
+REM setting the CONFIGURATIONS environment variable, which should contain a\r
+REM list of configurations to build ^(e.g. Debug Retail^). Neither of these\r
+REM variable values may contain any double quotes, surrounding or embedded.\r
+REM Finally, the NCRTLIBPATH and NSDKLIBPATH environment variables may be set\r
+REM to specify the location of the CRT and SDK, respectively, needed to compile\r
+REM executables native to the architecture of the build machine during any\r
+REM cross-compilation that may be necessary, depending on the platforms to be\r
+REM built. These values in these two variables should be surrounded by double\r
+REM quotes if they contain spaces.\r
+REM\r
+REM Please note that the SQLite build process performed by the Makefile\r
+REM associated with this batch script requires both Gawk ^(gawk.exe^) and Tcl\r
+REM 8.5 ^(tclsh85.exe^) to be present in a directory contained in the PATH\r
+REM environment variable unless a pre-existing amalgamation file is used.\r
+REM\r
SETLOCAL\r
\r
REM SET __ECHO=ECHO\r
\r
%_VECHO% Platforms = '%PLATFORMS%'\r
\r
+REM\r
+REM NOTE: If the list of configurations is not already set, use the default\r
+REM list.\r
+REM\r
+IF NOT DEFINED CONFIGURATIONS (\r
+ SET CONFIGURATIONS=Debug Retail\r
+)\r
+\r
+%_VECHO% Configurations = '%CONFIGURATIONS%'\r
+\r
REM\r
REM NOTE: Setup environment variables to translate between the MSVC platform\r
REM names and the names to be used for the platform-specific binary\r
SET %%T_PATH=%%~dp$PATH:T\r
)\r
\r
+REM\r
+REM NOTE: The Gawk executable "gawk.exe" is required during the SQLite build\r
+REM process unless a pre-existing amalgamation file is used.\r
+REM\r
+IF NOT DEFINED gawk.exe_PATH (\r
+ ECHO The Gawk executable "gawk.exe" is required to be in the PATH.\r
+ GOTO errors\r
+)\r
+\r
+REM\r
+REM NOTE: The Tcl 8.5 executable "tclsh85.exe" is required during the SQLite\r
+REM build process unless a pre-existing amalgamation file is used.\r
+REM\r
+IF NOT DEFINED tclsh85.exe_PATH (\r
+ ECHO The Tcl 8.5 executable "tclsh85.exe" is required to be in the PATH.\r
+ GOTO errors\r
+)\r
+\r
REM\r
REM NOTE: Set the TOOLPATH variable to contain all the directories where the\r
REM external tools were found in the search above.\r
REM slightly different for that version.\r
REM\r
IF "%VisualStudioVersion%" == "11.0" (\r
- SET SET_NSDKLIBPATH=1\r
+ REM\r
+ REM NOTE: If the Windows SDK library path has already been set, do not set\r
+ REM it to something else later on.\r
+ REM\r
+ IF NOT DEFINED NSDKLIBPATH (\r
+ SET SET_NSDKLIBPATH=1\r
+ )\r
) ELSE (\r
CALL :fn_UnsetVariable SET_NSDKLIBPATH\r
)\r
REM\r
SET PATH=%TOOLPATH%;%SystemRoot%\System32;%SystemRoot%\r
\r
- FOR %%B IN (Debug Retail) DO (\r
+ FOR %%B IN (%CONFIGURATIONS%) DO (\r
REM\r
REM NOTE: When preparing the debug build, set the DEBUG and MEMDEBUG\r
REM environment variables to be picked up by the MSVC makefile\r
#
# This script is used to generate a VSIX (Visual Studio Extension) file for
# SQLite usable by Visual Studio.
-
+#
+# PREREQUISITES
+#
+# 1. Tcl 8.4 and later are supported, earlier versions have not been tested.
+#
+# 2. The "sqlite3.h" file is assumed to exist in the parent directory of the
+# directory containing this script. The [optional] second command line
+# argument to this script may be used to specify an alternate location.
+# This script also assumes that the "sqlite3.h" file corresponds with the
+# version of the binaries to be packaged. This assumption is not verified
+# by this script.
+#
+# 3. The temporary directory specified in the TEMP or TMP environment variables
+# must refer to an existing directory writable by the current user.
+#
+# 4. The "zip" and "unzip" command line tools must be located either in a
+# directory contained in the PATH environment variable or specified as the
+# exact file names to execute in the "ZipTool" and "UnZipTool" environment
+# variables, respectively.
+#
+# 5. The template VSIX file (which is basically a zip file) must be located in
+# a "win" directory inside the directory containing this script. It should
+# not contain any executable binaries. It should only contain dynamic
+# textual content files to be processed using [subst] and/or static content
+# files to be copied verbatim.
+#
+# 6. The executable and other compiled binary files to be packaged into the
+# final VSIX file (e.g. DLLs, LIBs, and PDBs) must be located in a single
+# directory tree. The top-level directory of the tree must be specified as
+# the first command line argument to this script. The second level
+# sub-directory names must match those of the build configuration (e.g.
+# "Debug" or "Retail"). The third level sub-directory names must match
+# those of the platform (e.g. "x86", "x64", and "ARM"). For example, the
+# binary files to be packaged would need to be organized as follows when
+# packaging the "Debug" and "Retail" build configurations for the "x86" and
+# "x64" platforms (in this example, "C:\temp" is the top-level directory as
+# specified in the first command line argument):
+#
+# C:\Temp\Debug\x86\sqlite3.lib
+# C:\Temp\Debug\x86\sqlite3.dll
+# C:\Temp\Debug\x86\sqlite3.pdb
+# C:\Temp\Debug\x64\sqlite3.lib
+# C:\Temp\Debug\x64\sqlite3.dll
+# C:\Temp\Debug\x64\sqlite3.pdb
+# C:\Temp\Retail\x86\sqlite3.lib
+# C:\Temp\Retail\x86\sqlite3.dll
+# C:\Temp\Retail\x86\sqlite3.pdb
+# C:\Temp\Retail\x64\sqlite3.lib
+# C:\Temp\Retail\x64\sqlite3.dll
+# C:\Temp\Retail\x64\sqlite3.pdb
+#
+# The above directory tree organization is performed automatically if the
+# "tool\build-all-msvc.bat" batch script is used to build the binary files
+# to be packaged.
+#
+# USAGE
+#
+# Typically, when on Windows, this script is executed using commands similar to
+# the following (from a normal Windows command prompt window):
+#
+# CD /D C:\dev\sqlite\core
+# tclsh85 tool\mkvsix.tcl C:\Temp
+#
+# In the example above, "C:\dev\sqlite\core" represents the root of the source
+# tree for SQLite and "C:\Temp" represents the top-level directory containing
+# the executable and other compiled binary files, organized into a directory
+# tree as described in item 6 of the PREREQUISITES section, above.
+#
+# This script should work on non-Windows platforms as well, provided that all
+# the requirements listed in the PREREQUISITES section are met.
+#
+# NOTES
+#
+# The temporary directory is used as a staging area for the final VSIX file.
+# The template VSIX file is extracted, its contents processed, and then the
+# resulting files are packaged into the final VSIX file.
+#
+package require Tcl 8.4
+\f
proc fail { {error ""} {usage false} } {
if {[string length $error] > 0} then {
puts stdout $error
###############################################################################
#
-# NOTE: Setup the master file list data, including the necessary flags.
+# NOTE: Setup all the master file list data. This includes the source and
+# destination file names, build-neutral boolean flags, platform-neutral
+# boolean flags, and the dynamic content (subst) boolean flags. There
+# is also one set of boolean flags per build configuration, currently
+# "Debug" and "Retail", that control which files are skipped for it.
#
if {![info exists fileNames(source)]} then {
set fileNames(source) [list "" "" "" \