diff --git a/apps/server/src/utilities/systray.service.ts b/apps/server/src/utilities/systray.service.ts index 091c483f..67615466 100644 --- a/apps/server/src/utilities/systray.service.ts +++ b/apps/server/src/utilities/systray.service.ts @@ -4,6 +4,7 @@ import { hideConsole, showConsole } from 'node-hide-console-window'; import open = require('open'); import SysTray, { MenuItem } from 'systray2'; import { join } from 'path'; +import { getExecutablePath } from 'apps/server/src/utilities/pathUtil'; import { NetworkService } from './network.service'; import serverConfig from '../config/server.config'; import { ShutDownService } from './shutdown.service'; @@ -33,7 +34,7 @@ export class SysTrayService implements OnApplicationShutdown { this.exitItem, ], }, - copyDir: true, + copyDir: getExecutablePath(), }); this.sysTray.onClick((action) => { diff --git a/package.json b/package.json index 8f561014..3ae167e0 100644 --- a/package.json +++ b/package.json @@ -24,14 +24,12 @@ "install:exec": "node doExe.mjs && npm run copy:deps && npm run build:package", "copy:deps": "npm run copy:resources && npm run copy:modules && copyfiles -s -f LICENSE build && npm run fetch:terrain", "copy:resources": "copyfiles -s -f apps/server/src/config/properties.json ./node_modules/pdf-to-printer/dist/SumatraPDF.exe build/resources", - "copy:modules": "npm run copy:traybin && npm run copy:pdfjs && npm run copy:nodehide && npm run copy:sharp && npm run copy:simconnect && npm run copy:open", - "copy:traybin": "copyfiles -s -f ./node_modules/systray2/traybin/tray_windows_release.exe build/traybin && copyfiles -s -f \"node_modules/systray2/**/*.*\" build/node_modules/systray2", + "copy:modules": "npm run copy:pdfjs && npm run copy:nodehide && npm run copy:sharp && npm run copy:open", "copy:pdfjs": "copyfiles -s -f \"node_modules/pdfjs-dist/build/**/*.*\" build/node_modules/pdfjs-dist/build && npm run copy:pdfjs:fonts && npm run copy:pdfjs:cmaps", "copy:pdfjs:fonts": "copyfiles -s -f \"node_modules/pdfjs-dist/standard_fonts/**/*.*\" build/node_modules/pdfjs-dist/standard_fonts", "copy:pdfjs:cmaps": "copyfiles -s -f \"node_modules/pdfjs-dist/cmaps/**/*.*\" build/node_modules/pdfjs-dist/cmaps", "copy:nodehide": "copyfiles -s -f \"node_modules/node-hide-console-window/build/Release/**/*\" build/node_modules/node-hide-console-window/build/Release", "copy:sharp": "copyfiles -s -f \"node_modules/sharp/build/Release/**/*\" build/node_modules/sharp/build/Release", - "copy:simconnect": "copyfiles -s -f simconnect/SimConnect.dll build", "copy:open": "copyfiles -s -f \"node_modules/open/xdg-open\" build/node_modules/open", "fetch:terrain": "node scripts/terrain.js", "start": "nest start server", @@ -202,6 +200,7 @@ "node_modules/bit-twiddle/**/*.*", "node_modules/@flybywiresim/msfs-nodejs/**/*.*", "node_modules/es-get-iterator/**/*.*", + "/node_modules/systray2/traybin/*.exe", "dist/mcdu/**/*", "dist/assets/**/*", "dist/terrain/mapdata/**/*.*", diff --git a/scripts/fragment.js b/scripts/fragment.js index ebe8bbb6..a2386b04 100644 --- a/scripts/fragment.js +++ b/scripts/fragment.js @@ -16,10 +16,6 @@ const execute = async () => { name: 'dependencies', sourceDir: './node_modules', }, - { - name: 'traybin', - sourceDir: './traybin', - }, { name: 'terrain', sourceDir: './terrain', diff --git a/simconnect/LICENSE b/simconnect/LICENSE deleted file mode 100644 index 31f87905..00000000 --- a/simconnect/LICENSE +++ /dev/null @@ -1,4 +0,0 @@ -The SimConnect.dll is part of the MSFS SDK published by Microsoft. - -The EULA for the MSFS SDK and the SimConnect.dll can be found here: -https://docs.flightsimulator.com/html/Introduction/SDK_EULA.htm diff --git a/simconnect/SimConnect.dll b/simconnect/SimConnect.dll deleted file mode 100644 index bd88ec19..00000000 Binary files a/simconnect/SimConnect.dll and /dev/null differ