Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 830ceb9

Browse files
author
Jim Cloudman
authored
Added note about custom builds & Electron
1 parent 68c65f3 commit 830ceb9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,16 @@ Set the location where `make` installed it:
155155
npm install sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=/usr/local --verbose
156156

157157
node -e 'require("sqlite3")'
158+
159+
### Custom builds and Electron
160+
161+
Running sqlite3 through [electron-rebuild](https://github.com/electron/electron-rebuild) does not preserve the sqlcipher extension, so some additional flags are needed to make this build Electron compatible. Your `npm install sqlite3 --build-from-source` command needs these additional flags (be sure to replace the target version with the current Electron version you are working with):
162+
163+
--runtime=electron --target=1.7.6 --dist-url=https://atom.io/download/electron
164+
165+
In the case of MacOS with Homebrew, the command should look like the following:
166+
167+
npm install sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=`brew --prefix` --runtime=electron --target=1.7.6 --dist-url=https://atom.io/download/electron
158168

159169
# Testing
160170

0 commit comments

Comments
 (0)