为了维护方便,将其开源了。 
代码在:http://code.google.com/p/sqlite-autobuild-win/
原理比较简单:
提供一下版本号,执行脚本sqlite_build.bat 时,会自动从sqlite官网上下载相关源码,最终为你编译生成你要的sqlite3.dll以及独立的sqlite3.exe。
同时你也拥有完整的源代码,非常方便。

目前支持如下版本号:
3_6_16
3_6_22
3_6_3
3_7_3
3070400
3071400
3080000
3080100
3080200

支持的编译器从VC6开始,VS2003, VS2005, VS2008等。
在进入命令行之前,先要初始化VC编译器环境,找到VCVARS32.bat,执行一下,或者VSTools->Visual Studio Command Prompt. 这样,cl, link等命令就都在PATH里头,可以用于编译了。

下边是执行3080200这个版本的完整输出信息:


点击(此处)折叠或打开

  1. D:\Projects\springtech\trunk\sqlite>sqlite_build.bat 3080200
  2. fetching sqlite-amalgamation-3080200.zip ...
  3. --2013-12-28 06:23:35-- http://www.sqlite.org/sqlite-amalgamation-3080200.zip
  4. Resolving www.sqlite.org... 67.18.92.124
  5. Connecting to www.sqlite.org|67.18.92.124|:80... connected.
  6. HTTP request sent, awaiting response... 404 Not Found
  7. 2013-12-28 06:23:36 ERROR 404: Not Found.
  8. --2013-12-28 06:23:36-- http://www.sqlite.org/2013/sqlite-amalgamation-3080200.zip
  9. Resolving www.sqlite.org... 67.18.92.124
  10. Connecting to www.sqlite.org|67.18.92.124|:80... connected.
  11. HTTP request sent, awaiting response... 200 OK
  12. Length: 1473300 (1.4M) [application/zip]
  13. Saving to: `sqlite-amalgamation-3080200.zip'
  14. 100%[==========================================================>] 1,473,300 295K/s in 6.0s
  15. 2013-12-28 06:23:42 (242 KB/s) - `sqlite-amalgamation-3080200.zip' saved [1473300/1473300]
  16. 7-Zip 9.15 beta Copyright (c) 1999-2010 Igor Pavlov 2010-06-20
  17. Processing archive: sqlite-amalgamation-3080200.zip
  18. Extracting sqlite-amalgamation-3080200
  19. Extracting sqlite-amalgamation-3080200\shell.c
  20. Extracting sqlite-amalgamation-3080200\sqlite3.c
  21. Extracting sqlite-amalgamation-3080200\sqlite3ext.h
  22. Extracting sqlite-amalgamation-3080200\sqlite3.h
  23. Everything is Ok
  24. Folders: 1
  25. Files: 4
  26. Size: 5634577
  27. Compressed: 1473300
  28. D:\Projects\springtech\trunk\sqlite\sqlite-amalgamation-3080200\sqlite-amalgamation-3080200\shell.c
  29. D:\Projects\springtech\trunk\sqlite\sqlite-amalgamation-3080200\sqlite-amalgamation-3080200\sqlite3.c
  30. D:\Projects\springtech\trunk\sqlite\sqlite-amalgamation-3080200\sqlite-amalgamation-3080200\sqlite3.h
  31. D:\Projects\springtech\trunk\sqlite\sqlite-amalgamation-3080200\sqlite-amalgamation-3080200\sqlite3ext.h
  32. 移动了 4 个文件。
  33. fetching sqlitedll-3080200.zip ...
  34. --2013-12-28 06:23:43-- http://www.sqlite.org/sqlitedll-3080200.zip
  35. Resolving www.sqlite.org... 67.18.92.124
  36. Connecting to www.sqlite.org|67.18.92.124|:80... connected.
  37. HTTP request sent, awaiting response... 404 Not Found
  38. 2013-12-28 06:23:43 ERROR 404: Not Found.
  39. --2013-12-28 06:23:44-- http://www.sqlite.org/2013/sqlitedll-3080200.zip
  40. Resolving www.sqlite.org... 67.18.92.124
  41. Connecting to www.sqlite.org|67.18.92.124|:80... connected.
  42. HTTP request sent, awaiting response... 404 Not Found
  43. 2013-12-28 06:23:44 ERROR 404: Not Found.
  44. 7-Zip 9.15 beta Copyright (c) 1999-2010 Igor Pavlov 2010-06-20
  45. Error:
  46. cannot find archive
  47. 系统找不到指定的路径。
  48. 系统找不到指定的文件。
  49. fetching sqlite-dll-win32-x86-3080200.zip ...
  50. --2013-12-28 06:23:45-- http://www.sqlite.org/sqlite-dll-win32-x86-3080200.zip
  51. Resolving www.sqlite.org... 67.18.92.124
  52. Connecting to www.sqlite.org|67.18.92.124|:80... connected.
  53. HTTP request sent, awaiting response... 404 Not Found
  54. 2013-12-28 06:23:45 ERROR 404: Not Found.
  55. --2013-12-28 06:23:45-- http://www.sqlite.org/2013/sqlite-dll-win32-x86-3080200.zip
  56. Resolving www.sqlite.org... 67.18.92.124
  57. Connecting to www.sqlite.org|67.18.92.124|:80... connected.
  58. HTTP request sent, awaiting response... 200 OK
  59. Length: 327949 (320K) [application/zip]
  60. Saving to: `sqlite-dll-win32-x86-3080200.zip'
  61. 100%[==========================================================>] 327,949 147K/s in 2.2s
  62. 2013-12-28 06:23:48 (147 KB/s) - `sqlite-dll-win32-x86-3080200.zip' saved [327949/327949]
  63. 7-Zip 9.15 beta Copyright (c) 1999-2010 Igor Pavlov 2010-06-20
  64. Processing archive: sqlite-dll-win32-x86-3080200.zip
  65. Extracting sqlite3.def
  66. Extracting sqlite3.dll
  67. Everything is Ok
  68. Files: 2
  69. Size: 646431
  70. Compressed: 327949
  71. 已复制 1 个文件。
  72. begin building sqlite-amalgamation-3080200
  73. cl : Command line warning D9035 : option 'GX' has been deprecated and will be removed in a future release
  74. cl : Command line warning D9036 : use 'EHsc' instead of 'GX'
  75. cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
  76. shell.c
  77. sqlite3.c
  78. Generating Code...
  79. sqlite3.exe build finished ......
  80. cl : Command line warning D9035 : option 'GX' has been deprecated and will be removed in a future release
  81. cl : Command line warning D9036 : use 'EHsc' instead of 'GX'
  82. cl : Command line warning D9035 : option 'GZ' has been deprecated and will be removed in a future release
  83. cl : Command line warning D9036 : use 'RTC1' instead of 'GZ'
  84. cl : Command line warning D9002 : ignoring unknown option '/MLd'
  85. cl : Command line warning D9002 : ignoring unknown option '/YX'
  86. cl : Command line warning D9002 : ignoring unknown option '/debug'
  87. sqlite3.c
  88. LINK : warning LNK4044: unrecognized option '/pdbtype:sept'; ignored
  89. LINK : sqlite3.dll not found or not built by the last incremental link; performing full link
  90. Creating library sqlite3.lib and object sqlite3.exp
  91. sqlite3.dll build finished ......
  92. end building sqlite-amalgamation-3080200
  93. -----------------------------------------------

在google code上也有完整的readme.
下载方法:

用tortoise svn client, 就可以直接下载:
svn checkout http://sqlite-autobuild-win.googlecode.com/svn/trunk/ sqlite-autobuild-win-read-only

如果你有兴趣,也可以加入此开源项目,共同维护以后各个branch的自动下载和编译。
12-17 04:33