Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linux desktop launcher #5444

Merged
merged 4 commits into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ if (OperatingSystem.current().isLinux()) {
tasks.jpackageImage.doLast {
copy {
from("${projectDir}/buildres/linux") {
include "org.jabref.jabref.json", "jabrefHost.py"
include "org.jabref.jabref.json", "jabrefHost.py", "jabref.desktop"
}
into "$buildDir/distribution/JabRef/lib"
}
Expand Down
12 changes: 12 additions & 0 deletions buildres/linux/jabref.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Desktop Entry]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to use the command line options as much as possible. They also apply to the rpm installer.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the jpackage options? There is a tradeoff, as i mentioned in the comment
(The launcher should be exactly the same for the rpm, or am I missing something?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the jpackage options. If the WM option is really necessary, we can keep the custom desktop file in the form of a modified https://hg.openjdk.java.net/jdk/sandbox/file/47f0d21c7e8d/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.desktop (I'm guessing the file name here) but should still use the command line options. Moreover, it should be reported to the java devs that such an option would be worthwhile to add (remember jpackage is beta).

Name=JabRef
GenericName=BibTeX Editor
Comment=JabRef is an open source bibliography reference manager. The native file format used by JabRef is BibTeX, the standard LaTeX bibliography format.
Type=Application
Terminal=false
Icon=/opt/jabref/lib/JabRef.png
Exec=/opt/jabref/bin/JabRef %U
Keywords=bibtex;biblatex;latex;bibliography
Categories=Office;
StartupWMClass=org-jabref-JabRefMain
MimeType=text/x-bibtex;
5 changes: 2 additions & 3 deletions buildres/linux/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ set -e
case "$1" in
configure)
INSTALL_PATH="/usr/lib/mozilla/native-messaging-hosts/"
mkdir -p $INSTALL_PATH
\cp /opt/jabref/lib/org.jabref.jabref.json $INSTALL_PATH
chmod a+x "/opt/jabref/lib/jabrefHost.py"
install -D -m0755 /opt/jabref/lib/org.jabref.jabref.json $INSTALL_PATH
install -D -m0644 /opt/jabref/lib/jabref.desktop /usr/share/applications/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I created the postinst file, I made a mistake and didn't used the template from https://hg.openjdk.java.net/jdk/sandbox/file/47f0d21c7e8d/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.postinst. Could you please use this as a base. Should make it unnecessary to copy the desktop file by hand.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The page is not loading :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here...stange

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

java.net was down today, is working again

;;

abort-upgrade|abort-remove|abort-deconfigure)
Expand Down