Link against OpenSSL when building for Electron (#1413)

This commit is contained in:
Yavor Georgiev 2017-10-16 11:02:35 +02:00 committed by GitHub
parent a183991a7f
commit d6b3fcb8b1
3 changed files with 20 additions and 2 deletions

View File

@ -2,7 +2,8 @@
"variables": {
"realm_download_binaries%": "1",
"use_realm_debug%": "<!(node -p \"'REALMJS_USE_DEBUG_CORE' in process.env ? 1 : 0\")",
"realm_js_dir%": "<(module_root_dir)"
"realm_js_dir%": "<(module_root_dir)",
"runtime%": "node"
},
"conditions": [
["OS=='mac'", {
@ -147,6 +148,19 @@
"libraries": [ "-lrealm-sync<(debug_library_suffix)" ]
}, {
"libraries": [ "-lrealm-sync-node<(debug_library_suffix)" ]
}],
["OS=='win' and runtime=='electron'", {
"libraries": [ "libeay32.lib", "ssleay32.lib" ],
"conditions": [
["target_arch=='ia32'", {
"library_dirs": [ "C:\\src\\vcpkg\\installed\\x86-windows-static\\lib" ]
}, {
"library_dirs": [ "C:\\src\\vcpkg\\installed\\x64-windows-static\\lib" ]
}],
]
}],
["OS=='linux' and runtime=='electron'", {
"libraries": [ "-l:libcrypto.a", "-l:libssl.a" ]
}]
]
},

View File

@ -61,5 +61,6 @@
}
},
"msvs_disabled_warnings": [ 4068, 4101, 4244, 4996 ],
"msbuild_toolset": "v141"
}
}

View File

@ -4,7 +4,10 @@ const assert = require("assert");
const path = require("path");
const Application = require("spectron").Application;
const ELECTRON_PATH = path.join(__dirname, "node_modules", ".bin", "electron");
let ELECTRON_PATH = path.join(__dirname, "node_modules", ".bin", "electron");
if (process.platform === 'win32') {
ELECTRON_PATH += '.cmd';
}
const MAIN_PATH = path.join(__dirname, "app", "main.js");
const POLL_LOG_DELAY = 500;