EDCD / EDMarketConnector

Downloads commodity market and other station data from the game Elite: Dangerous for use with all popular online and offline trading tools.
GNU General Public License v2.0
986 stars 155 forks source link

[Linux] Script to create/update .desktop file #1041

Open Athanasius opened 3 years ago

Athanasius commented 3 years ago

Ref: https://www.reddit.com/r/EliteDangerous/comments/mtyw2i/prerelease_elite_dangerous_market_connector/gv419wt/?context=3

A .desktop file informs window managers how to launch an application.

Because the EDMC source could be anywhere we can't just supply a static file, we'd need to supply a script that then creates the file.

Athanasius commented 3 years ago

If we're going to this trouble then we should also produce a (Bourne Shell) script for actually running EDMarketConnector.py so as to redirect stdout/err into a log file.

  1. We should append to this logfile to avoid the "I had a bug, but then restarted so now the output is gone" scenario.
  2. But obviously we shouldn't spam to disk...
  3. So before the redirect check the size of the current file and if over a threshold (match what we do for debug log file?) rotate. May as well also match the number of generations for the debug log file.
Athanasius commented 1 year ago

Initially we can probably just provide the .desktop file, referencing merely 'edmarketconnector.sh', and also provide that BUT make it clear that a path in it will need editing to suit the local install.

Athanasius commented 1 year ago

I'm going to go with a static .desktop file that assumes edmarketconnector is in the path and executable. We can worry about how that happens for users separately.

Athanasius commented 1 year ago

The work to have io.edcd.EDMarketConnector.desktop has been merged, along with scripts/linux-setup.sh for ensuring it's in a reasonable location, along with an icon file and edmarketconnector startup shell script as well.

However, this issue should REMAIN OPEN until all of that is in a release and we've updated the Wiki to reflect this.