hbons / SparkleShare

Share and collaborate by syncing with any Git repository instantly. Linux, macOS, and Windows.
https://sparkleshare.org
Other
4.88k stars 577 forks source link

Use Locate to find openssl command #1982

Open uenz opened 2 years ago

uenz commented 2 years ago

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.

uenz commented 2 years ago

@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. My goal is still to see awindows installer file version 2.3x on the sparkle share page. ;-) I could also provide a github actions script to build the macOS, Linux and Windows executables. Unfortunately it was not possible to extend the travis-ci, because the system images thete are to old.