mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-11 23:40:24 +00:00
refactor: 重构目录删除旧支持
This commit is contained in:
@@ -32,7 +32,7 @@ function getAddonPath(binaryPath: string): string {
|
||||
} else {
|
||||
throw new Error(`Unsupported platform: ${platformName} ${archName}`);
|
||||
}
|
||||
return path.join(binaryPath, "./nodeffmpeg/", addonFileName);
|
||||
return path.join(binaryPath, "./native/ffmpeg/", addonFileName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,7 +43,7 @@ export class NativePacketClient {
|
||||
this.logStack.pushLogWarn(`NativePacketClient: 不支持的平台: ${platform}`);
|
||||
return false;
|
||||
}
|
||||
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './moehoo/napi2native.' + platform + '.node');
|
||||
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './native/napi2native/napi2native.' + platform + '.node');
|
||||
if (!fs.existsSync(moehoo_path)) {
|
||||
this.logStack.pushLogWarn(`NativePacketClient: 缺失运行时文件: ${moehoo_path}`);
|
||||
return false;
|
||||
@@ -55,7 +55,7 @@ export class NativePacketClient {
|
||||
const platform = process.platform + '.' + process.arch;
|
||||
const isNewQQ = this.napcore.basicInfo.requireMinNTQQBuild("40824");
|
||||
if (isNewQQ) {
|
||||
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './moehoo/napi2native.' + platform + '.node');
|
||||
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './native/napi2native/napi2native.' + platform + '.node');
|
||||
process.dlopen(this.MoeHooExport, moehoo_path, constants.dlopen.RTLD_LAZY);
|
||||
this.MoeHooExport?.exports.initHook?.(send, recv);
|
||||
this.available = true;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/native/packet/MoeHoo.linux.x64.node
Normal file
BIN
src/native/packet/MoeHoo.linux.x64.node
Normal file
Binary file not shown.
BIN
src/native/packet/MoeHoo.win.x64.node
Normal file
BIN
src/native/packet/MoeHoo.win.x64.node
Normal file
Binary file not shown.
Binary file not shown.
@@ -67,11 +67,11 @@ export class WindowsPtyAgent {
|
||||
}
|
||||
if (this._useConpty) {
|
||||
if (!conptyNative) {
|
||||
conptyNative = require_dlopen('./pty/' + process.platform + '.' + process.arch + '/conpty.node');
|
||||
conptyNative = require_dlopen('./native/pty/' + process.platform + '.' + process.arch + '/conpty.node');
|
||||
}
|
||||
} else {
|
||||
if (!winptyNative) {
|
||||
winptyNative = require_dlopen('./pty/' + process.platform + '.' + process.arch + '/pty.node');
|
||||
winptyNative = require_dlopen('./native/pty/' + process.platform + '.' + process.arch + '/pty.node');
|
||||
}
|
||||
}
|
||||
this._ptyNative = this._useConpty ? conptyNative : winptyNative;
|
||||
|
||||
Reference in New Issue
Block a user