rlancaste / stellarsolver

GNU General Public License v3.0
88 stars 47 forks source link

Detect ASTAP also in /usr/bin #105

Closed paolostivanin closed 2 years ago

paolostivanin commented 2 years ago

On some distro (openSUSE, Fedora, etc), ASTAP is packaged so that it's installed on /usr/bin. This commit add support for detecting ASTAP in the aforementioned location.

rlancaste commented 2 years ago

In looking at your code, it looks like you are overwriting the astap path with a new default path. In order to make this work, you would need another check to see if it exists at this other path location.

rlancaste commented 2 years ago

The path variable here is not the PATH environment variable, or a list of paths to search, but a part of a struct of default paths to different programs.

paolostivanin commented 2 years ago

Thanks, you're right! Is it better now?

rlancaste commented 2 years ago

I think what you are looking for is:

if(QFile("/usr/bin/astap").exists()) not QFile("/usr/bin/astap").exists()) ?