You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+9-14Lines changed: 9 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,15 @@
1
1
# Contributing
2
2
3
-
General guidelines for contributing to node-sqlite3
3
+
General guidelines for contributing to node-sqlcipher.
4
4
5
-
## Install Help
5
+
#Testing
6
6
7
-
If you've landed here due to a failed install of `node-sqlite3` then feel free to create a [new issue](https://github.com/mapbox/node-sqlite3/issues/new) to ask for help. The most likely problem is that we do not yet provide pre-built binaries for your particular platform and so the `node-sqlite3` install attempted a source compile but failed because you are missing the [dependencies for node-gyp](https://github.com/TooTallNate/node-gyp#installation). But please provide as much detail on your problem as possible and we'll try to help. Please include:
8
-
- terminal logs of failed install (preferably from running `npm install sqlite3 --loglevel=info`)
9
-
-`node-sqlite3` version you tried to install
10
-
- node version you are running
11
-
- operating system and architecture you are running, e.g. `Windows 7 64 bit`.
7
+
[mocha](https://github.com/visionmedia/mocha) is required to run unit tests.
8
+
9
+
In sqlite3's directory (where its `package.json` resides) run the following:
Copy file name to clipboardExpand all lines: README.md
+4-33Lines changed: 4 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,21 +53,10 @@ A copy of the source for SQLCipher 4.4.2 is bundled, which is based on SQLite 3.
53
53
54
54
## Building from source.
55
55
56
-
This is done automatically by node-pre-gyp when installing on a platform without pre-built binaries. This should generally
57
-
not be required with later versions, since two pre-built versions (N-API 3 and N-API 6) cover all electron and node versions.
56
+
Building from source when installing the package is only supported up to version 5.2.0.
58
57
59
-
However, this does require some additional setup, and is likely to run against obscure errors when installing.
60
-
61
-
Requirements:
62
-
63
-
### Mac
64
-
65
-
*`brew install openssl@1.1`
66
-
67
-
### Windows
68
-
69
-
* Visual Studio 2015
70
-
* Python 2.7
58
+
The two pre-built versions (N-API 3 and N-API 6) cover all electron and node versions, so building from source should
59
+
not be required.
71
60
72
61
## Usage with electron-forge / electron-rebuild
73
62
@@ -97,7 +86,7 @@ SQLCipher depends on OpenSSL.
97
86
98
87
For Windows, we bundle OpenSSL 1.1.1i. Binaries are generated using [vckpg](https://github.com/microsoft/vcpkg) (e.g., `.\vcpkg\vcpkg install openssl:x64-windows-static`).
99
88
100
-
On Mac we build against OpenSSL installed via brew, but statically link it so that end-users do not need to install it.
89
+
On Mac we bundle OpenSSL 1.1.1l.
101
90
102
91
On Linux we dynamically link against the system OpenSSL.
103
92
@@ -107,24 +96,6 @@ See the [API documentation](https://github.com/mapbox/node-sqlite3/wiki) in the
107
96
108
97
Documentation for the SQLCipher extension is available [here](https://www.zetetic.net/sqlcipher/sqlcipher-api/).
109
98
110
-
# Testing
111
-
112
-
[mocha](https://github.com/visionmedia/mocha) is required to run unit tests.
113
-
114
-
In sqlite3's directory (where its `package.json` resides) run the following:
115
-
116
-
npm install --build-from-source
117
-
npm test
118
-
119
-
# Publishing
120
-
121
-
To publish a new version, run:
122
-
123
-
npm version minor -m "%s [publish binary]"
124
-
npm publish
125
-
126
-
Publishing of the prebuilt binaries is performed on CircleCI.
127
-
128
99
# Acknowledgments
129
100
130
101
Most of the work in this library is from the [node-sqlite3](https://github.com/mapbox/node-sqlite3) library by [MapBox](https://mapbox.com/).
Copy file name to clipboardExpand all lines: SQLCipher.md
+8-18Lines changed: 8 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,16 +22,16 @@ The above produces 4 files of interest:
22
22
```
23
23
sqlite3.c
24
24
sqlite3.h
25
-
shell.c # optional
26
-
sqlite3ext.h # optional
27
-
VERSION # optional
25
+
shell.c
26
+
sqlite3ext.h
27
+
VERSION # rename to VERSION.txt
28
28
```
29
29
30
-
The files are copied to: `sqlcipher-amalgamation-<version>`.
30
+
Copy these files to: `deps/sqlcipher-amalgamation`.
31
31
32
32
## Step 2: Get OpenSSL libraries
33
33
34
-
NodeJS typically includes OpenSSL. However, for Electron on Windows, we need to bundle a copy.
34
+
NodeJS typically includes OpenSSL. However, to support Electron, we statically link against libcrypto from OpenSSL.
35
35
36
36
Run the following commands to generate the latest OpenSSL libs for Windows:
37
37
@@ -40,25 +40,15 @@ cd deps
40
40
.\openssl-windows.bat
41
41
```
42
42
43
-
... this will output the libs in `deps/openssl-windows` (OpenSSL-WinXX), including the header files in `deps/openssl-windows/openssl-include`. Every arch-specific folder includes these binaries:
43
+
... this will output the libs in `deps/` (OpenSSL-WinXX), including the header files in `deps/openssl-include`. Every arch-specific folder includes these binaries:
44
44
45
45
```
46
46
libcrypto.lib
47
47
libssl.lib
48
48
ossl_static.pdb
49
49
```
50
50
51
-
Copy all folders under `deps/openssl-windows` to `sqlcipher-amalgamation-<version>`.
52
-
53
-
## Step 3: Build the archive
54
-
55
-
Archive the folder as `deps/sqlcipher-amalgamation-<version>.tar.gz`, and update the version number in `common-sqlite.gypi` (must be the same).
56
-
57
-
```
58
-
tar czf sqlcipher-amalgamation-$VERSION.tar.gz sqlcipher-amalgamation-$VERSION
59
-
```
60
-
61
-
## Step 4: Test the build
51
+
## Step 3: Test the build
62
52
63
53
Run:
64
54
@@ -78,7 +68,7 @@ npm run test
78
68
The OpenSSL files are specifically required for Electron, which doesn't bundle OpenSSL like NodeJS does. The header and .lib files are required at compile-time. We bundle a statically-linked version of OpenSSL with the library, so the user does not need to manually install OpenSSL.
79
69
80
70
`deps/sqlite3.gyp` has been modified from the original node-sqlite3 one to:
81
-
* Use the bundled OpenSSL on Windows.
71
+
* Use the bundled OpenSSL on Windows and MacOS.
82
72
* Add additional define statements required by SQLCipher.
0 commit comments