mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
feat: ffmpeg download auto
This commit is contained in:
@@ -31,6 +31,8 @@ import { WebUiDataRuntime } from '@/webui/src/helper/Data';
|
||||
import { napCatVersion } from '@/common/version';
|
||||
import { NodeIO3MiscListener } from '@/core/listeners/NodeIO3MiscListener';
|
||||
import { sleep } from '@/common/helper';
|
||||
import { downloadFFmpegIfNotExists } from '@/common/download-ffmpeg';
|
||||
import { FFmpegService } from '@/common/ffmpeg';
|
||||
|
||||
// NapCat Shell App ES 入口文件
|
||||
async function handleUncaughtExceptions(logger: LogWrapper) {
|
||||
@@ -311,6 +313,11 @@ export async function NCoreInitShell() {
|
||||
const pathWrapper = new NapCatPathWrapper();
|
||||
const logger = new LogWrapper(pathWrapper.logsPath);
|
||||
handleUncaughtExceptions(logger);
|
||||
downloadFFmpegIfNotExists(logger).then(({ path, isExist }) => {
|
||||
if (!isExist && path) {
|
||||
FFmpegService.setFfmpegPath(path);
|
||||
}
|
||||
});
|
||||
const basicInfoWrapper = new QQBasicInfoWrapper({ logger });
|
||||
const wrapper = loadQQWrapper(basicInfoWrapper.getFullQQVesion());
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import { NCoreInitShell } from './base';
|
||||
import * as net from 'net'; // 引入 net 模块
|
||||
import * as net from 'net';
|
||||
import * as process from 'process';
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
const pid = process.pid;
|
||||
const pipePath = `\\\\.\\pipe\\NapCat_${pid}`;
|
||||
|
Reference in New Issue
Block a user