upgraded to SQLite version 3.38.2, and removed symlinks during build phase
This commit is contained in:
parent
5e07181b11
commit
d09615c936
26
deps/copy.js
vendored
Normal file
26
deps/copy.js
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const dest = process.argv[2];
|
||||
const source = path.resolve(path.sep, process.argv[3] || path.join(__dirname, 'sqlite3'));
|
||||
const files = [
|
||||
{ filename: 'sqlite3.c', optional: false },
|
||||
{ filename: 'sqlite3.h', optional: false },
|
||||
];
|
||||
|
||||
if (process.argv[3]) {
|
||||
// Support "_HAVE_SQLITE_CONFIG_H" in custom builds.
|
||||
files.push({ filename: 'config.h', optional: true });
|
||||
} else {
|
||||
// Required for some tests.
|
||||
files.push({ filename: 'sqlite3ext.h', optional: false });
|
||||
}
|
||||
|
||||
for (const { filename, optional } of files) {
|
||||
if (optional && !fs.existsSync(path.join(source, filename))) {
|
||||
continue;
|
||||
}
|
||||
fs.accessSync(path.join(source, filename));
|
||||
fs.copyFileSync(path.join(source, filename), path.join(dest, filename));
|
||||
}
|
||||
6
deps/download.sh
vendored
6
deps/download.sh
vendored
@ -13,13 +13,13 @@
|
||||
#
|
||||
# When a user builds better-sqlite3, the following steps are taken:
|
||||
# 1. node-gyp loads the previously exported compile-time options (defines.gypi).
|
||||
# 2. the symlink.js script creates symlinks to the bundled amalgamation.
|
||||
# 3. node-gyp compiles the symlinked sqlite3.c along with better_sqlite3.cpp.
|
||||
# 2. the copy.js script copies the bundled amalgamation into the build folder.
|
||||
# 3. node-gyp compiles the copied sqlite3.c along with better_sqlite3.cpp.
|
||||
# 4. node-gyp links the two resulting binaries to generate better_sqlite3.node.
|
||||
# ===
|
||||
|
||||
YEAR="2022"
|
||||
VERSION="3370200"
|
||||
VERSION="3380200"
|
||||
|
||||
DEFINES="
|
||||
SQLITE_DQS=0
|
||||
|
||||
8
deps/sqlite3.gyp
vendored
8
deps/sqlite3.gyp
vendored
@ -14,7 +14,7 @@
|
||||
'conditions': [
|
||||
['sqlite3 == ""', {
|
||||
'actions': [{
|
||||
'action_name': 'symlink_builtin_sqlite3',
|
||||
'action_name': 'copy_builtin_sqlite3',
|
||||
'inputs': [
|
||||
'sqlite3/sqlite3.c',
|
||||
'sqlite3/sqlite3.h',
|
||||
@ -25,11 +25,11 @@
|
||||
'<(SHARED_INTERMEDIATE_DIR)/sqlite3/sqlite3.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/sqlite3/sqlite3ext.h',
|
||||
],
|
||||
'action': ['node', 'symlink.js', '<(SHARED_INTERMEDIATE_DIR)/sqlite3', '', 'sqlite3.c', 'sqlite3.h', 'sqlite3ext.h'],
|
||||
'action': ['node', 'copy.js', '<(SHARED_INTERMEDIATE_DIR)/sqlite3', ''],
|
||||
}],
|
||||
}, {
|
||||
'actions': [{
|
||||
'action_name': 'symlink_custom_sqlite3',
|
||||
'action_name': 'copy_custom_sqlite3',
|
||||
'inputs': [
|
||||
'<(sqlite3)/sqlite3.c',
|
||||
'<(sqlite3)/sqlite3.h',
|
||||
@ -38,7 +38,7 @@
|
||||
'<(SHARED_INTERMEDIATE_DIR)/sqlite3/sqlite3.c',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/sqlite3/sqlite3.h',
|
||||
],
|
||||
'action': ['node', 'symlink.js', '<(SHARED_INTERMEDIATE_DIR)/sqlite3', '<(sqlite3)', 'sqlite3.c', 'sqlite3.h'],
|
||||
'action': ['node', 'copy.js', '<(SHARED_INTERMEDIATE_DIR)/sqlite3', '<(sqlite3)'],
|
||||
}],
|
||||
}],
|
||||
],
|
||||
|
||||
BIN
deps/sqlite3/sqlite3.c
vendored
BIN
deps/sqlite3/sqlite3.c
vendored
Binary file not shown.
BIN
deps/sqlite3/sqlite3.h
vendored
BIN
deps/sqlite3/sqlite3.h
vendored
Binary file not shown.
BIN
deps/sqlite3/sqlite3ext.h
vendored
BIN
deps/sqlite3/sqlite3ext.h
vendored
Binary file not shown.
19
deps/symlink.js
vendored
19
deps/symlink.js
vendored
@ -1,19 +0,0 @@
|
||||
'use strict';
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const dest = process.argv[2];
|
||||
const source = path.resolve(path.sep, process.argv[3] || path.join(__dirname, 'sqlite3'));
|
||||
const filenames = process.argv.slice(4).map(str => path.basename(str));
|
||||
|
||||
/*
|
||||
This creates symlinks inside the <$2> directory, linking to files inside the
|
||||
directory specified by the absolute path <$3>. If no path <$3> is provided,
|
||||
the default path of "./deps/sqlite3" is used. The basenames of the files to
|
||||
link are specified by <$4...>.
|
||||
*/
|
||||
|
||||
for (const filename of filenames) {
|
||||
fs.accessSync(path.join(source, filename));
|
||||
fs.symlinkSync(path.join(source, filename), path.join(dest, filename), 'file');
|
||||
}
|
||||
@ -42,7 +42,7 @@ If you're using a SQLite3 encryption extension that is a drop-in replacement for
|
||||
|
||||
# Bundled configuration
|
||||
|
||||
By default, this distribution currently uses SQLite3 **version 3.37.2** with the following [compilation options](https://www.sqlite.org/compile.html):
|
||||
By default, this distribution currently uses SQLite3 **version 3.38.2** with the following [compilation options](https://www.sqlite.org/compile.html):
|
||||
|
||||
```
|
||||
SQLITE_DQS=0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user