diff --git a/INSTRUCTIONS.txt b/INSTRUCTIONS.txt index f05b761d..edbc3169 100644 --- a/INSTRUCTIONS.txt +++ b/INSTRUCTIONS.txt @@ -13,14 +13,21 @@ INSTALLATION INSTRUCTIONS 1) Close any applications which may interfere with installation, including Digital Combat Simulator (DCS) and previous versions of Olympus. -2) If this is your first installation of Olympus, skip this step. If you already installed Olympus, do the following: - 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 \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 :) +2) If you DO NOT have Olympus already installed, SKIP THIS STEP. If you have already installed Olympus, do the following: + 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 "...\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 -3) Execute the "install.bat" script by double-clicking on it. NOTE: depending on your Windows configuration, the script may be called "install" (without .bat at the end); +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). -4) Wait for the installation script to complete. At the end, the new Olympus Manager will be started, that will allow you to add/remove Olympus to your DCS installation. - !!!!IMPORTANT NOTICE!!!!: executing step 3) will install Olympus on your system, but it will not install it in DCS. YOU NEED TO USE THE OLYMPUS MANAGER TO DO THAT! You will find more instructions in the Manager itself. +4) The new Olympus Manager will open. This will allow you to add/remove Olympus to individual DCS installations. + Use the Olympus Manager and follow the instructions to install and setup Olympus. -4) For more information visit the wiki located at https://github.com/Pax1601/DCSOlympus/wiki \ No newline at end of file +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:\\:" (backend port is 3001 by default) + +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. diff --git a/build.bat b/build.bat index 6100e201..48ad13aa 100644 --- a/build.bat +++ b/build.bat @@ -7,6 +7,7 @@ cd .. cd client rmdir /s /q "hgt" call npm install +call npm run copy call npm run emit-declarations call npm run build-release diff --git a/manager/javascripts/preload.js b/manager/javascripts/preload.js index 89831417..38d6238a 100644 --- a/manager/javascripts/preload.js +++ b/manager/javascripts/preload.js @@ -106,7 +106,7 @@ function installOlympus(folder) { console.log(`Installing Olympus in ${folder}`); try { fs.cpSync(path.join("..", "mod"), path.join(folder, "Mods", "Services", "Olympus"), { recursive: true }); - fs.cpSync(path.join("..", "scripts", "OlympusHook.lua"), path.join(folder, "Scripts", "Hook", "OlympusHook.lua")); + fs.cpSync(path.join("..", "scripts", "OlympusHook.lua"), path.join(folder, "Scripts", "Hooks", "OlympusHook.lua")); fs.cpSync(path.join("..", "olympus.json"), path.join(folder, "Config", "olympus.json")); if (createShortcut({ windows: { @@ -143,8 +143,8 @@ function installOlympus(folder) { function uninstallOlympus(folder) { console.log(`Uninstalling Olympus from ${folder}`); try { - fs.rmSync(path.join(folder, "Mods", "Services", "Olympus"), { recursive: true }); - fs.rmSync(path.join(folder, "Config", "olympus.json")); + fs.rmSync(path.join(folder, "Mods", "Services", "Olympus"), { recursive: true, force: true }); + fs.rmSync(path.join(folder, "Config", "olympus.json"), {force: true}); loadDivs(); } catch (e) { console.error(e); diff --git a/package.zip b/package.zip new file mode 100644 index 00000000..ad108ca3 Binary files /dev/null and b/package.zip differ diff --git a/scripts/install.bat b/scripts/install.bat index e588199a..5862d51a 100644 --- a/scripts/install.bat +++ b/scripts/install.bat @@ -50,6 +50,19 @@ echo oLink.Save >> %SCRIPT% cscript /nologo %SCRIPT% del %SCRIPT% +set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs" +echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT% +echo sLinkFile = "%CD%\DCS Olympus Manager.lnk" >> %SCRIPT% +echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT% +echo oLink.TargetPath = "%CD%\manager\manager.vbs" >> %SCRIPT% +echo oLink.WorkingDirectory = "%CD%\manager" >> %SCRIPT% +echo oLink.IconLocation = "%CD%\img\olympus_configurator.ico" >> %SCRIPT% + +echo oLink.Save >> %SCRIPT% + +cscript /nologo %SCRIPT% +del %SCRIPT% + echo All done! This window will close in 5 seconds. It may take a couple of seconds for the Olympus Manager to start, please wait...  timeout /t 5