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

display doc in embedded browser #159

Merged
merged 1 commit into from
Nov 26, 2023
Merged

display doc in embedded browser #159

merged 1 commit into from
Nov 26, 2023

Conversation

guiv42
Copy link
Collaborator

@guiv42 guiv42 commented Nov 26, 2023

to remove dependency to external web browser
Specific use case for Ubuntu, where distro's web browser cannot access local resources
see #153

Limitations:

  • pom files updated for all configurations, but only tested with Linux/JFX, Linux/SWT, Win10/SWT
  • no embedded controls for navigation (e.g. back, forward)

The method "openUrl" of application object is now unused, but I did not remove it: it can be used in future versions to link to an external website for online help

to remove dependency to external web browser
Specific use case for Ubuntu, where distro's web browser cannot access local resources
see helge17#153

Limitations:
- pom files updated for all configurations, but only tested with Linux/JFX, Linux/SWT, Win10/SWT
- no embedded controls for navigation (e.g. back, forward)

The method "openUrl" of application object is now unused, but I did not remove it:
it can be used in future versions to link to an external website for online help
@helge17 helge17 merged commit 36bb2d0 into helge17:master Nov 26, 2023
@helge17
Copy link
Owner

helge17 commented Nov 26, 2023

Linux SWT, help not starting; error:
org.herac.tuxguitar.action.TGActionException: No more handles because there is no underlying browser available.
Please ensure that WebKit with its GTK 3.x bindings is installed (WebKit2 API level is preferred). Additionally, please note that GTK4 does not currently have Browser support.

FreeBSD JFX: Does not build.

Probably some dependency problems, I have to investigate...

@guiv42
Copy link
Collaborator Author

guiv42 commented Nov 26, 2023

Linux SWT: I have "libwebkit2gtk-4_0-37" installed on my system, this might be the required dependency?

@helge17
Copy link
Owner

helge17 commented Nov 26, 2023

Indeed, libwebkit2gtk-4.0-37 is needed. I only had libwebkit2gtk-4.1-0 install, this does not work.

@guiv42
Copy link
Collaborator Author

guiv42 commented Nov 26, 2023

Okay, so at the end it boils down to a dependency issue: where do we expect to find a working web engine?

  • before PR: constraint exported to the OS, fails in Ubuntu context
  • after PR: manage constraint internally, fails in some other situations

I don't know exactly how to handle this. At least for all runtime errors, a simple modification could be implemented when user types F1:

  • try to display doc in embedded browser
  • if it fails, catch exception and fallback to historical behavior (start external web browser).

For Linux, this could end up in a "recommended" package in deb/rpm package.

For build-time errors (FreeBSD)... I have no idea

@guiv42 guiv42 deleted the help branch November 26, 2023 17:04
@guiv42
Copy link
Collaborator Author

guiv42 commented Nov 26, 2023

Indeed, libwebkit2gtk-4.0-37 is needed. I only had libwebkit2gtk-4.1-0 install, this does not work.

If I try to uninstall it, my package manager tells me it also needs to uninstall TuxGuitar 1.6.0 (OpenSuse rpm version). In fact, TuxGuitar 1.6.0 rpm has "eclipse sw >= 4.13" as an explicit dependency. And the version of eclipse-swt installed in my system (4.15-11.2) has an explicit dependency to libwebkit2gtk-4.0.so.37...

I see you already added the dependency in the deb package. Just 2 questions:

  • any idea how to solve this in Linux standalone version? (tgz)
  • what do you think of adding this dependency in deb/rpm only as a "recommended" package? (see my proposal to fallback to previous behavior in case embedded browser isn't available)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants