Fixed debug scripts for client

This commit is contained in:
Pax1601 2024-01-04 13:02:03 +01:00
parent 7686a60bfd
commit cb793e9d0f
6 changed files with 540 additions and 524 deletions

2
.gitignore vendored
View File

@ -3,6 +3,7 @@ bin
x64
Output
node_modules
hgt
/backend/vcpkg_installed
@ -16,7 +17,6 @@ node_modules
/src/html
/src/latex
/hgt
/package
/build
/DCS Olympus backups

View File

@ -1,3 +1,10 @@
const yargs = require('yargs');
var fs = require('fs');
/* Define configuration parameter */
yargs.alias('c', 'config').describe('c', 'olympus.json config location').string('rp');
args = yargs.argv;
console.log('\x1b[36m%s\x1b[0m', "*********************************************************************");
console.log('\x1b[36m%s\x1b[0m', "* _____ _____ _____ ____ _ *");
console.log('\x1b[36m%s\x1b[0m', "* | __ \\ / ____|/ ____| / __ \\| | *");
@ -10,16 +17,17 @@ console.log('\x1b[36m%s\x1b[0m', "* |___/
console.log('\x1b[36m%s\x1b[0m', "*********************************************************************");
console.log('\x1b[36m%s\x1b[0m', "");
console.log("Please wait while DCS Olympus DEMO Backend Server starts up...");
console.log(`Config location: ${args["config"]}`)
var fs = require('fs');
let rawdata = fs.readFileSync('../olympus.json');
let rawdata = fs.readFileSync(args["config"]);
let config = JSON.parse(rawdata);
/**
* Module dependencies.
*/
var app = require('../demo');
var app = require('../demo')(args["config"]);
var debug = require('debug')('client:server');
var http = require('http');

File diff suppressed because it is too large Load Diff

View File

@ -1 +1,6 @@
concurrently --kill-others "call ./scripts/demo.bat" "npm run watch" "nodemon --ignore ./public/databases/ ./bin/www -- --config ../moc_dcs/Config/olympus.json"
REM create a "fake" dcs Saved Games folder
mkdir "%temp%\DCS Olympus\dcs"
echo F|xcopy /Y "..\olympus.json" "%temp%\DCS Olympus\dcs\Config\olympus.json"
echo D|xcopy /Y /S /E "..\databases" "%temp%\DCS Olympus\dcs\Mods\Services\Olympus\databases"
concurrently --kill-others "node ./bin/demo --config \"%temp%\DCS Olympus\dcs\Config\olympus.json\"" "npm run watch" "nodemon --ignore ./public/databases/ ./bin/www -- --config \"%temp%\DCS Olympus\dcs\Config\olympus.json\""

View File

@ -1 +1,3 @@
concurrently --kill-others "npm run watch" "nodemon --ignore ./public/databases/ ./bin/www -- --config ../moc_dcs/Config/olympus.json"
@echo off
set /p "config=Enter DCS Saved Games folder location: "
concurrently --kill-others "npm run watch" "nodemon --ignore ./public/databases/ ./bin/www -- --config \"%config%\Config\Olympus.json\""

View File

@ -1 +0,0 @@
node .\bin\demo