Use Locate to find openssl command#1982
Conversation
0eee573 to
7681312
Compare
…into feature/LocateOpenSSL
|
@hbons Is there any change to get the Locate pull requests merged? Unfortunatly the windows version can't handle the path issue without changing common files. I 've choosen this way because Command.cs provided the Locate function and used it only for the git command. An other way would be to extend only the searchpath of the Process.Start call. But with this approach a check of all external programms at startup would not be that easy. Please let me know what needs to be changed or explained that a merge becomes possible. |
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.3And for Linux
Environment | OpenSSL 1.1.1jI 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/WindowsBuildpull request in smaller parts, so that there remains only a few changes which are easier to catch.