mirror of
https://github.com/rubickCenter/rubick
synced 2025-07-21 15:39:31 +08:00
🐛 windows 启动bug
This commit is contained in:
parent
4e59294b16
commit
dfb8446cfd
@ -1,12 +1,8 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
import translate from './translate';
|
|
||||||
import { shell } from 'electron';
|
import { shell } from 'electron';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
const fileIcon = require('extract-file-icon');
|
|
||||||
|
|
||||||
const filePath = path.resolve(
|
const filePath = path.resolve(
|
||||||
'C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs'
|
'C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs'
|
||||||
);
|
);
|
||||||
@ -29,6 +25,8 @@ if (!exists) {
|
|||||||
|
|
||||||
const getico = (app) => {
|
const getico = (app) => {
|
||||||
try {
|
try {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
|
const fileIcon = require('extract-file-icon');
|
||||||
const buffer = fileIcon(app.desc, 32);
|
const buffer = fileIcon(app.desc, 32);
|
||||||
const iconpath = path.join(icondir, `${app.name}.png`);
|
const iconpath = path.join(icondir, `${app.name}.png`);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user