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 0000000..a21111b Binary files /dev/null and b/images/chromium.png differ 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