Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/root-ci-config/buildconfig/global.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ builtin_lzma=OFF
builtin_mathtext=ON
builtin_nlohmannjson=OFF
builtin_openssl=OFF
builtin_jsroot=ON
builtin_mathjax=ON
builtin_openui5=ON
builtin_pcre=OFF
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ add_custom_command(OUTPUT ${stamp_file}
set(directories_to_copy test icons fonts macros tutorials)
if(http)
list(APPEND directories_to_copy js)
if(builtin_jsroot)
list(APPEND directories_deps BUILTIN_JSROOT)
endif()
endif()
if(webgui)
list(APPEND directories_to_copy ui5)
Expand All @@ -356,7 +359,7 @@ foreach(dir_to_copy ${directories_to_copy})
add_custom_command(OUTPUT ${artifacts_out}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/${dir_to_copy} ${CMAKE_BINARY_DIR}/${dir_to_copy}
COMMENT "Copy ${dir_to_copy}"
DEPENDS ${artifacts_in})
DEPENDS ${artifacts_in} ${directories_deps})
endforeach()

#---Copy etc/* files individually to the build area at build time---------------------------------
Expand Down Expand Up @@ -661,9 +664,6 @@ if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_INSTALL_PREFIX)
install(DIRECTORY fonts/ DESTINATION ${CMAKE_INSTALL_FONTDIR} ${DIR_PERMISSIONS})
install(DIRECTORY icons/ DESTINATION ${CMAKE_INSTALL_ICONDIR} ${DIR_PERMISSIONS})
install(DIRECTORY macros/ DESTINATION ${CMAKE_INSTALL_MACRODIR} ${DIR_PERMISSIONS})
if(http)
install(DIRECTORY js/ DESTINATION ${CMAKE_INSTALL_JSROOTDIR} ${DIR_PERMISSIONS})
endif()
if(cefweb AND TARGET ROOTCefDisplay)
install(DIRECTORY ${CMAKE_BINARY_DIR}/Frameworks/ DESTINATION ${CMAKE_INSTALL_FRAMEWORKSDIR} ${DIR_PERMISSIONS})
endif()
Expand Down
32 changes: 32 additions & 0 deletions builtins/jsroot/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright (C) 1995-2026, Rene Brun and Fons Rademakers.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not usually rely on GitHub for downloading tarballs. Can this become, also in another PR, an LCG provided tarball?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course.
If you put JSROOT release on LCG, I will directly modify this PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# All rights reserved.
#
# For the licensing terms see $ROOTSYS/LICENSE.
# For the list of contributors see $ROOTSYS/README/CREDITS.

ExternalProject_Add(BUILTIN_JSROOT
URL https://github.com/root-project/jsroot/releases/download/7.12.0/JsRoot7120.tar.gz
URL_HASH SHA256=e5d82888750bda70090ac4bff355734000372c983a3eff11d67efa09f30d4b06

# GIT_REPOSITORY https://github.com/root-project/jsroot.git
# GIT_TAG 7.12.0
# GIT_SHALLOW TRUE # only works with tags/branches, comment out when commit hashes used
# UPDATE_COMMAND ""
# PATCH_COMMAND ${CMAKE_COMMAND} -E rm -rf <SOURCE_DIR>/demo
# <SOURCE_DIR>/fonts
# <SOURCE_DIR>/docs
# <SOURCE_DIR>/libs
# <SOURCE_DIR>/server
# <SOURCE_DIR>/.git
# <SOURCE_DIR>/.github
# <SOURCE_DIR>/api.htm
# <SOURCE_DIR>/examples.htm

SOURCE_DIR ${CMAKE_BINARY_DIR}/js/
TIMEOUT 600
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
)
Comment thread
guitargeek marked this conversation as resolved.
Resolved

install(DIRECTORY ${CMAKE_BINARY_DIR}/js/ DESTINATION ${CMAKE_INSTALL_JSROOTDIR} COMPONENT libraries ${DIR_PERMISSIONS})
6 changes: 4 additions & 2 deletions builtins/mathjax/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
ExternalProject_Add(
MATHJAX
BUILTIN_MATHJAX
URL ${lcgpackages}/mathjax-3.2.0.tar.gz
URL_HASH SHA256=6847f1cfdd980afbe31b466474da301a56ab859a67d8035442b052dd4ac2fa03
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
SOURCE_DIR ${CMAKE_BINARY_DIR}/js/mathjax/
TIMEOUT 600
DEPENDS BUILTIN_JSROOT
)

install(DIRECTORY ${CMAKE_BINARY_DIR}/js/mathjax/ DESTINATION ${CMAKE_INSTALL_JSROOTDIR}/mathjax ${DIR_PERMISSIONS})
# install no longer necessary - will be performed together with jsroot
# install(DIRECTORY ${CMAKE_BINARY_DIR}/js/mathjax/ DESTINATION ${CMAKE_INSTALL_JSROOTDIR}/mathjax ${DIR_PERMISSIONS})
5 changes: 3 additions & 2 deletions builtins/openui5/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(OPENUI5_VERSION "1.152.0")

ExternalProject_Add(
OPENUI5
BUILTIN_OPENUI5
URL ${lcgpackages}/openui5-runtime-${OPENUI5_VERSION}.zip
URL_HASH SHA256=4882023d4760ed4c20602e36dd183b02a538fc7e8bbfda607b6e25bd1cbbcdb1
CONFIGURE_COMMAND ""
Expand All @@ -10,4 +10,5 @@ ExternalProject_Add(
SOURCE_DIR ${CMAKE_BINARY_DIR}/ui5/distribution
TIMEOUT 600
)
install(DIRECTORY ${CMAKE_BINARY_DIR}/ui5/distribution/ DESTINATION ${CMAKE_INSTALL_OPENUI5DIR}/distribution/ COMPONENT libraries FILES_MATCHING PATTERN "*")

install(DIRECTORY ${CMAKE_BINARY_DIR}/ui5/distribution/ DESTINATION ${CMAKE_INSTALL_OPENUI5DIR}/distribution/ COMPONENT libraries ${DIR_PERMISSIONS})
2 changes: 2 additions & 0 deletions cmake/modules/RootBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ ROOT_BUILD_OPTION(builtin_lzma OFF "Build lzma from an automatically downloaded
ROOT_BUILD_OPTION(builtin_mathtext ON "Build mathtext from an in-built source tarball (does not require network)")
ROOT_BUILD_OPTION(builtin_nlohmannjson OFF "Build nlohmann/json from an automatically downloaded source tarball (requires network)")
ROOT_BUILD_OPTION(builtin_openssl OFF "Build OpenSSL from an automatically downloaded source tarball (requires network)")
ROOT_BUILD_OPTION(builtin_jsroot OFF "Install JSROOT to run webgui widgets (requires network)")
ROOT_BUILD_OPTION(builtin_mathjax OFF "Install mathjax package for mathtext rendering in JSROOT (requires network)")
ROOT_BUILD_OPTION(builtin_openui5 OFF "Install openui5 package to run webgui widgets (requires network)")
ROOT_BUILD_OPTION(builtin_pcre OFF "Build PCRE2 from an automatically downloaded source tarball (requires network)")
Expand Down Expand Up @@ -274,6 +275,7 @@ if(builtin_all)
if(APPLE)
set(builtin_openssl_defvalue ON)
endif()
set(builtin_jsroot_defvalue ON)
set(builtin_mathjax_defvalue ON)
set(builtin_openui5_defvalue ON)
set(builtin_pcre_defvalue ON)
Expand Down
20 changes: 17 additions & 3 deletions cmake/modules/RootConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,30 @@ if(IS_ABSOLUTE ${CMAKE_INSTALL_FONTDIR})
else()
set(ttffontdir ${prefix}/${CMAKE_INSTALL_FONTDIR})
endif()
if(IS_ABSOLUTE ${CMAKE_INSTALL_JSROOTDIR})
set(jsrootdir ${CMAKE_INSTALL_JSROOTDIR})

if(NOT "${JSROOT_CUSTOM_LOCATION}" STREQUAL "")
set(jsroot_config "HttpServ.JSRootPath: ${JSROOT_CUSTOM_LOCATION}")
elseif(IS_ABSOLUTE ${CMAKE_INSTALL_JSROOTDIR})
set(jsroot_config "#HttpServ.JSRootPath: ${CMAKE_INSTALL_JSROOTDIR}")
else()
set(jsrootdir ${prefix}/${CMAKE_INSTALL_JSROOTDIR})
set(jsroot_config "#HttpServ.JSRootPath: ${prefix}/${CMAKE_INSTALL_JSROOTDIR}")
endif()

if(IS_ABSOLUTE ${CMAKE_INSTALL_OPENUI5DIR})
set(openui5dir ${CMAKE_INSTALL_OPENUI5DIR})
else()
set(openui5dir ${prefix}/${CMAKE_INSTALL_OPENUI5DIR})
endif()

if(NOT "${OPENUI5_CUSTOM_LOCATION}" STREQUAL "")
set(openui5_config "WebGui.openui5src: ${OPENUI5_CUSTOM_LOCATION}")
elseif(IS_ABSOLUTE ${CMAKE_INSTALL_OPENUI5DIR})
set(openui5_config "#WebGui.openui5src: ${CMAKE_INSTALL_OPENUI5DIR}/distribution")
else()
set(openui5_config "#WebGui.openui5src: ${prefix}/${CMAKE_INSTALL_OPENUI5DIR}/distribution")
endif()


if(IS_ABSOLUTE ${CMAKE_INSTALL_MACRODIR})
set(macrodir ${CMAKE_INSTALL_MACRODIR})
else()
Expand Down
47 changes: 27 additions & 20 deletions cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,23 @@ if (testing OR testsupport)
endif()

#------------------------------------------------------------------------------------
if(http)

if(builtin_jsroot)
ROOT_CHECK_CONNECTION("builtin_jsroot=OFF")
if (NO_CONNECTION)
message(SEND_ERROR "builtin_jsroot=ON requires internet connection, check it or disable feature")
list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_jsroot=OFF)
endif()
add_subdirectory(builtins/jsroot)
set(JSROOT_CUSTOM_LOCATION "")
elseif(http OR webgui)
message(WARNING "Without builtin_jsroot option http and webgui components are not working offline")
set(JSROOT_CUSTOM_LOCATION "https://root.cern/js/7.12.0/")
endif()


#------------------------------------------------------------------------------------
if(http AND builtin_jsroot)
if(builtin_mathjax)
ROOT_CHECK_CONNECTION("builtin_mathjax=OFF")
if (NO_CONNECTION)
Expand All @@ -1118,26 +1134,17 @@ endif()

#------------------------------------------------------------------------------------
if(webgui)
if(NOT "$ENV{OPENUI5DIR}" STREQUAL "" AND EXISTS "$ENV{OPENUI5DIR}/resources/sap-ui-core.js")
# create symbolic link on existing openui5 installation
# should be used only for debug purposes to be able try different openui5 version
# cannot be used for installation purposes
message(STATUS "openui5 - use from $ENV{OPENUI5DIR}, only for debug purposes")
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/ui5)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
$ENV{OPENUI5DIR} ${CMAKE_BINARY_DIR}/ui5/distribution)
else()
if(builtin_openui5)
ROOT_CHECK_CONNECTION("builtin_openui5=OFF")
if (NO_CONNECTION)
message(SEND_ERROR "builtin_openui5=ON requires internet connection, check it or disable feature")
list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_openui5=OFF)
endif()
add_subdirectory(builtins/openui5)
else()
message(SEND_ERROR "Without builtin_openui5 option most of webgui components will not work, either disable webgui or enable builtin_openui5")
list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_openui5=ON)
if(builtin_openui5)
ROOT_CHECK_CONNECTION("builtin_openui5=OFF")
if (NO_CONNECTION)
message(SEND_ERROR "builtin_openui5=ON requires internet connection, check it or disable feature")
list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_openui5=OFF)
endif()
add_subdirectory(builtins/openui5)
set(OPENUI5_CUSTOM_LOCATION "")
else()
message(WARNING "Without builtin_openui5 option webgui components will not work offline")
set(OPENUI5_CUSTOM_LOCATION "https://sdk.openui5.org/1.152.0/")
Comment thread
guitargeek marked this conversation as resolved.
Resolved
endif()
add_subdirectory(builtins/rendercore)
endif()
Expand Down
6 changes: 4 additions & 2 deletions config/rootrc.in
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ GeomPainter.Name: @root_geompainter_type@

# THttpServer specific settings
# location of JavaScript ROOT sources
#HttpServ.JSRootPath: @jsrootdir@
@jsroot_config@
# Default setting for enabling or disabling JSROOT.
# This can be toggled in the notebook using the `%jsroot on/off` command.
Jupyter.JSRoot: @root_jupyter_jsroot@
Expand All @@ -251,7 +251,9 @@ WebGui.ChromeVersion: @chromemajor@
WebGui.Edge: @edgeexe@
WebGui.Firefox: @firefoxexe@
# location of OpenUi5 applications for ROOT like canvas, eve, fitpanel, ...
#WebGui.RootUi5Path: @openui5dir@
#WebGui.RootUi5Path: @openui5dir@
# location of OpenUi5 framework
@openui5_config@

# OpenGL options (defaults are shown)
# Default user interaction model for 3D view manipulation assumes that user
Expand Down
2 changes: 1 addition & 1 deletion gui/webdisplay/src/RWebWindowsManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ std::string RWebWindowsManager::GetUrl(RWebWindow &win, bool remote, std::string
/// WebGui.Debug: "no" (default), "yes" - enable more debug output on JSROOT side
/// WebGui.ConnCredits: 10 - number of packets which can be send by server or client without acknowledge from receiving side
/// WebGui.QueueLength: 10 - maximal number of entires in window send queue
/// WebGui.openui5src: alternative location for openui5 like https://openui5.hana.ondemand.com/1.152.0/
/// WebGui.openui5src: alternative location for openui5 like https://sdk.openui5.org/1.152.0/
/// WebGui.openui5libs: list of pre-loaded ui5 libs like sap.m, sap.ui.layout, sap.ui.unified
/// WebGui.openui5theme: openui5 theme like sap_fiori_3 (default) or sap_horizon
/// WebGui.DarkMode: "no" (default), "yes" - switch to JSROOT dark mode and will use sap_fiori_3_dark theme
Expand Down
21 changes: 0 additions & 21 deletions js/LICENSE

This file was deleted.

Loading
Loading