Open Lucky38i opened 2 years ago
https://github.com/felixhao28/node-systray/blob/master/index.ts#L95:L122
This is how node-systray finds the tray_windows.exe. Generally speaking, it will search for "traybin\tray_windows.exe" under current working directory and the script's location. The location is hard-coded for the time-being.
Hi @felixhao28 Sorry for the delay. I'm getting this error reported from other users
The executables are external resources that need a customized building step. Typically, you need to find the "tray_windows_release.exe" (in Windows), and copy it into your final distributable package. When unpacked on users' computer, you need to make sure the install program copies the "tray_windows_release.exe" into the 'traybin" folder.
I am not sure what "adding the executable as an asset" means. In my case with Webpack, I use "webpack-copy-plugin" to ensure the output folder contains a copy of the "tray_xxxx_release" executable.
In case someone finds this later, the fix is to add "assets": "node_modules/systray2/traybin/tray_windows_release.exe"
to pkg in your package.json
It works great when building locally with PKG and running the .exe in my repo folder however using GHA to build releases I'm getting startup errors of failing to find the tray_windows.exe. I've tried adding the executable as an asset but getting the same error. Any ideas?