root icon indicating copy to clipboard operation
root copied to clipboard

Remove splash screen to avoid `root.exe` dependence on x11 or cocoa

Open guitargeek opened this issue 1 year ago • 10 comments

Arguments for removing the splash screen:

  • It introduces a dependency of the root executable of graphics libraries, like X11 on Linux or Cocoa on macOS.
  • The Windows version is not kept up to date (see the list of core developers).
  • According to Wikipedia, "splash screens are typically used by particularly large applications to notify the user that the program is in the process of loading". The ROOT interpreter takes almost no time to load today. Probably that was different in the past, and a splash screen was justified back then.
  • Users don't see it unless they run root with the -a option. In this case, the interpreter quits immediately (I think the option only exists just to show the splash screen for the historical record).
  • It doesn't work on multi-display setups.
  • root -b -a turns on display even if you think it should run in batch mode
  • It doesn't work on Wayland (see #15723) --> EDIT: It does work on wayland, it's just that the Xs were not fine.
  • We're avoiding three FIXMEs in the CMakeLists.txt in case of Cocoa

Closes #14819. Closes ROOT-10948.

guitargeek avatar Mar 25 '24 19:03 guitargeek

Test Results

    13 files      13 suites   3d 0h 57m 50s :stopwatch:  2 694 tests  2 693 :white_check_mark: 0 :zzz: 1 :x: 32 918 runs  32 917 :white_check_mark: 0 :zzz: 1 :x:

For more details on these failures, see this check.

Results for commit a7c479ee.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Mar 25 '24 21:03 github-actions[bot]

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default How to customize builds

phsft-bot avatar Mar 26 '24 09:03 phsft-bot

Thanks! An idea: the KHelpAbout in the browsers, it might be helpful to replace with a simple TGLabel containing gHelpAbout in a Tgtab e.g. or tgwindow

ferdymercury avatar Apr 08 '24 07:04 ferdymercury

Hi @ferdymercury, thanks for you comment

You're right, the about stuff can be improved, I just didn't know how yet so I just removed it. In the current master, there is this pattern for all the about events:

#ifdef R__UNIX
   TString rootx = TROOT::GetBinDir() + "/root -a &";
   gSystem->Exec(rootx);
#else
#ifdef WIN32
   new TWin32SplashThread(kTRUE);
#else
   char str[32];
   sprintf(str, "About ROOT %s...", gROOT->GetVersion());
   TRootHelpDialog *hd = new TRootHelpDialog(this, str, 600, 400);
   hd->SetText(gHelpAbout);
   hd->Popup();
#endif
#endif

We need to find a platform independent alternative for that, and what you're saying is that this can be done with TGLabel, right?

guitargeek avatar Apr 08 '24 11:04 guitargeek

Now that I look closer, the #else part with the TRootHelpDialog should work, same idea as with Tglabel and it's for all platforms I believe.

ferdymercury avatar Apr 08 '24 11:04 ferdymercury

Yeah I just concluded the same when taking another look. I'll try that!

guitargeek avatar Apr 08 '24 11:04 guitargeek

Looks like it works: Screenshot_2024-04-08_14-19-18

The text is a bit outdated, but hey so was the list of developers in the splash :smile:

guitargeek avatar Apr 08 '24 12:04 guitargeek

I apologise to comment about this only now: this is solid work. Instead of directly removing, @guitargeek do you think we can make the splash modular and OFF by default? This would be a first step for release 6.36. We can comfortably proceed with the deprecation and removal at a later stage, if we want, and at the same time, the benefits you list above will be harvested nevertheless.

dpiparo avatar Aug 31 '24 05:08 dpiparo

Back to this: I would keep it on Windows, since it doesn't introduce any dependency...

bellenot avatar Sep 19 '24 07:09 bellenot

Ok!

guitargeek avatar Sep 19 '24 08:09 guitargeek