forked from wanzi6666/NTQQ-sign-to-Lagrange-sign
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload.js
More file actions
66 lines (59 loc) · 1.76 KB
/
load.js
File metadata and controls
66 lines (59 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
const path = require('node:path');
const os = require('node:os');
const exePath = path.dirname(process.execPath);
let QQWrapper, version, appid, qua;
if (os.platform() === "win32") {
const versionConfig = require(path.join(exePath, "resources/app/versions/config.json"));
version = versionConfig.curVersion;
QQWrapper = require(path.join(exePath, "resources/app/versions", version, "wrapper.node"));
appid = "537226655"; // 9.9.12-25234
qua = `V1_WIN_NQ_${version.replace("-", "_")}_GW_B`;
} else {
const qqPkgInfo = require(path.join(exePath, "resources/app/package.json"));
QQWrapper = require(path.join(exePath, "resources/app/wrapper.node"));
version = qqPkgInfo.version;
appid = "537226441";
qua = qqPkgInfo.qua;
}
class GlobalAdapter {
onLog(...args) {
}
onGetSrvCalTime(...args) {
}
onShowErrUITips(...args) {
}
fixPicImgType(...args) {
}
getAppSetting(...args) {
}
onInstallFinished(...args) {
}
onUpdateGeneralFlag(...args) {
}
onGetOfflineMsg(...args) {
}
}
const dataPathGlobal = "/root"
const engine = new QQWrapper.NodeIQQNTWrapperEngine();
engine.initWithDeskTopConfig({
base_path_prefix: "",
platform_type: 3,
app_type: 4,
app_version: version,
os_version: os.release(),
use_xlog: true,
qua: qua,
global_path_config: {
desktopGlobalPath: dataPathGlobal
},
thumb_config: { maxSide: 324, minSide: 48, longLimit: 6, density: 2 }
}, new QQWrapper.NodeIGlobalAdapter(new GlobalAdapter()));
const loginService = new QQWrapper.NodeIKernelLoginService();
loginService.initConfig({
machineId: "",
appid: appid,
platVer: os.release(),
commonPath: dataPathGlobal,
clientVer: version,
hostName: os.hostname()
});