edvin / fxlauncher

Auto updating launcher for JavaFX Applications
Apache License 2.0
714 stars 110 forks source link

fxlauncher and preloader ? #62

Open ouaibsky opened 7 years ago

ouaibsky commented 7 years ago

Hi

This is more a question rather than a bug I'm testing fxlauncher with my application (desktop) that is using a preloader class to use a custom splashscreen.

main is like this:

 public static void main(String[] anArgs) {
        LauncherImpl.launchApplication(MainApp.class, MyPreloader.class, args);
}

Everything is working fine except the preloader class is never called.

Is it going as expected for fxlauncher point of view ?

Regards Christophe

ronsmits commented 7 years ago

We dont support the preloader class, but we could add that in the manifest. I'll play a bit with it

ronsmits commented 7 years ago

@ouaibsky what exactly do you mean when you see preloader? fxlauncher already has the option to override the loader screen using UIProvider (See https://github.com/edvin/fxlauncher-custom-ui for more information).

If you use fxlauncher to launch your application we cannot call the preloader anymore the way you do in this ticket.

TurekBot commented 5 years ago

At this line https://github.com/edvin/fxlauncher/blob/3024b413c8743d1e3576e91f9911b68076bcb625/src/main/java/fxlauncher/Launcher.java#L171 could we call launch() instead of init()?

I have a suspicion that doing that in combination with setting the preloader as a system property might allow the preloader to display itself. The motivation to use a Preloader (instead of just FXLauncher's UIProvider) is how a Preloader is connected to the app's launching process.

Here's an excellent explanation of the whole launching process: https://blog.codecentric.de/en/2015/09/javafx-how-to-easily-implement-application-preloader-2/ Launch Timeline

jkash20 commented 4 years ago

Hi, I'm trying to use fxlauncher for an existing app which uses preloader. As mentioned by @ouaibsky even I'm not getting the preloader screen. Just wanted to check if it's going to be supported in a future version. Thanks!