From b159eb6dc1743fa17787e1181bc52d13735c13c6 Mon Sep 17 00:00:00 2001 From: 0mkar <0mkar@protonmail.com> Date: Wed, 4 Jul 2018 18:19:47 +0530 Subject: [PATCH 1/2] Use solc npm release instead github & remove downloadsoloc --- remix-solidity/package.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/remix-solidity/package.json b/remix-solidity/package.json index 39f83c2a0c..4672ca7d0f 100644 --- a/remix-solidity/package.json +++ b/remix-solidity/package.json @@ -24,16 +24,14 @@ "npm-run-all": "^4.0.2", "remix-core": "^0.0.15", "remix-lib": "^0.2.9", - "solc": "https://github.com/ethereum/solc-js", + "solc": "^0.4.24", "standard": "^7.0.1", "tape": "^4.6.0", "webworkify": "^1.2.1" }, "scripts": { - "test": "standard && npm run downloadsolc && tape ./test/tests.js", - "downloadsolc": "cd node_modules/solc && (test -e soljson.js || wget --no-check-certificate https://solc-bin.ethereum.org/soljson.js) && cd ..", - "prepublish": "mkdirp build; npm-run-all -ls downloadsolc", - "postinstall": "npm-run-all -ls downloadsolc" + "test": "standard && tape ./test/tests.js", + "prepublish": "mkdirp build" }, "standard": { "ignore": [ From f9d853c4f79684f48bf132c225a3eff0bf88bfea Mon Sep 17 00:00:00 2001 From: 0mkar <0mkar@protonmail.com> Date: Wed, 4 Jul 2018 18:22:44 +0530 Subject: [PATCH 2/2] require solc for electron --- remix-solidity/src/compiler/compiler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/remix-solidity/src/compiler/compiler.js b/remix-solidity/src/compiler/compiler.js index 4238cb6a0f..5184bff3e8 100644 --- a/remix-solidity/src/compiler/compiler.js +++ b/remix-solidity/src/compiler/compiler.js @@ -73,7 +73,8 @@ function Compiler (handleImportCall) { function onInternalCompilerLoaded () { if (worker === null) { var compiler - if (typeof (window) === 'undefined') { + var userAgent = navigator.userAgent.toLowerCase() + if (typeof (window) === 'undefined' || userAgent.indexOf(' electron/') > -1) { compiler = require('solc') } else { compiler = solc(window.Module)