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

Simplify LO connection and fix threading errors #7271

Merged
merged 8 commits into from
Jan 4, 2021
Merged

Simplify LO connection and fix threading errors #7271

merged 8 commits into from
Jan 4, 2021

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Dec 29, 2020

Simplify LO connection

  • Test sucessful for mac

@LyzardKing I simplified the LO connection. It's now enough to input the dir of the executable. JabRef now only calls the soffice.exe
The jars are no longer needed.

Edit// Can you test if the connection to a snap LO or so is now possible?

  • Change in CHANGELOG.md described (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

Signed-off-by: Siedlerchr <siedlerkiller@gmail.com>
Executable is enough
@Siedlerchr Siedlerchr changed the title [WIP] Simplify LO connection (hopefully works for flatpak) Simplify LO connection and fix threading errors (hopefully works for flatpak) Dec 30, 2020
@LyzardKing
Copy link
Collaborator

I'm testing the flatpak now.. it should work (like the latex editors..)
If I get that working I'll look at the snap, although for that it's a bit more complicated.
In the snap it's not possible to escape the confinement, so we'd need to set it to unconfined (classic)

@LyzardKing
Copy link
Collaborator

LyzardKing commented Dec 30, 2020

The flatpak JabRef works with the apt/rpm version of libreoffice.
Is it possible to set the default path to /app/bin/soffice in the flatpak?

EDIT: Is there a file with the configurations that could be edited when building the flatpak?

@Siedlerchr
Copy link
Member Author

Siedlerchr commented Dec 30, 2020

@LyzardKing I implemented an approach based on the Env variable you suggested.
to check if FLATPAK_SANDBOX_DIR exists and then return the path /app/bin/soffice

Alternatively, we could add a variable e.g. Linux_Variant to the build.properties with the info if snap or flatpak.
Edit// But that would need to be present in the java compiler step

@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Dec 31, 2020
@LyzardKing
Copy link
Collaborator

@Siedlerchr I'll test in the next few days, but this should be enough to have (from the next release) a flatpak that works out of the box with libreoffice/browsers/tex editors

Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

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

Can the OO jars now also be removed from the gradle file?

@Siedlerchr
Copy link
Member Author

Siedlerchr commented Jan 1, 2021

Can the OO jars now also be removed from the gradle file?

No! The only change is that we no longer need to load the jars from the libre office directory because we already need them for building and running (like other libraries).
That is why I adjusted the LO bootstrap
In addition, I fixed some threading errors for error messages.

* upstream/master:
  fix checsktyle
  Fix for application dialogs opening in wrong displays (#7273)
  Only disable  move to file dir when path equals (#7269)
  Improved detection of long DOI's within text (#7260)
  Add missing author and fix name
  Fix style of highlighted checkboxes while searching in preferences (#7258)
  Updates to institution citation keys (#7210)
  Bump xmlunit-core from 2.8.1 to 2.8.2 (#7251)
  Bump classgraph from 4.8.97 to 4.8.98 (#7250)
  Bump bcprov-jdk15on from 1.67 to 1.68 (#7249)
  Bump xmlunit-matchers from 2.8.1 to 2.8.2 (#7252)
  Bump unirest-java from 3.11.06 to 3.11.09 (#7254)
  Bump org.beryx.jlink from 2.23.0 to 2.23.1 (#7253)
  Bump pascalgn/automerge-action from v0.12.0 to v0.13.0 (#7255)

# Conflicts:
#	src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java
@calixtus calixtus changed the title Simplify LO connection and fix threading errors (hopefully works for flatpak) Simplify LO connection and fix threading errors Jan 4, 2021
@calixtus calixtus merged commit 5ba38da into master Jan 4, 2021
@calixtus calixtus deleted the oofix branch January 4, 2021 16:29
Siedlerchr added a commit that referenced this pull request Jan 5, 2021
…dtask

* upstream/master:
  Fix typo for small pi (#7296)
  Fix Normalize pages formatter not replacing dashes (#7243)
  Simplify LO connection and fix threading errors (#7271)
  Fix for issue 7287 (#7290)

# Conflicts:
#	src/main/resources/l10n/JabRef_en.properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants