mirror of
https://github.com/fofolee/uTools-ProcessKiller.git
synced 2025-06-07 21:46:33 +08:00
解决可执行文件的问题
This commit is contained in:
parent
54cf06b932
commit
dba776a002
16
node_modules/icon-extractor/win-iconExtractor.js
generated
vendored
16
node_modules/icon-extractor/win-iconExtractor.js
generated
vendored
@ -57,19 +57,11 @@ function IconExtractor(){
|
|||||||
|
|
||||||
function getPlatformIconProcess(){
|
function getPlatformIconProcess(){
|
||||||
if (os.type() == 'Windows_NT') {
|
if (os.type() == 'Windows_NT') {
|
||||||
|
// return path.join(__dirname, 'bin', 'IconExtractor.exe');
|
||||||
let exeSrc = path.join(__dirname,'/bin/IconExtractor.exe');
|
return path.join(__dirname.replace(/(unsafe-\w+\.asar)/,'$1.unpacked'), 'bin', 'IconExtractor.exe')
|
||||||
let exeDst = path.join(os.tmpdir(), 'IconExtractor.exe');
|
//Do stuff here to get the icon that doesn't have the shortcut thing on it
|
||||||
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
|
|
||||||
} else {
|
} else {
|
||||||
throw('This platform (' + os.type() + ') is unsupported =(');
|
throw('This platform (' + os.type() + ') is unsupported =(');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user