Compilation scripts updated

This commit is contained in:
Pax1601 2023-12-12 10:45:44 +01:00
parent 4423d5f3d5
commit 3f625c03b9
6 changed files with 9043 additions and 8 deletions

View File

@ -1,7 +1,7 @@
call git clean -fx
cd src
msbuild olympus.sln /t:Rebuild /p:Configuration=Release
msbuild olympus.sln /t:Build /p:Configuration=Release
cd ..
cd client
@ -13,14 +13,11 @@ call npm run build-release
cd "plugins\controltips"
call npm install
call npm run build-release
call npm prune --production
cd "..\.."
cd "plugins\databasemanager"
call npm install
call npm run build-release
call npm prune --production
cd "..\.."
call npm prune --production
cd ..
cd..

View File

@ -1,3 +1,2 @@
call build.bat
call "C:\Program Files (x86)\Inno Setup 6\iscc.exe" "installer\olympus.iss"
call "C:\Program Files (x86)\Inno Setup 6\iscc.exe" "installer\olympus.iss" \DNode
call package.bat

8986
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -60,6 +60,11 @@
padding: 0;
}
.leaflet-container img.leaflet-tile {
/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
mix-blend-mode: plus-lighter;
}
.leaflet-container.leaflet-touch-zoom {
-ms-touch-action: pan-x pan-y;
touch-action: pan-x pan-y;
@ -646,7 +651,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
}
/* Printing */
@media print {
/* Prevent printers from removing background-images of controls. */
.leaflet-control {

46
client/run_client.js Normal file
View File

@ -0,0 +1,46 @@
const fs = require('fs')
const path = require('path')
const { exec } = require("child_process");
const { tcpPingPort } = require("tcp-ping-port")
const jsonPath = path.join('..', 'olympus.json');
const options = {
socketTimeout: 1000
}
var attempt = 0;
const maxAttempt = 3;
function checkServer() {
console.log("Checking DCS Olympus server availability...");
tcpPingPort(`localhost`, json["client"]["port"], options).then(res => {
if (res.online) {
run();
}
else {
if (attempt < maxAttempt) {
attempt++;
console.log(`DCS Olympus server not found, starting it up! Attempt ${attempt} of ${maxAttempt}`);
startServer();
} else {
console.log("Failed to start DCS Olympus server!")
}
}
})
}
async function startServer() {
exec(`START /min "" "../DCS Olympus Server.lnk"`)
await new Promise(resolve => setTimeout(resolve, 3000));
checkServer();
}
function run() {
exec(`start http://localhost:${json["client"]["port"]}`)
}
/* Check that we can read the json */
if (fs.existsSync(jsonPath)) {
var json = JSON.parse(fs.readFileSync(jsonPath, 'utf-8'));
checkServer();
}

2
package.bat Normal file
View File

@ -0,0 +1,2 @@
call "C:\Program Files (x86)\Inno Setup 6\iscc.exe" "installer\olympus.iss"
call "C:\Program Files (x86)\Inno Setup 6\iscc.exe" "installer\olympus.iss" \DNode