Skip to content

Commit

Permalink
Merge pull request #45 from TexasInstruments/chromium-sitara
Browse files Browse the repository at this point in the history
Sitara: Add Chromium browser support
  • Loading branch information
sskartheekadivi authored Feb 27, 2024
2 parents 566f413 + 78cd91c commit 1880e6e
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 6 deletions.
48 changes: 48 additions & 0 deletions apps/chromium_browser.qml
Original file line number Diff line number Diff line change
@@ -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"
}
}

10 changes: 8 additions & 2 deletions configs/am62pxx-evm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -94,15 +99,16 @@ 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;
engine->rootContext()->setContextProperty("live_camera", &live_camera);
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);
Expand Down
10 changes: 8 additions & 2 deletions configs/am62xx-evm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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);
Expand Down
11 changes: 9 additions & 2 deletions configs/am62xx-lp-evm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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);
Expand Down
Binary file added images/chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ti-apps-launcher.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<file>apps/benchmarks_jacinto.qml</file>
<file>apps/stats.qml</file>
<file>apps/codecs.qml</file>
<file>apps/chromium_browser.qml</file>
<file>apps/gpu_performance.qml</file>
<file>apps/camera.qml</file>
<file>apps/live_camera.qml</file>
Expand Down

0 comments on commit 1880e6e

Please sign in to comment.