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-07 00:04:40 +08:00
|
|
|
export const webuiUrl = `http://localhost:${WebuiPort}`;
|
2021-10-08 18:10:41 +08:00
|
|
|
export const webuiPath = 'gui.py';
|
|
|
|
|
export const webuiArgs = ['--port', WebuiPort];
|