aclap-dev / vdhcoapp

Companion application for Video DownloadHelper browser add-on
GNU General Public License v2.0
1.72k stars 280 forks source link

Fix Edge autoinstall path on Darwin #108

Closed rfrowe closed 1 year ago

rfrowe commented 2 years ago

The Darwin installer installs to $HOME/Library/Application Support/Microsoft Edge/NativeMessagingHosts/... for user but /Library/Microsoft/Edge/NativeMessagingHosts/... for system. Something seems wrong there.

This is further corroborated by the uninstaller attempting to delete /Library/Application Support/Microsoft Edge/NativeMessagingHosts/... in system mode. This isn't going to do anything as the installer will never create anything at that path. Either the installer is creating the wrong system path or the uninstaller is uninstaller is deleting the wrong system path. I'm going to assume the former.

mi-g commented 2 years ago

I took the details from there where it specifies /Library/Microsoft/Edge/NativeMessagingHosts/com.my_company.my_app.json for system installs and ~/Library/Application Support/Microsoft Edge {Channel_Name}/NativeMessagingHosts/com.my_company.my_app.json for user setup but i agree it's not logical. As soon as i have some time i make the tests and merge your PR. You may want to submit a PR to the Edge developer docs repository too. Many thanks for your submission.

rfrowe commented 2 years ago

I see. I'm not necessarily saying which is correct and from my interpretation of that page, it does seem that the system and user library paths are different. My point is that this code creates path A on install and deletes path B on uninstall. Therefore A will never be deleted and B will never exist. Either both should be A or both should be B.

Based on what you've said, it seems both should be /Library/Microsoft/Edge/NativeMessagingHosts/... not /Library/Application Support/Microsoft Edge/NativeMessagingHosts/.... I did the opposite so I'll update my MR to reflect this.

paulrouget commented 1 year ago

This is fixed in master. This should be available in the next release.