mbaeuerle / Briss-2.0

Briss 2.0 is intended to be a GUI Update for the Briss PDF cropping tool.
GNU General Public License v3.0
499 stars 48 forks source link

Running on MacOS #59

Closed odysseus90210 closed 1 year ago

odysseus90210 commented 1 year ago

Hi,

I'm sorry to bother you with this, but I used to be able to double-click a file named "Briss-2.0" to launch the GUI, but it no longer works. Is that still possible? I downloaded the latest version of Briss, but that file is no longer present.

cleydyr commented 1 year ago

Hey, @odysseus90210 . No bothering at all. :)

In which version of Briss exactly were you able to double click a file named "Briss-2.0"?

That file you mention is a shell script. However, it has no extension. I think MacOS won't execute shell scripts without extension, because that's the case in my MacOS as well. I tested with both versions alpha-4 and alpha-3.

That being said, can you try adding the .sh extension to your Briss-2.0 file and trying to execute it by double-clicking again?

odysseus90210 commented 1 year ago

Hi,

The error message that appears in Terminal is:

Error: Could not find or load main class at.laborg.briss.Briss
Caused by: java.lang.ClassNotFoundException: at.laborg.briss.Briss

So where does the shell script have to be in the Briss-2.0-master folder?

cleydyr commented 1 year ago

Hey, @odysseus90210 . If you have a Briss-2.0-master folder, then you're not using one of the releases and instead building from source. Is this the case? If so, can you try using one of the releases instead?

odysseus90210 commented 1 year ago

You're not going to believe this, but I can't figure out how to download one from that page!

odysseus90210 commented 1 year ago

Figured it out -- had to press on the "Assets" triangle

odysseus90210 commented 1 year ago

Why doesn't alpha 4 work with Version 8 Update 361?

cleydyr commented 1 year ago

Hey, @odysseus90210 . That alpha release was not compiled using a JDK 8 backwards compatibility. We've been discussing before if we wanted to support building with JDK 8 given the technical limitations that it implies. Not sure if we'll support running on Java 8 though.

Does the Java 8 compatible alpha-3 release work though?

@mbaeuerle do you have any inputs on support running Briss on Java 8?

mbaeuerle commented 1 year ago

Hey @odysseus90210 the official build will not work with Java 8 as things changed with the dependencies and even some of the code. I have added a Java 8 build on the release page now, check that out and let us know if that works for you:

@cleydyr building for Java 8 is not very straight forward.

  1. Java 8 comes with JavaFX included therefore all JavaFX dependencies need to be removed from build.gradle before the build
  2. Some code doesn't compile with Java 8 any longer Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx() therefore needs to be changed to Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
odysseus90210 commented 1 year ago

Thanks. I managed to download Java 19 or something like that -- it has to be the developer version because the Java runtime for the general public still appears to be version 8?!

mbaeuerle commented 1 year ago

You're right, it got very confusing with the runtime for Java. Oracle doesn't provide the dedicated java runtime environment any longer it now always contains a development kit. Though it's not needed for running Briss it's also not a big deal. The currently latest Java version also for the general public is actually version 19. If you only want to install a JRE you can use alternatives based on the OpenJDK like the one from Eclipse: https://adoptium.net/temurin/releases/?version=19

Regarding the initial request of double clicking to open Briss, is that still relevant? We might try to create an app bundle for Mac which then can be started like any regular Mac app. Though for that we need to investigate a bit more.

odysseus90210 commented 1 year ago

Thanks so much for this. The double-clicking works now, but I'd love an app bundle for Mac. This would allow the user to drag and drop pdfs directly on Briss, wouldn't it? That would be ideal!

DesBw commented 1 year ago

I installed JDK 19 on the Mac Monterey. But, I getting "Java Application launch failed".

cleydyr commented 1 year ago

I installed JDK 19 on the Mac Monterey. But, I getting "Java Application launch failed".

@Dellu, JDK 19 is not supported yet. https://github.com/mbaeuerle/Briss-2.0/issues/61 has been opened to address this.

tophee commented 1 year ago

Thank you for updating briss! I have been using v0.9 for years and was happy to discover briss 2.0. An app bundle for MacOS (read: one for ARM and one for X64) would be great. I am a power user but this whole java thing is always giving me headaches... I understand, though, that figuring out how to build an app bundle that includes a JRE may not be a priority for you.

mbaeuerle commented 1 year ago

A new version of Briss now also supports Java 19 (and all versions in between). Currently bundlling a JRE is not on the roadmap. But hopefully this new version makes things easy enough that this is not needed any longer. Find the new version here: (https://github.com/mbaeuerle/Briss-2.0/releases/tag/v2.0-alpha-5