mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Fixed errors in build scripts
This commit is contained in:
parent
4e7c8ef856
commit
89c1660988
15
client/@types/olympus/index.d.ts
vendored
15
client/@types/olympus/index.d.ts
vendored
@ -416,10 +416,6 @@ declare module "interfaces" {
|
||||
global {
|
||||
function getOlympusPlugin(): OlympusPlugin;
|
||||
}
|
||||
export interface ConfigurationOptions {
|
||||
port: number;
|
||||
address: string;
|
||||
}
|
||||
export interface ContextMenuOption {
|
||||
tooltip: string;
|
||||
src: string;
|
||||
@ -787,6 +783,14 @@ declare module "other/utils" {
|
||||
export function generateUUIDv4(): string;
|
||||
export function keyEventWasInInput(event: KeyboardEvent): boolean;
|
||||
export function reciprocalHeading(heading: number): number;
|
||||
/**
|
||||
* Prepend numbers to the start of a string
|
||||
*
|
||||
* @param num <number> subject number
|
||||
* @param places <number> places to pad
|
||||
* @param decimal <boolean> whether this is a decimal number or not
|
||||
*
|
||||
* */
|
||||
export const zeroAppend: (num: number, places: number, decimal?: boolean) => string;
|
||||
export const zeroPad: (num: number, places: number) => string;
|
||||
export function similarity(s1: string, s2: string): number;
|
||||
@ -2421,12 +2425,11 @@ declare module "server/servermanager" {
|
||||
export class ServerManager {
|
||||
#private;
|
||||
constructor();
|
||||
toggleDemoEnabled(): void;
|
||||
setCredentials(newUsername: string, newPassword: string): void;
|
||||
GET(callback: CallableFunction, uri: string, options?: ServerRequestOptions, responseType?: string, force?: boolean): void;
|
||||
PUT(request: object, callback: CallableFunction): void;
|
||||
getConfig(callback: CallableFunction): void;
|
||||
setAddress(address: string, port: number): void;
|
||||
setAddress(address: string): void;
|
||||
getAirbases(callback: CallableFunction): void;
|
||||
getBullseye(callback: CallableFunction): void;
|
||||
getLogs(callback: CallableFunction, refresh?: boolean): void;
|
||||
|
||||
@ -1,78 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="./stylesheets/style.css">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;600;700;800&display=swap" />
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<title>DCS Olympus Manager {{OLYMPUS_VERSION_NUMBER}}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="title-bar">
|
||||
<div>DCS Olympus manager</div>
|
||||
<button class="title-bar-button minimize"></button>
|
||||
<button class="title-bar-button restore hide"></button>
|
||||
<button class="title-bar-button maximize"></button>
|
||||
<button class="title-bar-button close"></button>
|
||||
</div>
|
||||
<div id="header">
|
||||
<img class="main-icon" src="../img/OlympusLogoFinal_4k.png" \>
|
||||
<div class="version">
|
||||
<div> DCS Olympus Manager</div>
|
||||
<div class="accent-green">{{OLYMPUS_VERSION_NUMBER}}</div>
|
||||
</div>
|
||||
<div class="link first" data-link="https://github.com/Pax1601/DCSOlympus">GitHub</div>
|
||||
<div class="link" data-link="https://discord.gg/pCfCykAdrw">Discord</div>
|
||||
</div>
|
||||
<div id="loader" class="manager-page hide">
|
||||
Loading, please wait...
|
||||
</div>
|
||||
<div id="grayout" class="hide"></div>
|
||||
<div id="popup" class="hide">
|
||||
<img src="./icons/triangle-exclamation-solid.svg" class="error">
|
||||
<img src="./icons/circle-question-regular.svg" class="confirm">
|
||||
<img src="./icons/spinner-solid.svg" class="wait">
|
||||
<div class="content">
|
||||
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="button accept-popup"> Accept </div>
|
||||
<div class="button close-popup"> Close </div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
document.querySelector('.minimize').addEventListener('click', () => {
|
||||
window.ipcRender.send('window:minimize');
|
||||
});
|
||||
|
||||
document.querySelector('.restore').addEventListener('click', () => {
|
||||
window.ipcRender.send('window:restore');
|
||||
});
|
||||
|
||||
document.querySelector('.maximize').addEventListener('click', () => {
|
||||
window.ipcRender.send('window:maximize');
|
||||
});
|
||||
|
||||
document.querySelector('.close').addEventListener('click', () => {
|
||||
window.ipcRender.send('window:close');
|
||||
});
|
||||
|
||||
window.ipcRender.receive('event:maximized', () => {
|
||||
document.querySelector('.restore').classList.remove("hide");
|
||||
document.querySelector('.maximize').classList.add("hide");
|
||||
})
|
||||
|
||||
window.ipcRender.receive('event:unmaximized', () => {
|
||||
document.querySelector('.restore').classList.add("hide");
|
||||
document.querySelector('.maximize').classList.remove("hide");
|
||||
})
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@ -1,69 +0,0 @@
|
||||
const electronApp = require('electron').app;
|
||||
const electronBrowserWindow = require('electron').BrowserWindow;
|
||||
const electronIpcMain = require('electron').ipcMain;
|
||||
const path = require('path');
|
||||
|
||||
let window;
|
||||
|
||||
/* Add the System32 folder to the environment for the shortcuts creation to work properly */
|
||||
process.env['PATH'] = process.env['PATH'] + "%WINDIR%\\System32;"
|
||||
|
||||
function createWindow() {
|
||||
const window = new electronBrowserWindow({
|
||||
width: 1500,
|
||||
height: 850,
|
||||
frame: false,
|
||||
resizable: true,
|
||||
maximizable: true,
|
||||
webPreferences: {
|
||||
contextIsolation: true,
|
||||
preload: path.join(__dirname, "javascripts", 'preload.js'),
|
||||
nodeIntegration: true,
|
||||
},
|
||||
icon: "./../img/olympus_configurator.ico"
|
||||
});
|
||||
|
||||
window.loadFile('index.html').then(() => { window.show(); });
|
||||
|
||||
window.on("maximize", () => {
|
||||
window.webContents.send('event:maximized')
|
||||
})
|
||||
|
||||
window.on("unmaximize", () => {
|
||||
window.webContents.send('event:unmaximized')
|
||||
})
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
electronApp.on('ready', () => {
|
||||
window = createWindow();
|
||||
});
|
||||
|
||||
electronApp.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
electronApp.quit();
|
||||
}
|
||||
});
|
||||
|
||||
electronApp.on('activate', () => {
|
||||
if (electronBrowserWindow.getAllWindows().length === 0) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
||||
|
||||
electronIpcMain.on('window:minimize', () => {
|
||||
window.minimize();
|
||||
})
|
||||
|
||||
electronIpcMain.on('window:maximize', () => {
|
||||
window.maximize();
|
||||
})
|
||||
|
||||
electronIpcMain.on('window:restore', () => {
|
||||
window.restore();
|
||||
})
|
||||
|
||||
electronIpcMain.on('window:close', () => {
|
||||
window.close();
|
||||
})
|
||||
@ -1 +0,0 @@
|
||||
CreateObject("Wscript.Shell").Run "npm start", 0
|
||||
@ -1,26 +0,0 @@
|
||||
{
|
||||
"name": "dcsolympus_manager",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"start": "electron .",
|
||||
"build-release": "call ./scripts/build-release.bat"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.10",
|
||||
"create-desktop-shortcuts": "^1.10.1",
|
||||
"dir-compare": "^4.2.0",
|
||||
"ejs": "^3.1.9",
|
||||
"electron": "^28.0.0",
|
||||
"find-process": "^1.4.7",
|
||||
"follow-redirects": "^1.15.4",
|
||||
"octokit": "^3.1.2",
|
||||
"portfinder": "^1.0.32",
|
||||
"regedit": "^5.1.2",
|
||||
"sha256": "^0.2.0",
|
||||
"win-version-info": "^6.0.1"
|
||||
}
|
||||
}
|
||||
@ -3,4 +3,4 @@ echo D|xcopy /Y /S /E .\ejs ..\build\manager\ejs
|
||||
echo D|xcopy /Y /S /E .\javascripts ..\build\manager\javascripts
|
||||
echo D|xcopy /Y /S /E .\stylesheets ..\build\manager\stylesheets
|
||||
|
||||
echo F|xcopy /Y /I .\*.* .\build\manager
|
||||
echo F|xcopy /Y /I .\*.* ..\build\manager
|
||||
@ -12,7 +12,7 @@ REM copy the hooks script
|
||||
echo F|xcopy /Y .\scripts\lua\hooks\OlympusHook.lua .\package\Scripts\OlympusHook.lua
|
||||
|
||||
REM copy the lua scripts
|
||||
echo F|xcopy /Y .\scripts\lua\backend .\package\mod\scripts
|
||||
echo D|xcopy /Y /S /E .\scripts\lua\backend .\package\mod\scripts
|
||||
|
||||
REM copy the mod folder
|
||||
echo D|xcopy /Y /S /E .\mod .\package\mod
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user