Use Locate to find openssl command #1982
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SparkleShare uses several comandline tools to provide functionality. While working on the windows version i saw that openssl was hard coded and sparkleshare expects that openssl is in the path. This is not always given.
So i derived from Command an new Openssl command and use the Locate function to locate the command. In linux and macOS it is located under /usr/bin which is in the searchpath of Locate.
I also added a call to the version check of it to the base controller, so if it is not installed SparkleShare will exit and write a crash_report.txt.
For macOS and linux only an additional line in the logfile will appear:
For macOS
Environment | LibreSSL 2.8.3
And for Linux
Environment | OpenSSL 1.1.1j
I also enquoted the call of openssl in "" which is a platform independent way to deal with spaces in path.
The goal of this merge request is to tear the monstrous
feature/WindowsBuild
pull request in smaller parts, so that there remains only a few changes which are easier to catch.