mirror of
https://github.com/Simplxss/SignerServer.git
synced 2024-11-21 00:37:53 +08:00
13 lines
545 B
JavaScript
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"));
|
|
} |