helloSystem / launch

Command line tool to launch applications, will search for .app bundles and .AppDir directories in various directories, and will show launch errors in the GUI
BSD 2-Clause "Simplified" License
16 stars 6 forks source link

[Feature] AppImage Version Detection and Handling Multiples. #12

Open xaoseric opened 3 years ago

xaoseric commented 3 years ago

As per #10, this is the proposed way for detecting .AppImage versions. Putting this here so we can gather feedback on it. The current implementation currently matches for files with the .AppImage suffix.

So thinking about it again maybe we could do something much simpler which would cover at least >80% of cases:

  1. Look for files with the .AppImage suffix
  2. If there are at least 2 - characters in the filename, remove everything behind the second-last - character from the filename
  3. there is only one - character in the filename, remove everything behind the -
  4. Replace _ with
  5. Compare the result against what the user wants to launch to determine whether we have a candidate
  6. If there are at least 2 - characters in the filename, assume that what is between the first and second - is the version; this will be needed to decide amongst several candidates (to pick the latest version)