Skip to content

Commit 4042121

Browse files
committed
Remove spash screen to avoid root.exe dependence on x11 or cocoa
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](https://github.com/root-project/root/blob/master/core/winnt/src/Win32Splash.cxx#L32)). * According to [Wikipedia](https://en.wikipedia.org/wiki/Splash_screen), "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-project#14819). * `root -b -a` turns on display even if you think it should run in batch mode * It doesn't work on Wayland (see root-project#15723) --> EDIT: It does work on wayland, it's just that the Xs were not fine. Closes root-project#14819. Closes [ROOT-10948](https://its.cern.ch/jira/browse/ROOT-10948).
1 parent 2ba6960 commit 4042121

File tree

19 files changed

+40
-2304
lines changed

19 files changed

+40
-2304
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,9 @@ add_subdirectory (montecarlo)
362362
if(geom)
363363
add_subdirectory (geom)
364364
endif()
365-
add_subdirectory (rootx)
365+
if(NOT WIN32)
366+
add_subdirectory (rootx)
367+
endif()
366368
add_subdirectory (misc)
367369
add_subdirectory (main)
368370
add_subdirectory (bindings)

README/ReleaseNotes/v636/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The following people have contributed to this new version:
1717
* The RooFit legacy interfaces that were deprecated in ROOT 6.34 and scheduled for removal in ROOT 6.36 are removed. See the RooFit section in the 6.34 release notes for a full list.
1818
* The `TPython::Eval()` function that was deprecated in ROOT 6.34 and scheduled for removal in ROOT 6.36 is removed.
1919
* The `RooDataSet` constructors to construct a dataset from a part of an existing dataset are deprecated and will be removed in ROOT 6.38. This is to avoid interface duplication. Please use `RooAbsData::reduce()` instead, or if you need to change the weight column, use the universal constructor with the `Import()`, `Cut()`, and `WeightVar()` arguments.
20+
* The ROOT splash screen was removed for Linux and macOS
2021

2122
## Python Interface
2223

core/base/src/root-argparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def get_argparse():
1313
parser.add_argument('-t', help='Enable thread-safety and implicit multi-threading (IMT)')
1414
parser.add_argument('-q', help='Exit after processing command line macro files')
1515
parser.add_argument('-l', help='Do not show the ROOT banner')
16-
parser.add_argument('-a', help='Show the ROOT splash screen')
16+
parser.add_argument('-a', help='Show the ROOT splash screen (Windows only)')
1717
parser.add_argument('-config', help='print ./configure options')
1818
parser.add_argument('-h','-?', '--help', help='Show summary of options')
1919
parser.add_argument('--version', help='Show the ROOT version')

core/rint/src/TRint.cxx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -560,13 +560,6 @@ void TRint::PrintLogo(Bool_t lite)
560560
}
561561
Printf(" %s\n", TString('-', lenLongest).Data());
562562
}
563-
564-
#ifdef R__UNIX
565-
// Popdown X logo, only if started with -splash option
566-
for (int i = 0; i < Argc(); i++)
567-
if (!strcmp(Argv(i), "-splash"))
568-
kill(getppid(), SIGUSR1);
569-
#endif
570563
}
571564

572565
////////////////////////////////////////////////////////////////////////////////

graf3d/gl/src/TGLSAViewer.cxx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -669,19 +669,14 @@ Bool_t TGLSAViewer::ProcessFrameMessage(Long_t msg, Long_t parm1, Long_t)
669669
case kCM_MENU:
670670
switch (parm1) {
671671
case kGLHelpAbout: {
672-
#ifdef R__UNIX
673-
TString rootx = TROOT::GetBinDir() + "/root -a &";
674-
gSystem->Exec(rootx);
675-
#else
676672
#ifdef WIN32
677673
new TWin32SplashThread(kTRUE);
678674
#else
679675
char str[32];
680676
snprintf(str,32, "About ROOT %s...", gROOT->GetVersion());
681-
hd = new TRootHelpDialog(this, str, 600, 400);
677+
TRootHelpDialog * hd = new TRootHelpDialog(fFrame, str, 600, 400);
682678
hd->SetText(gHelpAbout);
683679
hd->Popup();
684-
#endif
685680
#endif
686681
break;
687682
}

gui/gui/src/TGTextEditor.cxx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -841,20 +841,15 @@ void TGTextEditor::InterruptMacro()
841841

842842
void TGTextEditor::About()
843843
{
844-
#ifdef R__UNIX
845-
TString rootx = TROOT::GetBinDir() + "/root -a &";
846-
gSystem->Exec(rootx);
847-
#else
848844
#ifdef WIN32
849845
new TWin32SplashThread(kTRUE);
850846
#else
851847
char str[32];
852-
sprintf(str, "About ROOT %s...", gROOT->GetVersion());
848+
snprintf(str, 32, "About ROOT %s...", gROOT->GetVersion());
853849
TRootHelpDialog *hd = new TRootHelpDialog(this, str, 600, 400);
854850
hd->SetText(gHelpAbout);
855851
hd->Popup();
856852
#endif
857-
#endif
858853
}
859854

860855
////////////////////////////////////////////////////////////////////////////////

gui/gui/src/TRootBrowser.cxx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -731,19 +731,14 @@ void TRootBrowser::HandleMenu(Int_t id)
731731
// Handle Help menu items...
732732
case kHelpAbout:
733733
{
734-
#ifdef R__UNIX
735-
TString rootx = TROOT::GetBinDir() + "/root -a &";
736-
gSystem->Exec(rootx);
737-
#else
738734
#ifdef WIN32
739735
new TWin32SplashThread(kTRUE);
740736
#else
741737
char str[32];
742-
sprintf(str, "About ROOT %s...", gROOT->GetVersion());
738+
snprintf(str, 32, "About ROOT %s...", gROOT->GetVersion());
743739
hd = new TRootHelpDialog(this, str, 600, 400);
744740
hd->SetText(gHelpAbout);
745741
hd->Popup();
746-
#endif
747742
#endif
748743
}
749744
break;

gui/gui/src/TRootBrowserLite.cxx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,19 +1967,14 @@ Bool_t TRootBrowserLite::ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_
19671967
// Handle Help menu items...
19681968
case kHelpAbout:
19691969
{
1970-
#ifdef R__UNIX
1971-
TString rootx = TROOT::GetBinDir() + "/root -a &";
1972-
gSystem->Exec(rootx);
1973-
#else
19741970
#ifdef WIN32
19751971
new TWin32SplashThread(kTRUE);
19761972
#else
19771973
char str[32];
1978-
sprintf(str, "About ROOT %s...", gROOT->GetVersion());
1974+
snprintf(str, 32, "About ROOT %s...", gROOT->GetVersion());
19791975
hd = new TRootHelpDialog(this, str, 600, 400);
19801976
hd->SetText(gHelpAbout);
19811977
hd->Popup();
1982-
#endif
19831978
#endif
19841979
}
19851980
break;

gui/gui/src/TRootCanvas.cxx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,20 +1188,15 @@ Bool_t TRootCanvas::ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t)
11881188
// Handle Help menu items...
11891189
case kHelpAbout:
11901190
{
1191-
#ifdef R__UNIX
1192-
TString rootx = TROOT::GetBinDir() + "/root -a &";
1193-
gSystem->Exec(rootx);
1194-
#else
11951191
#ifdef WIN32
11961192
new TWin32SplashThread(kTRUE);
11971193
#else
11981194

11991195
char str[32];
1200-
sprintf(str, "About ROOT %s...", gROOT->GetVersion());
1196+
snprintf(str, 32, "About ROOT %s...", gROOT->GetVersion());
12011197
hd = new TRootHelpDialog(this, str, 600, 400);
12021198
hd->SetText(gHelpAbout);
12031199
hd->Popup();
1204-
#endif
12051200
#endif
12061201
}
12071202
break;

gui/guihtml/src/TGHtmlBrowser.cxx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#include "TGText.h"
2929
#include "TError.h"
3030
#include "TVirtualX.h"
31+
#include "HelpText.h"
32+
#include "TRootHelpDialog.h"
3133
#include "snprintf.h"
3234
#ifdef R__SSL
3335
#include "TSSLSocket.h"
@@ -667,10 +669,6 @@ Bool_t TGHtmlBrowser::ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t)
667669

668670
case kM_HELP_ABOUT:
669671
{
670-
#ifdef R__UNIX
671-
TString rootx = TROOT::GetBinDir() + "/root -a &";
672-
gSystem->Exec(rootx);
673-
#else
674672
#ifdef WIN32
675673
new TWin32SplashThread(kTRUE);
676674
#else
@@ -680,7 +678,6 @@ Bool_t TGHtmlBrowser::ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t)
680678
600, 400);
681679
hd->SetText(gHelpAbout);
682680
hd->Popup();
683-
#endif
684681
#endif
685682
}
686683
break;

gui/sessionviewer/src/TSessionViewer.cxx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ queries construction and results handling.
6767
#include "TSelector.h"
6868
#include "TFileCollection.h"
6969
#include "TVirtualX.h"
70+
#include "HelpText.h"
71+
#include "TRootHelpDialog.h"
7072
#include "snprintf.h"
7173
#ifdef WIN32
7274
#include "TWin32SplashThread.h"
@@ -5816,19 +5818,14 @@ Bool_t TSessionViewer::ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t)
58165818

58175819
case kHelpAbout:
58185820
{
5819-
#ifdef R__UNIX
5820-
TString rootx = TROOT::GetBinDir() + "/root -a &";
5821-
gSystem->Exec(rootx);
5822-
#else
58235821
#ifdef WIN32
58245822
new TWin32SplashThread(kTRUE);
58255823
#else
58265824
char str[32];
5827-
sprintf(str, "About ROOT %s...", gROOT->GetVersion());
5825+
snprintf(str, 32, "About ROOT %s...", gROOT->GetVersion());
58285826
TRootHelpDialog *hd = new TRootHelpDialog(this, str, 600, 400);
58295827
hd->SetText(gHelpAbout);
58305828
hd->Popup();
5831-
#endif
58325829
#endif
58335830
}
58345831
break;

rootx/CMakeLists.txt

Lines changed: 16 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -9,69 +9,25 @@
99
# @author Pere Mato, CERN
1010
############################################################################
1111

12-
if(x11)
13-
ROOT_EXECUTABLE(root
14-
src/rootx.cxx
15-
src/rootxx.cxx
16-
../core/clib/src/strlcpy.c
17-
)
18-
target_include_directories(root
19-
PRIVATE
20-
${X11_INCLUDE_DIR}
21-
)
22-
target_link_libraries(root
23-
PRIVATE
24-
${X11_Xft_LIB}
25-
${X11_Xpm_LIB}
26-
${X11_LIBRARIES}
27-
)
12+
ROOT_EXECUTABLE(root src/rootx.cxx)
2813

2914
if (CMAKE_SYSTEM_NAME MATCHES FreeBSD)
3015
target_link_libraries(root PRIVATE util procstat)
3116
endif()
3217

33-
elseif(cocoa)
34-
if (cxxmodules)
35-
# FIXME: Disable modules for ObjC/ObjC++. It has problems when compiling
36-
# rootxx-cocoa.mm with a lots of warnings and errors such as:
37-
# rootxx-cocoa.mm:884:48: error: property 'length' not found on object of type 'NSMutableAttributedString *'
38-
#
39-
# FIXME: We should disable building with modules on only the TU of rootxx-cocoa.mm
40-
# Unfortunately, cmake cannot reliably remove flags from a single TU.
41-
# as COMPILE_OPTIONS and COMPILE_FLAGS could be overriden causing tricky to
42-
# debug problems.
43-
string(REPLACE "${ROOT_CXXMODULES_CXXFLAGS}" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
44-
string(REPLACE "${ROOT_CXXMODULES_CFLAGS}" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
45-
endif(cxxmodules)
46-
47-
# FIXME: rootxx-cocoa.mm should be compiled with -ObjC++ flag. Here we rely
48-
# that the compiler will recognise the extension mm and switch to the correct
49-
# language mode.
50-
ROOT_EXECUTABLE(root
51-
src/rootx.cxx
52-
src/rootxx-cocoa.mm
53-
LIBRARIES
54-
"-framework Cocoa"
55-
)
56-
set(cocoa_incl ${CMAKE_SOURCE_DIR}/core/macosx/inc)
57-
endif()
58-
59-
if(x11 OR cocoa)
60-
generateHeader(root
61-
${CMAKE_SOURCE_DIR}/core/base/src/root-argparse.py
62-
${CMAKE_BINARY_DIR}/ginclude/rootCommandLineOptionsHelp.h
63-
)
64-
65-
target_include_directories(root PRIVATE
66-
${CMAKE_SOURCE_DIR}/core/foundation/inc
67-
${CMAKE_SOURCE_DIR}/core/base/inc
68-
${CMAKE_SOURCE_DIR}/core/clib/inc # for snprintf.h
69-
${CMAKE_SOURCE_DIR}/core/meta/inc # for TGenericClassInfo.h
70-
${CMAKE_BINARY_DIR}/ginclude # for RConfigure.h and rootCommandLineOptionsHelp.h
71-
${cocoa_incl} # for CocoaUtils.h
72-
)
73-
74-
if(rpath)
75-
target_compile_definitions(root PRIVATE IS_RPATH_BUILD)
76-
endif()
18+
generateHeader(root
19+
${CMAKE_SOURCE_DIR}/core/base/src/root-argparse.py
20+
${CMAKE_BINARY_DIR}/ginclude/rootCommandLineOptionsHelp.h
21+
)
22+
23+
target_include_directories(root PRIVATE
24+
${CMAKE_SOURCE_DIR}/core/foundation/inc
25+
${CMAKE_SOURCE_DIR}/core/base/inc
26+
${CMAKE_SOURCE_DIR}/core/clib/inc # for snprintf.h
27+
${CMAKE_SOURCE_DIR}/core/meta/inc # for TGenericClassInfo.h
28+
${CMAKE_BINARY_DIR}/ginclude # for RConfigure.h and rootCommandLineOptionsHelp.h
29+
)
30+
31+
if(rpath)
32+
target_compile_definitions(root PRIVATE IS_RPATH_BUILD)
7733
endif()

0 commit comments

Comments
 (0)