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?
The old installer had an Uninstaller.tool that can be used to manually uninstall it.
The old installer is certainly not the only way someone can install Erlang/OTP (e.g. brew, compiling from sources, rpm, apt-get, kerl, the list goes on…).
While the old installer installed things in folders with root access / sudo permissions, the new one installs everything in user space.
The new installer is (since we're now modifying the $PATH and not symlinking anymore) already overriding whatever old installation of Erlang/OTP the user might have.
The code to remove the old installer is using something that's deprecated now.
I would recommend
Not to remove the old installer or any other Erlang/OTP versions the user might have installed with whatever tool. Let the user do that on their own.
Also
If…
It's at all possible, without using any deprecated mechanism
It's desired (@francescoc to say here)
It's not super-hard to implement (@kentron to step up for this one)
Then…
Emit a warning popup to the user when the new installer starts saying You have another version of Erlang/OTP installed in your machine. You might want to remove it.
This should be determined not by the presence of the old installer, but by which erl returning something.
Add a preference setting for the user not to be warned about this anymore.
This issues presents some problems/questions: The installer complains when trying to delete the folder containing Erlang due lack of privileges.
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:
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?