From dba776a002ca4e295232ab047c0be6d462012101 Mon Sep 17 00:00:00 2001 From: fofolee Date: Wed, 24 Apr 2019 19:29:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8F=AF=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node_modules/icon-extractor/win-iconExtractor.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) 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 =('); } }