feat: support macOS

This commit is contained in:
Hao Guan
2024-09-03 20:17:10 +08:00
parent 709a0744bd
commit 7e96118cdc
6 changed files with 33 additions and 4 deletions

View File

@@ -50,6 +50,11 @@ export async function NCoreInitShell() {
// from get dataPath
const [dataPath, dataPathGlobal] = (() => {
if (os.platform() === 'darwin') {
const userPath = os.homedir();
const appDataPath = path.resolve(userPath, './Library/Application Support/QQ');
return [appDataPath, path.join(appDataPath, 'global')];
}
let dataPath = wrapper.NodeQQNTWrapperUtil.getNTUserDataInfoConfig();
if (!dataPath) {
dataPath = path.resolve(os.homedir(), './.config/QQ');