写了一个sqlite自动上载并编译的批处理脚本(windows上)

写了一个sqlite自动下载并编译的批处理脚本(windows下)好久没有光顾sqlite了,没想到已经到了3.7.8了。以前

写了一个sqlite自动下载并编译的批处理脚本(windows下)
好久没有光顾sqlite了,没想到已经到了3.7.8了。
以前手动下载,并且建工程,编译,挺浪费时间的。干脆用wget, 7z, 结合批处理,整理成一个可以下载并编译成dll和exe的脚本。

运行脚本之前,请先将vs2008的vcvar运行一下,得到vc的编译环境。

内容如下:



以下是我的执行结果:
引用fetching sqlite-amalgamation-3070800.zip ...
--2011-09-20 08:48:30--  http://www.sqlite.org/sqlite-amalgamation-3070800.zip
Resolving www.sqlite.org... 67.18.92.124
Connecting to www.sqlite.org|67.18.92.124|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1329197 (1.3M) [application/zip]
Saving to: `sqlite-amalgamation-3070800.zip'

100%[==========================================================>] 1,329,197    119K/s   in 11s

2011-09-20 08:48:41 (120 KB/s) - `sqlite-amalgamation-3070800.zip' saved [1329197/1329197]


7-Zip 9.15 beta  Copyright (c) 1999-2010 Igor Pavlov  2010-06-20

Processing archive: sqlite-amalgamation-3070800.zip

Extracting  sqlite-amalgamation-3070800
Extracting  sqlite-amalgamation-3070800\shell.c
Extracting  sqlite-amalgamation-3070800\sqlite3.c
Extracting  sqlite-amalgamation-3070800\sqlite3.h
Extracting  sqlite-amalgamation-3070800\sqlite3ext.h

Everything is Ok

Folders: 1
Files: 4
Size:       5059684
Compressed: 1329197
E:\xionghe\sqlite\sqlite-3.7.3\demo\sqlite-amalgamation-3070800\sqlite-amalgamation-3070800\shell.c
E:\xionghe\sqlite\sqlite-3.7.3\demo\sqlite-amalgamation-3070800\sqlite-amalgamation-3070800\sqlite3.c
E:\xionghe\sqlite\sqlite-3.7.3\demo\sqlite-amalgamation-3070800\sqlite-amalgamation-3070800\sqlite3.h
E:\xionghe\sqlite\sqlite-3.7.3\demo\sqlite-amalgamation-3070800\sqlite-amalgamation-3070800\sqlite3ext.h
fetching sqlitedll-3070800.zip ...
--2011-09-20 08:48:46--  http://www.sqlite.org/sqlitedll-3070800.zip
Resolving www.sqlite.org... 67.18.92.124
Connecting to www.sqlite.org|67.18.92.124|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2011-09-20 08:48:47 ERROR 404: Not Found.


7-Zip 9.15 beta  Copyright (c) 1999-2010 Igor Pavlov  2010-06-20


Error:
cannot find archive
The system cannot find the path specified.
The system cannot find the file specified.
try another dll zip
fetching sqlite-dll-win32-x86-3070800.zip ...
--2011-09-20 08:48:47--  http://www.sqlite.org/sqlite-dll-win32-x86-3070800.zip
Resolving www.sqlite.org... 67.18.92.124
Connecting to www.sqlite.org|67.18.92.124|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 289182 (282K) [application/zip]
Saving to: `sqlite-dll-win32-x86-3070800.zip'

100%[==========================================================>] 289,182      127K/s   in 2.2s

2011-09-20 08:48:51 (127 KB/s) - `sqlite-dll-win32-x86-3070800.zip' saved [289182/289182]


7-Zip 9.15 beta  Copyright (c) 1999-2010 Igor Pavlov  2010-06-20

Processing archive: sqlite-dll-win32-x86-3070800.zip

Extracting  sqlite3.def
Extracting  sqlite3.dll

Everything is Ok

Files: 2
Size:       575107
Compressed: 289182
        1 file(s) copied.
begin building sqlite-amalgamation-3070800
cl : Command line warning D9035 : option 'GX' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'EHsc' instead of 'GX'
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
shell.c
sqlite3.c
Generating Code...
sqlite3.exe build finished ......
cl : Command line warning D9035 : option 'GX' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'EHsc' instead of 'GX'
cl : Command line warning D9035 : option 'GZ' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'RTC1' instead of 'GZ'
cl : Command line warning D9002 : ignoring unknown option '/MLd'
cl : Command line warning D9002 : ignoring unknown option '/YX'
cl : Command line warning D9002 : ignoring unknown option '/debug'
sqlite3.c
LINK : warning LNK4044: unrecognized option '/pdbtype:sept'; ignored
LINK : sqlite3.dll not found or not built by the last incremental link; performing full link
   Creating library sqlite3.lib and object sqlite3.exp
sqlite3.dll build finished ......
end building sqlite-amalgamation-3070800
----------------------------------------------- 1 楼 iihero 2011-09-27   上边的脚本使用ultraedit列编辑模式,把左边的行号去掉,并去掉每行行尾多余的空格即可。