-
Notifications
You must be signed in to change notification settings - Fork 171
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
Splash screen in Packr on macOS #216
Comments
Are you creating the splash screen yourself in code doing something like I'm not sure a |
Have you tried running the packr executable with the arguments |
The splash is created by adding the splash screen in the jar and add an entry to the manifest. The manifest is created from the
So it is not coded. EDIT: sorry, forgot to mention the
|
I now coded it with both a URL from resource in my jar, which doesn't work. |
I'm not sure if this is accurate, but there's an old StackOverflow that says the splash screen is created by native code: https://stackoverflow.com/questions/32215515/how-java-splashscreen-works. If that's true, it would explain why it doesn't work, packr only loads the JVM shared library and executes your main method. I think the best chance you have is to show a splash screen yourself from your main method like they did in #65. |
It could also be similar to an issue jpackage had: https://bugs.openjdk.java.net/browse/JDK-8250611. Maybe loading the splashscreen shared library would fix it. You could try updating the C code to load those libraries, or try out jpackage. |
I already tried jpackage for jdk16 and jdk17. Exactly the same behavior as Packr, with the disadvantage of jpackage that Packr is platform independent and jpackage is not. I have seen the solution in #65, but my UI loads diferently via the
I really appreciate your feedback and thinking along, but I think I will "park" this for some time and look at other ways. This already took my whole day only for a splash screen. I will stay with Packr and abandon my manual bundle, as the Packr method delivers a real bundle instead of my script in a bundle starting java with a jar. |
Hi,
Build platform: Ubuntu focal fossa 20.0.4.3 LTS
Test platform: macOS Catalina and Big Sur
Packr: release version 4.0.0
build jdk: adoptopenjdk 11.0.x
packed jre: adoptopenjdk 11.0.x
(This refers also to issue #65 :Some ambiguity with vmargs in config.json)
I build my java jar for Linux, Windows and macOS with the splashscreen functionality from java itself, as that is the easiest.
On macOS I use packr v4 recently (I could not make it work with v3, maybe my fault). Before that I created a bundle manually and use a script to start the app with
java -jar jExifToolGUI.jar
with some vmargs. That showed the splashscreen.(my app is jExifToolGUI in case you're interested or in case it matters)
Now with pack 4.0.0, even with my builtin java splashscreen, it doesn't work.
If I double-click the the app, it doesn't show the splash screen.
If I do an
open jExifToolGUI.app
, it doesn't show the splash screen.If I do an
./jExifToolGUI.app/Contents/MacOS/jexiftoolgui
, it doesn't show the splash screen.If I do a 'java -jar jExifToolGUI.app/Contents/Resources/jExifToolGUI.jar`, I do get the splash screen.
I already created a jexiftoolgui.json with or without a vmargs
splash:my_splash_screen
andsplash:my_splash_screen.png
(although the latter with extension should not be needed) and adding the png to my bundle, but that doesn't work either, which is of course in ling with issue #65.I understand the explanation in issue #65, but why does the Packr binary block my java builtin splash screen?
(It does work on Windows (using launch4j), it works using a .deb and an AppImage, or simply using
java -jar ...
)The text was updated successfully, but these errors were encountered: