diff --git a/node_modules/icon-extractor/win-iconExtractor.js b/node_modules/icon-extractor/win-iconExtractor.js index f60ac9f..3cf4231 100644 --- a/node_modules/icon-extractor/win-iconExtractor.js +++ b/node_modules/icon-extractor/win-iconExtractor.js @@ -57,19 +57,11 @@ function IconExtractor(){ function getPlatformIconProcess(){ if (os.type() == 'Windows_NT') { - - let exeSrc = path.join(__dirname,'/bin/IconExtractor.exe'); - let exeDst = path.join(os.tmpdir(), 'IconExtractor.exe'); - let dllSrc = path.join(__dirname,'/bin/Newtonsoft.Json.dll'); - let dllDst = path.join(os.tmpdir(), 'Newtonsoft.Json.dll'); - if (!fs.existsSync(exeDst)) { - fs.writeFileSync(exeDst, fs.readFileSync(exeSrc)); - fs.writeFileSync(dllDst, fs.readFileSync(dllSrc)); - } - return exeDst; - //Do stuff here to get the icon that doesn't have the shortcut thing on it + // return path.join(__dirname, 'bin', 'IconExtractor.exe'); + return path.join(__dirname.replace(/(unsafe-\w+\.asar)/,'$1.unpacked'), 'bin', 'IconExtractor.exe') + //Do stuff here to get the icon that doesn't have the shortcut thing on it } else { - throw('This platform (' + os.type() + ') is unsupported =('); + throw('This platform (' + os.type() + ') is unsupported =('); } }