Skip to content
Merged
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
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ setup_third_party(
GIT_TAG v0.1.0)

# Standalone desktop apps. Each ships a standalone executable launched via
# QProcess; the calculator parser lib (cfdesktop_calculator_parser) is also
# reused in-process by the desktop builtin_apps target, so apps must configure
# before desktop.
# QProcess. (Historically apps/ had to precede desktop because desktop reused
# the calculator parser lib defined here; that coupling has been removed -- the
# desktop core no longer reaches into apps/. apps/ now only needs to precede
# test/, which it does; the apps-before-desktop ordering below is convention.)
log_module_start("apps")
add_subdirectory(apps)
log_module_end("apps")
Expand Down
2 changes: 1 addition & 1 deletion apps/calculator/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"app_id": "calculator",
"display_name": "Calculator",
"exec": "calculator",
"launch_kind": "auto"
"launch_kind": "detached"
}
4 changes: 0 additions & 4 deletions desktop/ui/CFDesktopEntity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "components/WindowManager.h"
#include "components/builtin_apps/about_panel.h"
#include "components/builtin_apps/builtin_panel_registry.h"
#include "components/builtin_apps/calculator_builtin_panel.h"
#include "components/launcher/app_discoverer.h"
#include "components/launcher/app_launch_service.h"
#include "components/launcher/app_launcher.h"
Expand Down Expand Up @@ -330,9 +329,6 @@ CFDesktopEntity::RunsSetupResult CFDesktopEntity::run_init(RunsSetupMethod m) {
auto& builtin_registry = cf::desktop::desktop_component::BuiltinPanelRegistry::instance();
auto* about_panel = new cf::desktop::desktop_component::AboutPanel(desktop_entity_);
builtin_registry.registerPanel(about_panel);
auto* calc_builtin =
new cf::desktop::desktop_component::CalculatorBuiltinPanel(desktop_entity_);
builtin_registry.registerPanel(calc_builtin);

// Hardware tier decides whether Auto apps run in-process (Low tier) or
// detached (Mid/High). setDeviceConfigOverride (env/tests) takes precedence.
Expand Down
20 changes: 8 additions & 12 deletions desktop/ui/components/builtin_apps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
# Builtin in-process apps (child widgets over the desktop, e.g. About).
# Builtin in-process panels (child widgets over the desktop, e.g. About).
# These are NOT launched via QProcess; CFDesktop shows them directly, which
# suits single-framebuffer targets (linuxfb) where an external GUI app would
# fight the desktop for /dev/fb0.
#
# Note: user apps (calculator/noter/system_state/alarm_clock/calendar) are all
# standalone executables launched as detached processes — the
# desktop core holds no app source. This lib keeps only desktop-core builtin
# panels (About) + the generic registry. The builtin MECHANISM (IBuiltinPanel +
# BuiltinPanelRegistry + LaunchKind::BuiltinPanel + HardwareTier adjudication)
# stays available for any future panel that needs in-process rendering.
add_library(cfdesktop_builtin_apps STATIC
about_panel.cpp
builtin_panel_registry.cpp
calculator_builtin_panel.cpp
# Architecture exception: compile the standalone Calculator's panel source
# into the builtin lib so the same panel runs in-process. The standalone
# executable (apps/calculator/) compiles its own copy independently.
${CMAKE_SOURCE_DIR}/apps/calculator/calculator_panel.cpp
)

target_include_directories(cfdesktop_builtin_apps PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
)

# calculator_panel.h lives under apps/calculator/.
target_include_directories(cfdesktop_builtin_apps PRIVATE
${CMAKE_SOURCE_DIR}/apps/calculator
)

target_link_libraries(cfdesktop_builtin_apps
PRIVATE
Qt6::Core Qt6::Gui Qt6::Widgets
cfdesktop_calculator_parser
QuarkWidgets::quarkwidgets
cflogger # Diagnostic logging for the registry
)
69 changes: 0 additions & 69 deletions desktop/ui/components/builtin_apps/calculator_builtin_panel.cpp

This file was deleted.

113 changes: 0 additions & 113 deletions desktop/ui/components/builtin_apps/calculator_builtin_panel.h

This file was deleted.

Loading