JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.62k stars 2.58k forks source link

native-messaging-host files are missing when installing JabRef via brew #8161

Open sdall opened 3 years ago

sdall commented 3 years ago

Installing JabRefs .dmg release from GitHub (via brew) does not create the required native-messaging-host/* files as part of the postinstall script.

Would it be possible to perform the necessary post installation step as part of the installation of the add-ons?

Thank You!

tobiasdiez commented 3 years ago

Transferred to main repo (as its an issue with the setup script). Maybe @Siedlerchr or @LyzardKing have an idea.

Siedlerchr commented 3 years ago

Hi, I think the postinstall script only works if you use the pkg installer. If you use the dmg alone it's not possible

LyzardKing commented 3 years ago

Yes, the dmg cannot run a postinstall script (or anything similar). An alternative idea could be to add an installer just for the native-messaging files.. but I'm not sure about it. It might bring more confusion than anything else

sdall commented 3 years ago

My work around was to manually copy the necessary file into the corresponding path of my home directory, i.e.,

cp /Applications/JabRef.app/Contents/Resources/native-messaging-host/firefox/org.jabref.jabref.json $HOME/Library/Application\ Support/Mozilla/NativeMessagingHosts/org.jabref.jabref.json

As this worked out well, I thought that it might be possible perform these steps as part of the installation of the browser add-on. However, I cannot tell whether this is actually possible.

tobiasdiez commented 3 years ago

That's sadly not possible due to security concerns (otherwise addons could run any kind of scripts on your computer).

I think the best would be to fix the brew installer to use pkg instead of the dmg (or run our postinstall script).

LyzardKing commented 3 years ago

I think that brew could use the postinstall script anyway... it could fetch it from github and launch it after having copied the files from the dmg