mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-10 14:44:52 +08:00
Use npm's packaged node-gyp and combine configure and rebuild gyp steps
This commit is contained in:
parent
cab1c9e4ca
commit
03e2f180b7
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ function printArgs(args) {
|
||||||
|
|
||||||
function makeSqlite3Command() {
|
function makeSqlite3Command() {
|
||||||
var npmPath = path.resolve(__dirname, '..', 'build', 'node_modules', '.bin', 'npm');
|
var npmPath = path.resolve(__dirname, '..', 'build', 'node_modules', '.bin', 'npm');
|
||||||
var nodeGypPath = path.resolve(__dirname, '..', 'build', 'node_modules', '.bin', 'node-gyp');
|
var nodeGypPath = path.resolve(__dirname, '..', 'build', 'node_modules', 'npm', 'node_modules', '.bin', 'node-gyp');
|
||||||
var appPackageJSON = JSON.parse(fs.readFileSync(path.resolve(__dirname, '..', 'package.json')));
|
var appPackageJSON = JSON.parse(fs.readFileSync(path.resolve(__dirname, '..', 'package.json')));
|
||||||
var targetVersion = appPackageJSON['electronVersion'];
|
var targetVersion = appPackageJSON['electronVersion'];
|
||||||
var targetPlatform = require('os').platform();
|
var targetPlatform = require('os').platform();
|
||||||
|
@ -43,7 +43,7 @@ function makeSqlite3Command() {
|
||||||
// Unless electron for windows goes 64bit, this should stay
|
// Unless electron for windows goes 64bit, this should stay
|
||||||
throw new Error("Building for win32 with architecture "+targetArch+". Are you sure you meant to do this?");
|
throw new Error("Building for win32 with architecture "+targetArch+". Are you sure you meant to do this?");
|
||||||
}
|
}
|
||||||
return npmPath+" install https://github.com/bengotow/node-sqlite3/archive/master.tar.gz --ignore-scripts && cd node_modules/sqlite3 && "+npmPath+" run prepublish && "+nodeGypPath+" configure --module_name=node_sqlite3 --module_path=../lib/binding/node-v44-"+targetPlatform+"-"+targetArch+" && "+nodeGypPath+" rebuild --target="+targetVersion+" --arch="+targetArch+" --target_platform="+targetPlatform+" --dist-url=https://atom.io/download/atom-shell --module_name=node_sqlite3 --module_path=../lib/binding/node-v44-"+targetPlatform+"-"+targetArch
|
return npmPath+" install https://github.com/bengotow/node-sqlite3/archive/master.tar.gz --ignore-scripts && cd node_modules/sqlite3 && "+npmPath+" run prepublish && "+nodeGypPath+" configure rebuild --target="+targetVersion+" --arch="+targetArch+" --target_platform="+targetPlatform+" --dist-url=https://atom.io/download/atom-shell --module_name=node_sqlite3 --module_path=../lib/binding/node-v44-"+targetPlatform+"-"+targetArch
|
||||||
}
|
}
|
||||||
|
|
||||||
function bootstrap() {
|
function bootstrap() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue