bugfix: windows 搜索图标有问题

This commit is contained in:
muwoo 2021-09-06 20:37:38 +08:00
parent 614d5ae369
commit 651e202ab1
4 changed files with 6 additions and 18 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "rubick2", "name": "rubick2",
"version": "0.0.3-beta.12", "version": "0.0.3-beta.13",
"author": "muwoo <2424880409@qq.com>", "author": "muwoo <2424880409@qq.com>",
"description": "An electron-vue project", "description": "An electron-vue project",
"license": null, "license": null,
@ -69,7 +69,6 @@
"download-git-repo": "^3.0.2", "download-git-repo": "^3.0.2",
"electron-is-dev": "^2.0.0", "electron-is-dev": "^2.0.0",
"electron-store": "^8.0.0", "electron-store": "^8.0.0",
"icon-extractor": "^1.0.3",
"iohook": "^0.9.3", "iohook": "^0.9.3",
"is-chinese": "^1.4.2", "is-chinese": "^1.4.2",
"jian-pinyin": "^0.2.3", "jian-pinyin": "^0.2.3",

View File

@ -14,7 +14,7 @@ module.exports = () => {
win = new BrowserWindow({ win = new BrowserWindow({
height: 60, height: 60,
useContentSize: true, useContentSize: true,
resizable: false, resizable: true,
width: 800, width: 800,
frame: false, frame: false,
title: '拉比克', title: '拉比克',

View File

@ -1,10 +1,12 @@
import { app, globalShortcut } from 'electron' import { app, globalShortcut } from 'electron'
import '../renderer/store'
import init from './common/common' import init from './common/common'
import { autoUpdate } from './common/autoUpdate' import { autoUpdate } from './common/autoUpdate'
import createTray from './tray' import createTray from './tray'
import { commonConst } from './common/utils' import { commonConst } from './common/utils'
import pkg from '../../package.json' import pkg from '../../package.json'
import Store from 'electron-store';
Store.initRenderer()
const { main } = require("./browsers")() const { main } = require("./browsers")()
@ -106,4 +108,4 @@ class initApp {
} }
} }
(new initApp()).launchApp() (new initApp()).launchApp()

View File

@ -7,18 +7,6 @@ import translate from "./translate";
const fileLists = []; const fileLists = [];
const isZhRegex = /[\u4e00-\u9fa5]/; const isZhRegex = /[\u4e00-\u9fa5]/;
const getico = apps =>{
const iconExtractor = require('icon-extractor');
iconExtractor.emitter.on('icon', function (data) {
apps[data.Context].icon = 'data:image/png;base64,' + data.Base64ImageData;
});
apps.forEach((app, i) => {
iconExtractor.getIcon(i, app.desc);
});
}
const powershell = (cmd, callback) => { const powershell = (cmd, callback) => {
const ps = child.spawn('powershell', ['-NoProfile', '-Command', cmd], { encoding: 'buffer' }) const ps = child.spawn('powershell', ['-NoProfile', '-Command', cmd], { encoding: 'buffer' })
let chunks = []; let chunks = [];
@ -82,7 +70,6 @@ const getWinAppList = () => {
names: JSON.parse(JSON.stringify(keyWords)), names: JSON.parse(JSON.stringify(keyWords)),
}); });
} }
getico(fileLists);
} }
}); });
} }