From 78cd91cbf097a4e528826265d4e6d68cdcfe3280 Mon Sep 17 00:00:00 2001 From: Sai Sree Kartheek Adivi Date: Tue, 27 Feb 2024 09:26:30 +0000 Subject: [PATCH] Sitara: Add Chromium browser support Signed-off-by: Sai Sree Kartheek Adivi --- apps/chromium_browser.qml | 48 ++++++++++++++++++++++++++++++++++++++ configs/am62pxx-evm.cpp | 10 ++++++-- configs/am62xx-evm.cpp | 10 ++++++-- configs/am62xx-lp-evm.cpp | 11 +++++++-- images/chromium.png | Bin 0 -> 2897 bytes ti-apps-launcher.qrc | 1 + 6 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 apps/chromium_browser.qml create mode 100644 images/chromium.png diff --git a/apps/chromium_browser.qml b/apps/chromium_browser.qml new file mode 100644 index 0000000..488047c --- /dev/null +++ b/apps/chromium_browser.qml @@ -0,0 +1,48 @@ +import QtQml 2.1 +import QtQuick 2.14 +import QtMultimedia 5.1 +import QtQuick.Window 2.14 +import QtQuick.Controls 2.1 +import QtGraphicalEffects 1.12 +import Qt.labs.folderlistmodel 2.4 +import QtQuick.Controls.Styles 1.4 +import QtQuick.Extras 1.4 +import QtQuick.Layouts 1.3 + +Rectangle { + id: chromium + visible: true + anchors.fill: parent + color: "#344045" + Text { + id: heading + text: "Chromium Browser" + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + font.family: "Helvetica" + font.pixelSize: chromium.width * 0.03 + font.bold: true + color: "#FEFEFE" + } + Text { + id: chromium_status_msg + text: chromium_browser.status_msg + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: heading.bottom + anchors.topMargin: parent.height * 0.01 + font.family: "Helvetica" + font.pixelSize: chromium.width * 0.01 + color: "#DDDDDD" + } + Button { + id: chromium_button + text: chromium_browser.button + anchors.top: chromium_status_msg.bottom + anchors.topMargin: parent.height * 0.02 + anchors.horizontalCenter: parent.horizontalCenter + onClicked: chromium_browser.launch_or_stop() + font.pixelSize: chromium.width * 0.015 + font.family: "Helvetica" + } +} + diff --git a/configs/am62pxx-evm.cpp b/configs/am62pxx-evm.cpp index a685645..be43abc 100644 --- a/configs/am62pxx-evm.cpp +++ b/configs/am62pxx-evm.cpp @@ -34,7 +34,7 @@ power_actions include_powerbuttons[] = { } }; -int include_apps_count = 9; +int include_apps_count = 10; app_info include_apps[] = { { .qml_source = "industrial_control_sitara.qml", @@ -66,6 +66,11 @@ app_info include_apps[] = { .name = "Seva Store", .icon_source = "file:///opt/ti-apps-launcher/assets/seva_store.png" }, + { + .qml_source = "chromium_browser.qml", + .name = "Chromium", + .icon_source = "file:///opt/ti-apps-launcher/assets/chromium.png" + }, { .qml_source = "firefox_browser.qml", .name = "Firefox", @@ -94,8 +99,8 @@ QString seva_command = QString::fromStdString("seva-launcher-aarch64"); RunCmd *seva_store = new RunCmd(seva_command); RunCmd *firefox_browser = new RunCmd(QStringLiteral("docker run -v /run/user/1000/:/tmp/ -i --env http_proxy --env https_proxy --env no_proxy --env XDG_RUNTIME_DIR=/tmp/ --env WAYLAND_DISPLAY=wayland-1 -u user ghcr.io/texasinstruments/seva-browser:v1.0.0 https://www.ti.com/microcontrollers-mcus-processors/arm-based-processors/overview.html")); RunCmd *demo_3d = new RunCmd(QStringLiteral("/usr/bin/SGX/demos/Wayland/OpenGLESSkinning")); - RunCmd *poweraction = new RunCmd(QStringLiteral("")); +RunCmd *chromium_browser = new RunCmd(QStringLiteral("su weston -c \"chromium https://webglsamples.org/aquarium/aquarium.html\"")); void platform_setup(QQmlApplicationEngine *engine) { std::cout << "Running Platform Setup of AM62P!" << endl; @@ -103,6 +108,7 @@ void platform_setup(QQmlApplicationEngine *engine) { engine->rootContext()->setContextProperty("camera", &camera); engine->rootContext()->setContextProperty("cameralist", &camera.Camera_list); engine->rootContext()->setContextProperty("arm_analytics", &arm_analytics); + engine->rootContext()->setContextProperty("chromium_browser", chromium_browser); engine->rootContext()->setContextProperty("seva_store", seva_store); engine->rootContext()->setContextProperty("firefox_browser", firefox_browser); engine->rootContext()->setContextProperty("demo_3d", demo_3d); diff --git a/configs/am62xx-evm.cpp b/configs/am62xx-evm.cpp index be580ef..56c28d0 100644 --- a/configs/am62xx-evm.cpp +++ b/configs/am62xx-evm.cpp @@ -34,7 +34,7 @@ power_actions include_powerbuttons[] = { }; -int include_apps_count = 9; +int include_apps_count = 10; app_info include_apps[] = { { .qml_source = "industrial_control_sitara.qml", @@ -66,6 +66,11 @@ app_info include_apps[] = { .name = "Seva Store", .icon_source = "file:///opt/ti-apps-launcher/assets/seva_store.png" }, + { + .qml_source = "chromium_browser.qml", + .name = "Chromium", + .icon_source = "file:///opt/ti-apps-launcher/assets/chromium.png" + }, { .qml_source = "firefox_browser.qml", .name = "Firefox", @@ -93,13 +98,14 @@ QString seva_command = QString::fromStdString("seva-launcher-aarch64"); RunCmd *seva_store = new RunCmd(seva_command); RunCmd *firefox_browser = new RunCmd(QStringLiteral("docker run -v /run/user/1000/:/tmp/ -i --env http_proxy --env https_proxy --env no_proxy --env XDG_RUNTIME_DIR=/tmp/ --env WAYLAND_DISPLAY=wayland-1 -u user ghcr.io/texasinstruments/seva-browser:v1.0.0 https://www.ti.com/microcontrollers-mcus-processors/arm-based-processors/overview.html")); RunCmd *demo_3d = new RunCmd(QStringLiteral("/usr/bin/SGX/demos/Wayland/OpenGLESSkinning")); - RunCmd *poweraction = new RunCmd(QStringLiteral("")); +RunCmd *chromium_browser = new RunCmd(QStringLiteral("su weston -c \"chromium https://webglsamples.org/aquarium/aquarium.html\"")); void platform_setup(QQmlApplicationEngine *engine) { std::cout << "Running Platform Setup of AM62x!" << endl; engine->rootContext()->setContextProperty("live_camera", &live_camera); engine->rootContext()->setContextProperty("arm_analytics", &arm_analytics); + engine->rootContext()->setContextProperty("chromium_browser", chromium_browser); engine->rootContext()->setContextProperty("seva_store", seva_store); engine->rootContext()->setContextProperty("firefox_browser", firefox_browser); engine->rootContext()->setContextProperty("demo_3d", demo_3d); diff --git a/configs/am62xx-lp-evm.cpp b/configs/am62xx-lp-evm.cpp index 490f3b6..e295669 100644 --- a/configs/am62xx-lp-evm.cpp +++ b/configs/am62xx-lp-evm.cpp @@ -28,7 +28,8 @@ power_actions include_powerbuttons[] = { } }; -int include_apps_count = 9; + +int include_apps_count = 10; app_info include_apps[] = { { .qml_source = "industrial_control_sitara.qml", @@ -60,6 +61,11 @@ app_info include_apps[] = { .name = "Seva Store", .icon_source = "file:///opt/ti-apps-launcher/assets/seva_store.png" }, + { + .qml_source = "chromium_browser.qml", + .name = "Chromium", + .icon_source = "file:///opt/ti-apps-launcher/assets/chromium.png" + }, { .qml_source = "firefox_browser.qml", .name = "Firefox", @@ -87,13 +93,14 @@ QString seva_command = QString::fromStdString("seva-launcher-aarch64"); RunCmd *seva_store = new RunCmd(seva_command); RunCmd *firefox_browser = new RunCmd(QStringLiteral("docker run -v /run/user/1000/:/tmp/ -i --env http_proxy --env https_proxy --env no_proxy --env XDG_RUNTIME_DIR=/tmp/ --env WAYLAND_DISPLAY=wayland-1 -u user ghcr.io/texasinstruments/seva-browser:v1.0.0 https://www.ti.com/microcontrollers-mcus-processors/arm-based-processors/overview.html")); RunCmd *demo_3d = new RunCmd(QStringLiteral("/usr/bin/SGX/demos/Wayland/OpenGLESSkinning")); - RunCmd *poweraction = new RunCmd(QStringLiteral("")); +RunCmd *chromium_browser = new RunCmd(QStringLiteral("su weston -c \"chromium https://webglsamples.org/aquarium/aquarium.html\"")); void platform_setup(QQmlApplicationEngine *engine) { std::cout << "Running Platform Setup of AM62x LP EVM!" << endl; engine->rootContext()->setContextProperty("live_camera", &live_camera); engine->rootContext()->setContextProperty("arm_analytics", &arm_analytics); + engine->rootContext()->setContextProperty("chromium_browser", chromium_browser); engine->rootContext()->setContextProperty("seva_store", seva_store); engine->rootContext()->setContextProperty("firefox_browser", firefox_browser); engine->rootContext()->setContextProperty("demo_3d", demo_3d); diff --git a/images/chromium.png b/images/chromium.png new file mode 100644 index 0000000000000000000000000000000000000000..a21111bd8164f8f6ba87e0782537aff1a6e70737 GIT binary pat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cKYg{OTZ%TfH;d42ZXc4XTs!?+HjDllu!UAsmipGaP7CF;WM_dL?7oKWL{wJA9))y;bT}bcs`~rOKH; z%gN58qQ7h3dFbMV$mRoS&wzaFSgT3mb43}PVL7I!ux`mT|C$r8cX38YYz+GvS{64y z79+BooXjxQsi`-JbUrWGWtg_<#`HZP^PFoxF#>7LWdCq(<`TETBMr}?JJ6|wLj1A z@uX~*QO>sASu`u`M{`n>SVj3T#(-ow-KV0gFG9xbXD0Lf6{xJ9WvZf5CuzO?T@?Y67VC2YpU00000NkvXXu0mjf>p`HM literal 0 HcmV?d00001 diff --git a/ti-apps-launcher.qrc b/ti-apps-launcher.qrc index 3408e02..933caae 100644 --- a/ti-apps-launcher.qrc +++ b/ti-apps-launcher.qrc @@ -11,6 +11,7 @@ apps/benchmarks_jacinto.qml apps/stats.qml apps/codecs.qml + apps/chromium_browser.qml apps/gpu_performance.qml apps/camera.qml apps/live_camera.qml