-
Notifications
You must be signed in to change notification settings - Fork 2
Building notes
Problem: node-pre-gyp doesn't support electron
Error:
Error: Unsupported target version: 0.30.1
Notes while solving this: Electron has a list of version -> ABI at http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/index.json
Format:
{
"files": [
"darwin-x64",
"darwin-x64-symbols",
"linux-ia32",
"linux-ia32-symbols",
"linux-x64",
"linux-x64-symbols",
"win32-ia32",
"win32-ia32-symbols"
],
"chrome": "39.0.2171.65",
"modules": "17",
"version": "0.20.2",
"date": "2014-12-22",
"node": "0.13.0-pre",
"apm": "0.122.0",
"v8": "3.29.88.17",
"uv": "1.0.0",
"zlib": "1.2.3",
"openssl": "1.0.1i"
},
Appears to be out-of-date, but is generated from data gathered with this script: https://github.com/atom/electron/blob/master/tools/dump-version-info.js
Relevant code:
json.version = process.versions['atom-shell'];
json.date = getDate();
var names = ['node', 'v8', 'uv', 'zlib', 'openssl', 'modules', 'chrome']
for (var i in names) {
var name = names[i];
json[name] = process.versions[name];
}
node-pre-gyp needs a file called abi_crosswalk.json that's called from versioning.js
Format:
"0.8.0": {
"node_abi": 1,
"v8": "3.11"
},
##Boilerplate
Switching to https://github.com/szwacz/electron-boilerplate
Open a fresh boilerplate, change the version to the one you wish to use, and run the default app. In the console run: JSON.stringify(process.versions)
. For the current one I get (after passing through jq .
for cleanup):
{
"chrome": "43.0.2357.65",
"atom-shell": "0.30.4",
"electron": "0.30.4",
"http_parser": "2.5.0",
"node": "2.3.1",
"v8": "4.3.61.21",
"uv": "1.6.1",
"zlib": "1.2.8",
"ares": "1.10.1-DEV",
"modules": "44",
"openssl": "1.0.2c"
}
Run through the command jq '{(.["atom-shell"]):{v8}}
Yields:
{
"0.30.4": {
"v8": "4.3.61.21"
}
}
Put that in a file called abi_crosswalk.js
and set the environment variable NODE_PRE_GYP_ABI_CROSSWALK
to point to it, like this:
export NODE_PRE_GYP_ABI_CROSSWALK=`pwd`/abi_crosswalk.js
Now try to rebuild. (TBD)