SignerServer/load.js
2024-05-07 21:09:48 +08:00

13 lines
545 B
JavaScript

const path = require('node:path');
const fs = require('node:fs');
const os = require('node:os');
const exePath = path.dirname(process.execPath);
if (os.platform() === "win32") {
let configVersionInfoPath = path.join(exePath, "resources/app/versions/config.json");
const qqVersionConfigInfo = JSON.parse(fs.readFileSync(configVersionInfoPath).toString());
require(path.join(exePath, "resources/app/versions", qqVersionConfigInfo.curVersion, "wrapper.node"));
} else {
require(path.join(exePath, "resources/app/wrapper.node"));
}