Merge pull request #801 from Pax1601/manager-wizard

Manager wizard
This commit is contained in:
Pax1601 2024-01-04 13:04:10 +01:00 committed by GitHub
commit 1ab8e9a16f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
181 changed files with 18560 additions and 176651 deletions

25
.gitignore vendored
View File

@ -1,31 +1,32 @@
bin
.vs
x64
/src/vcpkg_installed
*.user
Output
*.aps
node_modules
hgt
/backend/vcpkg_installed
/client/TODO.txt
/client/public/javascripts/bundle.js
!client/bin
/client/public/plugins
/client/plugins/controltips/index.js
hgt
/client/public/databases/units/old
/client/plugins/databasemanager/index.js
/src/html
/src/latex
client/public/stylesheets/leaflet/leaflet-gesture-handling.css
client/public/javascripts/leaflet.nauticscale.js
client/public/javascripts/L.Path.Drag.js
/installer/archive/Scripts
/installer/archive/Mods
/installer/installer/DCSOlympus*.exe
/package
/build
/DCS Olympus backups
*.user
*.aps
L.Path.Drag.js
leaflet-gesture-handling.css
leaflet.nauticscale.js
package-lock.json
/package
!client/bin

View File

@ -7,27 +7,51 @@
__/ | | |
|___/ |_|
v{{OLYMPUS_VERSION_NUMBER}}
{{OLYMPUS_VERSION_NUMBER}}
==========================================
INSTALLATION INSTRUCTIONS
1) Close any applications which may interfere with installation, including Digital Combat Simulator (DCS) and previous versions of Olympus.
2) If you DO NOT have Olympus already installed, SKIP THIS STEP. If you have already installed Olympus, do the following:
NOTE: If you made any changes to your unit databases or mods.lua file (e.g. to support a third party mod) make a backup of the edited files before proceeding or changes will be lost;
a) If you installed DCS Olympus v1.0.3 using the installer, simply remove it using Windows's "Add or remove programs" application.
b) If you installed DCS Olympus v1.0.3 using the archived version, remove it by deleting the "...<DCS Saved Games folder>\Mods\Services\Olympus" folder. Do this for every DCS instance you installed Olympus in.
Remember to delete any shortcuts you created. Don't worry, they will be created automatically again by the installation script provided in this package
Remember to delete any shortcuts you created. Don't worry, they will be created automatically again by the installation script provided in this package.
3) Execute the "install.bat" script by double-clicking on it. Wait for the installation script to complete.
NOTE: depending on your Windows configuration, the script may be called "install" (without .bat at the end).
3) Extract all the contents of the DCS Olympus {{OLYMPUS_VERSION_NUMBER}} archive in your "Saved Games" folder (NOTE: not your DCS Saved Games folder).
NOTE: Unlike previous version of Olympus, it is no longer necessary to copy the archived files into each DCS instance folder.
4) The new Olympus Manager will open. This will allow you to add/remove Olympus to individual DCS installations.
3) Execute the "installer.bat" script by double-clicking on it. Wait for the installation script to complete. Installation may take a couple of minutes, after which the Manager will start automatically.
NOTE: depending on your Windows configuration, the script may be called "installer" (without .bat at the end).
4) The Olympus Manager will open. This will allow you to add/remove Olympus to individual DCS instances.
Use the Olympus Manager and follow the instructions to install and setup Olympus.
5) Start DCS and run a mission. Make sure it is UNPAUSED.
6) Open Olympus via the shortcut and login using any username and the Gamemaster password set using the configurator.
Local installation: run the client from the provided shortcut, or visit "http://localhost:3000/" in a web browser (Google Chrome recommended).
Dedicated server: users must first start the Olympus server, then log in using any browser and visiting "http:\\<server IP>:<backend port>" (backend port is 3001 by default)
6) Open Olympus via the shortcut and login using any username and the Game Master password set using the Manager. (NOTE: not your DCS server password).
Local installation: run the client from the provided desktop shortcut or start it using the "View and manage instances" page of the Manager.
Dedicated server: users must first start the Olympus server from the provided desktop shortcut or using the "View and manage instances" page of the Manager.
Then log in using any browser and visiting "http:\\<server IP>:<client port>" (client port is 3000 by default, but can be edited using the Manager)
7) You can use the manager at any time to change the ports and/or passwords. If you do, REMEMBER TO RESTART OLYMPUS AND DCS.
NOTES:
a) when launching the Manager you will be prompted to allow Electron to create a firewall rule. This is optional and can be denied without effect on the operation of the Manager;
b) if you are using Olympus on a dedicated server with a router, you must enable port forwarding on the client port (3000 by default);
c) unlike Olympus v1.0.3, running the netsh command is no longer required. It is also no longer required to create firewall rules or port forwarding for the backend port. (Optional) If you already performed this steps in the past you can delete the firewall and netsh rules.
==========================================
UPDATING INSTRUCTIONS
IF YOU ARE UPDATING FROM DCS OLYMPUS v1.0.3, FOLLOW THE "INSTALLATION INSTRUCTIONS".
To update your Olympus installation you have two options:
a) download the new archive from the GitHub releases page, delete the old unpacked archive folder, then follow the INSTALLATION INSTRUCTIONS;
b) run the Olympus Manager. If an update is available you will be given the option to automatically update Olympus from there.
For either options a) or b), remember to close any applications which may interfere with installation, including Digital Combat Simulator (DCS) and previous versions of Olympus.

View File

@ -61,7 +61,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,0
FILEVERSION 1,0,4,0
PRODUCTVERSION 1,0,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "DCS Olympus"
VALUE "FileDescription", "DCS Olympus"
VALUE "FileVersion", "1.0.3.0"
VALUE "FileVersion", "1.0.4.0"
VALUE "InternalName", "core.dll"
VALUE "LegalCopyright", "Copyright (C) 2023"
VALUE "OriginalFilename", "core.dll"
VALUE "ProductName", "DCS Olympus"
VALUE "ProductVersion", "1.0.3.0"
VALUE "ProductVersion", "1.0.4.0"
END
END
BLOCK "VarFileInfo"

View File

@ -110,26 +110,26 @@
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>.\..\..\bin\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>.\..\..\bin\</OutDir>
<OutDir>.\..\..\build\backend\bin\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@ -212,4 +212,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -61,7 +61,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,0
FILEVERSION 1,0,4,0
PRODUCTVERSION 1,0,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "DCS Olympus"
VALUE "FileDescription", "DCS Olympus"
VALUE "FileVersion", "1.0.3.0"
VALUE "FileVersion", "1.0.4.0"
VALUE "InternalName", "dcstools.dll"
VALUE "LegalCopyright", "Copyright (C) 2023"
VALUE "OriginalFilename", "dcstools.dll"
VALUE "ProductName", "DCS Olympus"
VALUE "ProductVersion", "1.0.3.0"
VALUE "ProductVersion", "1.0.4.0"
END
END
BLOCK "VarFileInfo"

View File

@ -77,23 +77,23 @@
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>.\..\..\bin\</OutDir>
<OutDir>.\..\..\build\backend\bin\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@ -172,4 +172,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -61,7 +61,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,0
FILEVERSION 1,0,4,0
PRODUCTVERSION 1,0,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "DCS Olympus"
VALUE "FileDescription", "DCS Olympus"
VALUE "FileVersion", "1.0.3.0"
VALUE "FileVersion", "1.0.4.0"
VALUE "InternalName", "logger.dll"
VALUE "LegalCopyright", "Copyright (C) 2023"
VALUE "OriginalFilename", "logger.dll"
VALUE "ProductName", "DCS Olympus"
VALUE "ProductVersion", "1.0.3.0"
VALUE "ProductVersion", "1.0.4.0"
END
END
BLOCK "VarFileInfo"

View File

@ -76,23 +76,23 @@
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>.\..\..\bin\</OutDir>
<OutDir>.\..\..\build\backend\bin\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@ -169,4 +169,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -61,7 +61,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,0
FILEVERSION 1,0,4,0
PRODUCTVERSION 1,0,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "DCS Olympus"
VALUE "FileDescription", "DCS Olympus"
VALUE "FileVersion", "1.0.3.0"
VALUE "FileVersion", "1.0.4.0"
VALUE "InternalName", "luatools.dll"
VALUE "LegalCopyright", "Copyright (C) 2023"
VALUE "OriginalFilename", "luatools.dll"
VALUE "ProductName", "DCS Olympus"
VALUE "ProductVersion", "1.0.3.0"
VALUE "ProductVersion", "1.0.4.0"
END
END
BLOCK "VarFileInfo"

View File

@ -60,23 +60,23 @@
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>.\..\..\bin\</OutDir>
<OutDir>.\..\..\build\backend\bin\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@ -173,4 +173,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -61,7 +61,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,0
FILEVERSION 1,0,4,0
PRODUCTVERSION 1,0,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "DCS Olympus"
VALUE "FileDescription", "DCS Olympus"
VALUE "FileVersion", "1.0.3.0"
VALUE "FileVersion", "1.0.4.0"
VALUE "InternalName", "olympus.dll"
VALUE "LegalCopyright", "Copyright (C) 2023"
VALUE "OriginalFilename", "olympus.dll"
VALUE "ProductName", "DCS Olympus"
VALUE "ProductVersion", "1.0.3.0"
VALUE "ProductVersion", "1.0.4.0"
END
END
BLOCK "VarFileInfo"

View File

@ -62,11 +62,11 @@
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DCSOlympus.props" />
<Import Project="..\DCSOlympus.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -75,7 +75,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>.\..\..\bin\</OutDir>
<OutDir>.\..\..\build\backend\bin\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
@ -127,4 +127,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -61,7 +61,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,0
FILEVERSION 1,0,4,0
PRODUCTVERSION 1,0,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "DCS Olympus"
VALUE "FileDescription", "DCS Olympus"
VALUE "FileVersion", "1.0.3.0"
VALUE "FileVersion", "1.0.4.0"
VALUE "InternalName", "utils.dll"
VALUE "LegalCopyright", "Copyright (C) 2023"
VALUE "OriginalFilename", "utils.dll"
VALUE "ProductName", "TODO: <Product name>"
VALUE "ProductVersion", "1.0.3.0"
VALUE "ProductVersion", "1.0.4.0"
END
END
BLOCK "VarFileInfo"

View File

@ -85,7 +85,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>.\..\..\bin\</OutDir>
<OutDir>.\..\..\build\backend\bin\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>.\..\..\bin\$(Platform)\$(Configuration)\</OutDir>

View File

@ -1,24 +0,0 @@
call node increase_version.js
cd src
msbuild olympus.sln /t:Build /p:Configuration=Release
cd ..
cd client
rmdir /s /q "hgt"
call npm install
call npm run copy
call npm run emit-declarations
call npm run build-release
cd "plugins\controltips"
call npm install
call npm run build-release
cd "..\.."
cd "plugins\databasemanager"
call npm install
call npm run build-release
cd "..\.."
cd..

View File

@ -1,2 +1,2 @@
call build.bat
call package.bat
call .\scripts\batch\build.bat
call .\scripts\batch\package.bat

View File

@ -7,7 +7,7 @@
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"name": "Launch Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/public/",
"sourceMapPathOverrides": {
@ -15,6 +15,18 @@
},
"preLaunchTask": "server",
"port": 9222
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome (No DCS)",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/public/",
"sourceMapPathOverrides": {
"src/*": "${workspaceFolder}/src/*"
},
"preLaunchTask": "server-nodcs",
"port": 9222
}
]
}

View File

@ -8,6 +8,12 @@
"type": "shell",
"command": "npm run debug",
"isBackground": true
},
{
"label": "server-nodcs",
"type": "shell",
"command": "npm run debug-nodcs",
"isBackground": true
}
]
}

View File

@ -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;

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');

View File

@ -1,4 +0,0 @@
echo F|xcopy /S /Q /Y /F .\\node_modules\\leaflet\\dist\\leaflet.css .\\public\\stylesheets\\leaflet\\leaflet.css
echo F|xcopy /S /Q /Y /F .\\node_modules\\leaflet-gesture-handling\\dist\\leaflet-gesture-handling.css .\\public\\stylesheets\\leaflet\\leaflet-gesture-handling.css
echo F|xcopy /S /Q /Y /F .\\node_modules\\leaflet.nauticscale\\dist\\leaflet.nauticscale.js .\\public\\javascripts\\leaflet.nauticscale.js
echo F|xcopy /S /Q /Y /F .\\node_modules\\leaflet-path-drag\\dist\\L.Path.Drag.js .\\public\\javascripts\\L.Path.Drag.js

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
npm install --omit=dev

View File

@ -1,18 +1,16 @@
{
"name": "DCSOlympus",
"node-main": "./bin/www",
"main": "client.js",
"version": "{{OLYMPUS_VERSION_NUMBER}}",
"private": true,
"scripts": {
"build": "browserify .\\src\\index.ts --debug -o .\\public\\javascripts\\bundle.js -t [ babelify --global true --presets [ @babel/preset-env ] --extensions '.js'] -p [ tsify --noImplicitAny ] && copy.bat",
"build-release": "browserify .\\src\\index.ts -o .\\public\\javascripts\\bundle.js -t [ babelify --global true --presets [ @babel/preset-env ] --extensions '.js'] -p [ tsify --noImplicitAny ] && copy.bat",
"build-release-linux": "browserify ./src/index.ts -o ./public/javascripts/bundle.js -t [ babelify --global true --presets [ @babel/preset-env ] --extensions '.js'] -p [ tsify --noImplicitAny ] && ./copy.sh",
"emit-declarations": "tsc --project tsconfig.json --declaration --emitDeclarationOnly --outfile ./@types/olympus/index.d.ts",
"copy": "copy.bat",
"start": "node ./bin/www",
"debug": "npm run copy & concurrently --kill-others \"npm run watch\" \"nodemon --ignore ./public/databases/ ./bin/www -- --config ../moc_dcs/Config/olympus.json\"",
"watch": "watchify .\\src\\index.ts --debug -o .\\public\\javascripts\\bundle.js -t [ babelify --global true --presets [ @babel/preset-env ] --extensions '.js'] -p [ tsify --noImplicitAny ]",
"build-debug": "call ./scripts/build-debug.bat",
"build-release": "call ./scripts/build-release.bat",
"emit-declarations": "call ./scripts/emit-declarations.bat",
"server": "node ./bin/www",
"debug": "call ./scripts/debug.bat",
"debug-nodcs": "call ./scripts/debug-nodcs.bat",
"watch": "call ./scripts/watch.bat",
"client": "electron ."
},
"dependencies": {
@ -28,7 +26,6 @@
"js-sha256": "^0.10.1",
"morgan": "~1.9.1",
"open": "^10.0.0",
"prompt-sync": "^4.2.0",
"regedit": "^5.1.2",
"save": "^2.9.0",
"sha256": "^0.2.0",

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,8 @@ module.exports = function (databasesLocation) {
const path = require("path");
router.get('/:type/:name', function (req, res) {
console.log(req.params.database)
var contents = fs.readFileSync(path.join(databasesLocation, req.params.type, req.params.name + ".json"));
res.status(200).send(contents);
});
router.put('/save/:type/:name', function (req, res) {

View File

@ -0,0 +1,4 @@
cd scripts
call copy.bat
cd ..
call browserify ./src/index.ts --debug -o ./public/javascripts/bundle.js -t [ babelify --global true --presets [ @babel/preset-env ] --extensions '.js'] -p [ tsify --noImplicitAny ]

View File

@ -0,0 +1,15 @@
cd scripts
call copy.bat
cd ..
call browserify ./src/index.ts -o ./public/javascripts/bundle.js -t [ babelify --global true --presets [ @babel/preset-env ] --extensions '.js'] -p [ tsify --noImplicitAny ]
echo D|xcopy /Y /S /E .\bin ..\build\client\bin
echo D|xcopy /Y /S /E .\public ..\build\client\public
echo D|xcopy /Y /S /E .\routes ..\build\client\routes
echo D|xcopy /Y /S /E .\views ..\build\client\views
echo F|xcopy /Y .\app.js ..\build\client\app.js
echo F|xcopy /Y .\client.js ..\build\client\client.js
echo F|xcopy /Y .\package.json ..\build\client\package.json
echo F|xcopy /Y /I .\*.vbs ..\build\client

6
client/scripts/copy.bat Normal file
View File

@ -0,0 +1,6 @@
cd ..
echo F|xcopy /Y .\node_modules\leaflet\dist\leaflet.css .\public\stylesheets\leaflet\leaflet.css
echo F|xcopy /Y .\node_modules\leaflet-gesture-handling\dist\leaflet-gesture-handling.css .\public\stylesheets\leaflet\leaflet-gesture-handling.css
echo F|xcopy /Y .\node_modules\leaflet.nauticscale\dist\leaflet.nauticscale.js .\public\javascripts\leaflet.nauticscale.js
echo F|xcopy /Y .\node_modules\leaflet-path-drag\dist\L.Path.Drag.js .\public\javascripts\L.Path.Drag.js
cd scripts

View File

@ -0,0 +1,6 @@
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\""

3
client/scripts/debug.bat Normal file
View File

@ -0,0 +1,3 @@
@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

@ -0,0 +1 @@
tsc --project tsconfig.json --declaration --emitDeclarationOnly --outfile ./@types/olympus/index.d.ts

1
client/scripts/watch.bat Normal file
View File

@ -0,0 +1 @@
watchify ./src/index.ts --debug -o ./public/javascripts/bundle.js -t [ babelify --global true --presets [ @babel/preset-env ] --extensions '.js'] -p [ tsify --noImplicitAny ]

View File

@ -1 +1 @@
CreateObject("Wscript.Shell").Run "npm run start -- --config """&WScript.Arguments(0)&"""", 1
CreateObject("Wscript.Shell").Run "npm run server -- --config """&WScript.Arguments(0)&"""", 1

View File

@ -1,11 +1,10 @@
import { getApp } from "../..";
import { GAME_MASTER } from "../../constants/constants";
import { UnitBlueprint } from "../../interfaces";
import { UnitDatabase } from "./unitdatabase"
export class AircraftDatabase extends UnitDatabase {
constructor() {
super('databases/units/aircraftdatabase.json');
super('api/databases/units/aircraftdatabase');
}
getCategory() {

View File

@ -4,7 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
export class GroundUnitDatabase extends UnitDatabase {
constructor() {
super('databases/units/groundunitdatabase.json');
super('api/databases/units/groundunitdatabase');
}
getSpawnPointsByName(name: string) {

View File

@ -4,7 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
export class HelicopterDatabase extends UnitDatabase {
constructor() {
super('databases/units/helicopterdatabase.json');
super('api/databases/units/helicopterdatabase');
}
getSpawnPointsByName(name: string) {

View File

@ -4,7 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
export class NavyUnitDatabase extends UnitDatabase {
constructor() {
super('databases/units/navyunitdatabase.json');
super('api/databases/units/navyunitdatabase');
}
getSpawnPointsByName(name: string) {

Some files were not shown because too many files have changed in this diff Show More