esl / erlang-osx-installer

Erlang Installer & Auto-Updater for macOS
https://www.erlang-solutions.com/resources/download.html
Apache License 2.0
5 stars 5 forks source link

Make the Application aware of the old version of the installer and remove it if found. #123

Closed kentron closed 6 years ago

kentron commented 7 years ago

This issues presents some problems/questions: The installer complains when trying to delete the folder containing Erlang due lack of privileges.

  1. According to @ https://github.com/beltex/SMCKit/issues/2, using Authorization Services with Swift is broken since: a. AuthorizationExecuteWithPrivileges() is deprecated b. Swift class FileManager has no way to request permissions. c. An alternative is to write a helper via launchd, but doing this will need code signing. (More details here:
    http://stackoverflow.com/questions/6841937/authorizationexecutewithprivileges-is-deprecated) c. It looks like the only way to prompt the user to escalate privileges and without code signing is by using class NSAppleScript as described here: http://stackoverflow.com/questions/6841937/authorizationexecutewithprivileges-is-deprecated using AppleScript. (I tested it and works).

On usability:

  1. The installer is currently checking the presence of the old installer at "first launch". a. Should it be done each time the application launches? ab. Should it prompt only if it's an updated version?

Other approach: a. Should this issue be solved just by just changing the prompt to "A deprecated ESL Erlang installation has been found at /xxx/xx/xx.." and leave the user the decision to manually uninstall the old version?

elbrujohalcon commented 7 years ago

My 2c:

Considering…
I would recommend
Also
If…
Then…
ghost commented 6 years ago

closing out - pending confirmation