1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-14 22:17:19 +08:00
Files
AzurLaneAutoScript/webapp/packages/main/src/config.ts

18 lines
814 B
TypeScript
Raw Normal View History

2021-10-08 18:10:41 +08:00
const yaml = require('yaml');
const fs = require('fs');
const path = require('path');
// export const alasPath = 'D:/AzurLaneAutoScript';
export const alasPath = process.cwd();
const file = fs.readFileSync(path.join(alasPath, './config/deploy.yaml'), 'utf8');
const config = yaml.parse(file);
const PythonExecutable = config.Deploy.Python.PythonExecutable;
const WebuiPort = config.Deploy.Webui.WebuiPort.toString();
export const pythonPath = (path.isAbsolute(PythonExecutable) ? PythonExecutable : path.join(alasPath, PythonExecutable));
2022-01-14 21:34:54 +08:00
export const webuiUrl = `http://127.0.0.1:${WebuiPort}`;
2021-10-08 18:10:41 +08:00
export const webuiPath = 'gui.py';
2022-01-14 21:34:54 +08:00
export const webuiArgs = ['--port', WebuiPort, '--electron'];
2022-01-16 12:16:59 +08:00
export const dpiScaling = Boolean(config.Deploy.Webui.DpiScaling) || (config.Deploy.Webui.DpiScaling === undefined) ;