From 299032a8f8979b3166efb878c4c69ccf0ae18bd8 Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Wed, 6 Sep 2023 21:47:39 +0200 Subject: [PATCH] Copy browser extension files for mac Fixes https://github.com/JabRef/jabref/issues/10308 --- .github/workflows/deployment-arm64.yml | 4 ++++ .github/workflows/deployment.yml | 4 ++++ .../chromium/org.jabref.jabref.json | 2 +- .../firefox/org.jabref.jabref.json | 7 ++----- buildres/mac/postinstall | 10 +++++----- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deployment-arm64.yml b/.github/workflows/deployment-arm64.yml index 9105597c42f..53463dd71f3 100644 --- a/.github/workflows/deployment-arm64.yml +++ b/.github/workflows/deployment-arm64.yml @@ -109,6 +109,8 @@ jobs: --module-path ${{env.JDK21}}/Contents/Home/jmods/:build/jlinkbase/jlinkjars \ --add-modules org.jabref,org.jabref.merged.module \ --dest build/distribution \ + --app-content buildres/mac/jabrefHost.py \ + --app-content buildres/mac/native-messaging-host \ --name JabRef \ --app-version ${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }} \ --verbose \ @@ -131,6 +133,8 @@ jobs: --module-path ${{env.JDK21}}/Contents/Home/jmods/:build/jlinkbase/jlinkjars \ --add-modules org.jabref,org.jabref.merged.module \ --dest build/distribution \ + --app-content buildres/mac/jabrefHost.py \ + --app-content buildres/mac/native-messaging-host \ --name JabRef \ --app-version ${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }} \ --verbose \ diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 9f0e27108b4..31246a1c034 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -168,6 +168,8 @@ jobs: --module-path ${{env.JDK21}}/Contents/Home/jmods/:build/jlinkbase/jlinkjars \ --add-modules org.jabref,org.jabref.merged.module \ --dest build/distribution \ + --app-content buildres/mac/jabrefHost.py \ + --app-content buildres/mac/native-messaging-host \ --name JabRef \ --app-version ${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }} \ --verbose \ @@ -191,6 +193,8 @@ jobs: --module-path ${{env.JDK21}}/Contents/Home/jmods/:build/jlinkbase/jlinkjars \ --add-modules org.jabref,org.jabref.merged.module \ --dest build/distribution \ + --app-content buildres/mac/jabrefHost.py \ + --app-content buildres/mac/native-messaging-host \ --name JabRef \ --app-version ${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }} \ --verbose \ diff --git a/buildres/mac/native-messaging-host/chromium/org.jabref.jabref.json b/buildres/mac/native-messaging-host/chromium/org.jabref.jabref.json index e07d6237487..a075a368409 100644 --- a/buildres/mac/native-messaging-host/chromium/org.jabref.jabref.json +++ b/buildres/mac/native-messaging-host/chromium/org.jabref.jabref.json @@ -1,7 +1,7 @@ { "name": "org.jabref.jabref", "description": "JabRef", - "path": "/Applications/JabRef.app/Contents/Resources/jabrefHost.py", + "path": "/Applications/JabRef.app/Contents/jabrefHost.py", "type": "stdio", "allowed_origins": [ "chrome-extension://bifehkofibaamoeaopjglfkddgkijdlh/", diff --git a/buildres/mac/native-messaging-host/firefox/org.jabref.jabref.json b/buildres/mac/native-messaging-host/firefox/org.jabref.jabref.json index df296d37c84..d6c6541f3d3 100644 --- a/buildres/mac/native-messaging-host/firefox/org.jabref.jabref.json +++ b/buildres/mac/native-messaging-host/firefox/org.jabref.jabref.json @@ -1,10 +1,7 @@ { "name": "org.jabref.jabref", "description": "JabRef", - "path": "/Applications/JabRef.app/Contents/Resources/jabrefHost.py", + "path": "/Applications/JabRef.app/Contents/jabrefHost.py", "type": "stdio", - "allowed_extensions": [ - "browserextension@jabref.org", - "@jabfox" - ] + "allowed_extensions": ["browserextension@jabref.org", "@jabfox"] } diff --git a/buildres/mac/postinstall b/buildres/mac/postinstall index 7fd28171458..9c646441516 100755 --- a/buildres/mac/postinstall +++ b/buildres/mac/postinstall @@ -6,15 +6,15 @@ chmod +r "APP_LOCATION/"*.jar # Trigger an auto-install of the browser addon for chrome/chromium browsers # First create the necessary path, then copy the autoinstall file. install -d /Library/Application\ Support/Google/Chrome/External\ Extensions/ -install -m0644 /Applications/JabRef.app/Contents/Resources/native-messaging-host/chromium/bifehkofibaamoeaopjglfkddgkijdlh.json /Library/Application\ Support/Google/Chrome/External\ Extensions/bifehkofibaamoeaopjglfkddgkijdlh.json +install -m0644 /Applications/JabRef.app/Contents/native-messaging-host/chromium/bifehkofibaamoeaopjglfkddgkijdlh.json /Library/Application\ Support/Google/Chrome/External\ Extensions/bifehkofibaamoeaopjglfkddgkijdlh.json # Install the native-messaging host script for firefox/chrome/chromium install -d /Library/Application\ Support/Mozilla/NativeMessagingHosts/ -install -m0755 /Applications/JabRef.app/Contents/Resources/native-messaging-host/firefox/org.jabref.jabref.json /Library/Application\ Support/Mozilla/NativeMessagingHosts/org.jabref.jabref.json +install -m0755 /Applications/JabRef.app/Contents/native-messaging-host/firefox/org.jabref.jabref.json /Library/Application\ Support/Mozilla/NativeMessagingHosts/org.jabref.jabref.json install -d /Library/Application\ Support/Chromium/NativeMessagingHosts/ -install -m0755 /Applications/JabRef.app/Contents/Resources/native-messaging-host/chromium/org.jabref.jabref.json /Library/Application\ Support/Chromium/NativeMessagingHosts/org.jabref.jabref.json +install -m0755 /Applications/JabRef.app/Contents/native-messaging-host/chromium/org.jabref.jabref.json /Library/Application\ Support/Chromium/NativeMessagingHosts/org.jabref.jabref.json install -d /Library/Google/Chrome/NativeMessagingHosts/ -install -m0755 /Applications/JabRef.app/Contents/Resources/native-messaging-host/chromium/org.jabref.jabref.json /Library/Google/Chrome/NativeMessagingHosts/org.jabref.jabref.json +install -m0755 /Applications/JabRef.app/Contents/native-messaging-host/chromium/org.jabref.jabref.json /Library/Google/Chrome/NativeMessagingHosts/org.jabref.jabref.json install -d /Library/Microsoft/Edge/NativeMessagingHosts/ -install -m0755 /Applications/JabRef.app/Contents/Resources/native-messaging-host/chromium/org.jabref.jabref.json /Library/Microsoft/Edge/NativeMessagingHosts/org.jabref.jabref.json +install -m0755 /Applications/JabRef.app/Contents/native-messaging-host/chromium/org.jabref.jabref.json /Library/Microsoft/Edge/NativeMessagingHosts/org.jabref.jabref.json exit 0