From dd3ebb7be7523c0ef8fedee2fb602c0386455d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Logier?= Date: Mon, 28 Jan 2019 16:51:46 +0100 Subject: [PATCH 01/16] add installation path --- somafm-qt.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/somafm-qt.pro b/somafm-qt.pro index b031225..fca8ecb 100644 --- a/somafm-qt.pro +++ b/somafm-qt.pro @@ -9,6 +9,7 @@ QT += core gui network xml multimedia greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = somafm-qt +TARGET.path = /usr/local TEMPLATE = app From 30b584d75ae6ffdbe0ee0f830e45703bb59bb6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Logier?= Date: Mon, 28 Jan 2019 17:08:15 +0100 Subject: [PATCH 02/16] add installation path --- somafm-qt.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/somafm-qt.pro b/somafm-qt.pro index fca8ecb..1023064 100644 --- a/somafm-qt.pro +++ b/somafm-qt.pro @@ -9,7 +9,8 @@ QT += core gui network xml multimedia greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = somafm-qt -TARGET.path = /usr/local +target.path = /usr/local/somafm-qt +INSTALLS += target TEMPLATE = app From 46b53e7619d17154d3e6b9368372836ff23114ca Mon Sep 17 00:00:00 2001 From: fredix Date: Mon, 28 Jan 2019 20:30:50 +0100 Subject: [PATCH 03/16] install path --- somafm-qt.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/somafm-qt.pro b/somafm-qt.pro index 1023064..8a3e639 100644 --- a/somafm-qt.pro +++ b/somafm-qt.pro @@ -9,7 +9,7 @@ QT += core gui network xml multimedia greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = somafm-qt -target.path = /usr/local/somafm-qt +target.path = /usr/local/bin INSTALLS += target TEMPLATE = app From fdadc5ec055ec81cf46b165c0becd406546ae9ef Mon Sep 17 00:00:00 2001 From: fredix Date: Tue, 29 Jan 2019 00:19:16 +0100 Subject: [PATCH 04/16] install snap --- snap/snapcraft.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 snap/snapcraft.yaml diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000..181f4ef --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,36 @@ +name: somafm-qt +base: core18 +version: 'master' +summary: SomaFM Radio (somafm.com) player (desktop, qt5) +description: | + SomaFM Radio (somafm.com) player (desktop, qt5) +grade: stable +confinement: strict + +apps: + somafm-qt: + command: usr/local/bin/somafm-qt + environment: + LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio + plugs: + - home + - desktop + - network + - pulseaudio + - x11 + +parts: + somafm-qt: + source: https://github.com/fredix/somafm-qt.git + source-type: git + plugin: qmake + build-packages: + - g++ + - qtbase5-dev + - qtmultimedia5-dev + - libpulse-dev + stage-packages: + - libqt5gui5 + - libqt5multimedia5 + - libqt5widgets5 + - libpulse0 From 239432beb57a00b7680ee37b3d16d3fef9d6ff12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Logier?= Date: Tue, 29 Jan 2019 10:52:57 +0100 Subject: [PATCH 05/16] fix install path --- somafm-qt.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/somafm-qt.pro b/somafm-qt.pro index 8a3e639..f795dc6 100644 --- a/somafm-qt.pro +++ b/somafm-qt.pro @@ -9,7 +9,7 @@ QT += core gui network xml multimedia greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = somafm-qt -target.path = /usr/local/bin +target.path = /usr/bin INSTALLS += target TEMPLATE = app From 11d52372ef745049a77fd7c1ccaa76a16f788aa5 Mon Sep 17 00:00:00 2001 From: fredix Date: Tue, 29 Jan 2019 20:41:42 +0100 Subject: [PATCH 06/16] install snap --- snap/snapcraft.yaml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 181f4ef..bcb5f93 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -4,12 +4,12 @@ version: 'master' summary: SomaFM Radio (somafm.com) player (desktop, qt5) description: | SomaFM Radio (somafm.com) player (desktop, qt5) -grade: stable -confinement: strict +grade: devel +confinement: devmode apps: somafm-qt: - command: usr/local/bin/somafm-qt + command: desktop-launch $SNAP/usr/bin/somafm-qt environment: LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio plugs: @@ -17,6 +17,7 @@ apps: - desktop - network - pulseaudio + - wayland - x11 parts: @@ -25,12 +26,23 @@ parts: source-type: git plugin: qmake build-packages: - - g++ - qtbase5-dev - qtmultimedia5-dev + - wayland-protocols - libpulse-dev stage-packages: - libqt5gui5 - libqt5multimedia5 - libqt5widgets5 + - libqt5dbus5 + - libqt5core5a + - qt5-default - libpulse0 + after: + - desktop-qt5 + + desktop-qt5: + source: https://github.com/ubuntu/snapcraft-desktop-helpers.git + source-branch: stable + source-subdir: qt + plugin: make From bc5b2eb8752cbef791f866436e61ef1537f32667 Mon Sep 17 00:00:00 2001 From: fredix Date: Tue, 29 Jan 2019 22:32:21 +0100 Subject: [PATCH 07/16] install snap --- snap/snapcraft.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index bcb5f93..9ada45d 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -33,11 +33,16 @@ parts: stage-packages: - libqt5gui5 - libqt5multimedia5 + - libqt5multimedia5-plugins - libqt5widgets5 - libqt5dbus5 - libqt5core5a - qt5-default - libpulse0 + - gstreamer1.0-pulseaudio + - gstreamer1.0-plugins-good + - gstreamer1.0-plugins-ugly + - gstreamer1.0-plugins-bad after: - desktop-qt5 From 9cba8a7ca12962f55c21b5021b215e87c779c522 Mon Sep 17 00:00:00 2001 From: fredix Date: Thu, 31 Jan 2019 20:44:36 +0100 Subject: [PATCH 08/16] fixed snap --- snap/snapcraft.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 9ada45d..dfad38b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -5,7 +5,7 @@ summary: SomaFM Radio (somafm.com) player (desktop, qt5) description: | SomaFM Radio (somafm.com) player (desktop, qt5) grade: devel -confinement: devmode +confinement: strict apps: somafm-qt: @@ -14,8 +14,11 @@ apps: LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio plugs: - home + - unity7 - desktop + - desktop-legacy - network + - opengl - pulseaudio - wayland - x11 @@ -29,22 +32,21 @@ parts: - qtbase5-dev - qtmultimedia5-dev - wayland-protocols - - libpulse-dev stage-packages: - libqt5gui5 - libqt5multimedia5 - libqt5multimedia5-plugins - libqt5widgets5 - - libqt5dbus5 - - libqt5core5a - - qt5-default - - libpulse0 +# - libqt5dbus5 +# - libqt5core5a +# - qt5-default - gstreamer1.0-pulseaudio - gstreamer1.0-plugins-good - gstreamer1.0-plugins-ugly - gstreamer1.0-plugins-bad - after: - - desktop-qt5 + - libslang2 + - libgpm2 + after: [desktop-qt5] desktop-qt5: source: https://github.com/ubuntu/snapcraft-desktop-helpers.git From a4be760697ecf5c2fba878ef0b8a2b256f3159f1 Mon Sep 17 00:00:00 2001 From: fredix Date: Sat, 2 Feb 2019 10:55:56 +0100 Subject: [PATCH 09/16] set license --- snap/snapcraft.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index dfad38b..58987ef 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -4,8 +4,9 @@ version: 'master' summary: SomaFM Radio (somafm.com) player (desktop, qt5) description: | SomaFM Radio (somafm.com) player (desktop, qt5) -grade: devel +grade: stable confinement: strict +license: MIT apps: somafm-qt: From 3198156180e471daf6f207c4d3a3edf49d230679 Mon Sep 17 00:00:00 2001 From: fredix Date: Mon, 25 Feb 2019 13:29:43 +0100 Subject: [PATCH 10/16] added news tab --- mainwindow.cpp | 6 ++++++ mainwindow.h | 2 ++ somafm-qt.pro | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index fc72618..6c44cda 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -33,6 +33,12 @@ MainWindow::MainWindow(QWidget *parent) m_tabWidget->addTab(m_channelsView, tr("Channels")); m_tabWidget->addTab(m_settingsView, tr("Settings")); + m_newsView = new QWebEngineView(); + m_newsView->setUrl(QUrl(QStringLiteral("http://somafm.com/news/"))); + + m_tabWidget->addTab(m_newsView, tr("News")); + + m_playerView = new PlayerView(this); m_mainLayout = new QVBoxLayout; diff --git a/mainwindow.h b/mainwindow.h index bfa4ddc..6e44fbf 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -9,6 +9,7 @@ #include #include #include +#include #include "channelsview.h" #include "dataprovider.h" @@ -39,6 +40,7 @@ class MainWindow : public QMainWindow PlayerView *m_playerView; QSystemTrayIcon *m_trayIcon; SettingsView *m_settingsView; + QWebEngineView * m_newsView; public slots: void startPlayer(QString); diff --git a/somafm-qt.pro b/somafm-qt.pro index f795dc6..5d54205 100644 --- a/somafm-qt.pro +++ b/somafm-qt.pro @@ -6,7 +6,7 @@ QT += core gui network xml multimedia -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets webenginewidgets TARGET = somafm-qt target.path = /usr/bin From 4b4c4c965649188e2e76b3d7bddf29512c5e0523 Mon Sep 17 00:00:00 2001 From: fredix Date: Mon, 25 Feb 2019 20:47:38 +0100 Subject: [PATCH 11/16] added history tab --- mainwindow.cpp | 16 ++++++++++++---- mainwindow.h | 3 ++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 6c44cda..395a4a1 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -28,16 +28,22 @@ MainWindow::MainWindow(QWidget *parent) m_tabWidget = new QTabWidget(this); m_channelsView = new ChannelsView(this); m_channelsView->setFocus(); - m_settingsView = new SettingsView(this); m_tabWidget->addTab(m_channelsView, tr("Channels")); - m_tabWidget->addTab(m_settingsView, tr("Settings")); + + + m_historyView = new QWebEngineView(); + m_historyView->setUrl(QUrl(QStringLiteral("http://somafm.com/groovesalad/songhistory.html"))); + m_tabWidget->addTab(m_historyView, tr("History")); + m_newsView = new QWebEngineView(); m_newsView->setUrl(QUrl(QStringLiteral("http://somafm.com/news/"))); - m_tabWidget->addTab(m_newsView, tr("News")); + m_settingsView = new SettingsView(this); + m_tabWidget->addTab(m_settingsView, tr("Settings")); + m_playerView = new PlayerView(this); @@ -125,7 +131,9 @@ void MainWindow::updateTitle(QString title) { } void MainWindow::startPlayer(QString id) { - qDebug() << "MainWindow::startPlayer"; + qDebug() << "MainWindow::startPlayer : " << id; + QUrl history_url = "http://somafm.com/" + id + "/songhistory.html"; + m_historyView->load(history_url); QUrl url = m_dataProvider->getPlaylistUrl(id); m_playerView->play(id, url); diff --git a/mainwindow.h b/mainwindow.h index 6e44fbf..548b553 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -40,7 +40,8 @@ class MainWindow : public QMainWindow PlayerView *m_playerView; QSystemTrayIcon *m_trayIcon; SettingsView *m_settingsView; - QWebEngineView * m_newsView; + QWebEngineView *m_newsView; + QWebEngineView *m_historyView; public slots: void startPlayer(QString); From 4ed7412a00b72cc0ff527e4eb3b7ccc1003f01e4 Mon Sep 17 00:00:00 2001 From: fredix Date: Mon, 25 Feb 2019 21:59:48 +0100 Subject: [PATCH 12/16] files for snapcraft --- .snap-data/qt.WebEngineProcess.conf | 6 ++++++ .snap-data/qt.conf | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 .snap-data/qt.WebEngineProcess.conf create mode 100644 .snap-data/qt.conf diff --git a/.snap-data/qt.WebEngineProcess.conf b/.snap-data/qt.WebEngineProcess.conf new file mode 100644 index 0000000..334e9cf --- /dev/null +++ b/.snap-data/qt.WebEngineProcess.conf @@ -0,0 +1,6 @@ +[Paths] +Prefix = ../../../../../ +LibraryExecutables = usr/lib/x86_64-linux-gnu/qt5/libexec +Plugins = usr/lib/x86_64-linux-gnu/qt5/plugins +Translations = usr/share/qt5/translations +Data = usr/share/qt5 diff --git a/.snap-data/qt.conf b/.snap-data/qt.conf new file mode 100644 index 0000000..e057d77 --- /dev/null +++ b/.snap-data/qt.conf @@ -0,0 +1,6 @@ +[Paths] +Prefix = ../../../../ +LibraryExecutables = usr/lib/x86_64-linux-gnu/qt5/libexec +Plugins = usr/lib/x86_64-linux-gnu/qt5/plugins +Translations = usr/share/qt5/translations +Data = usr/share/qt5 From a9bf1a5877291682df1fc52259e8007aa6106766 Mon Sep 17 00:00:00 2001 From: fredix Date: Mon, 4 Mar 2019 22:25:08 +0100 Subject: [PATCH 13/16] try to fix Could not find QtWebEngineProcess --- snap/snapcraft.yaml | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 58987ef..595dc73 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -7,13 +7,21 @@ description: | grade: stable confinement: strict license: MIT +architectures: [amd64] + +plugs: + browser-sandbox: + interface: browser-support + allow-sandbox: false apps: somafm-qt: command: desktop-launch $SNAP/usr/bin/somafm-qt environment: LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio + QTWEBENGINE_DISABLE_SANDBOX: 1 plugs: + - browser-sandbox - home - unity7 - desktop @@ -25,28 +33,49 @@ apps: - x11 parts: + qtconf: + plugin: dump + source: .snap-data/ + organize: + qt.conf: usr/lib/somafm-qt/qt.conf + qt.WebEngineProcess.conf: usr/lib/x86_64-linux-gnu/qt5/libexec/qt.conf + after: [somafm-qt] + somafm-qt: - source: https://github.com/fredix/somafm-qt.git - source-type: git +# source: https://github.com/fredix/somafm-qt.git +# source-type: git + source: . plugin: qmake build-packages: - qtbase5-dev - qtmultimedia5-dev + - qtwebengine5-dev + - qtwebengine5-dev-tools - wayland-protocols + - qttools5-dev-tools + - qt5-default stage-packages: - libqt5gui5 - libqt5multimedia5 - libqt5multimedia5-plugins + - libqt5multimediawidgets5 - libqt5widgets5 -# - libqt5dbus5 -# - libqt5core5a -# - qt5-default + - libqt5webenginecore5 + - libqt5webenginewidgets5 + - libqt5webengine5 + - qtwayland5 + - libqt5dbus5 + - libqt5core5a - gstreamer1.0-pulseaudio + - gstreamer1.0-plugins-base - gstreamer1.0-plugins-good - gstreamer1.0-plugins-ugly - gstreamer1.0-plugins-bad - libslang2 - libgpm2 + - libglu1-mesa + - ttf-ubuntu-font-family + - fonts-dejavu after: [desktop-qt5] desktop-qt5: From 2576438f1c64453651b189045f1770c1b586f235 Mon Sep 17 00:00:00 2001 From: fredix Date: Wed, 11 Sep 2019 23:55:19 +0200 Subject: [PATCH 14/16] update snapcraft --- snap/snapcraft.yaml | 50 ++++++++++++++++++++++++++++++++++++++------- snap_build.txt | 4 ++++ 2 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 snap_build.txt diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 595dc73..b46fa52 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -9,24 +9,38 @@ confinement: strict license: MIT architectures: [amd64] -plugs: - browser-sandbox: - interface: browser-support - allow-sandbox: false +#plugs: +# browser-sandbox: +# interface: browser-support +# allow-sandbox: false + +# https://bugs.launchpad.net/snapcraft/+bug/1836206/ +layout: + /usr/share/qt5: + bind: $SNAP/usr/share/qt5 apps: somafm-qt: command: desktop-launch $SNAP/usr/bin/somafm-qt environment: LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio - QTWEBENGINE_DISABLE_SANDBOX: 1 +# QTWEBENGINE_DISABLE_SANDBOX: 1 + QT_PLUGIN_PATH: $"QT_PLUGIN_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/" + QTWEBENGINEPROCESS_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/libexec plugs: - - browser-sandbox +# - browser-sandbox + - browser-support - home - unity7 - desktop - desktop-legacy - network + - network-bind + - network-manager-observe +# - network-observe +# - network-setup-observe +# - network-manager +# - system-observe - opengl - pulseaudio - wayland @@ -37,7 +51,7 @@ parts: plugin: dump source: .snap-data/ organize: - qt.conf: usr/lib/somafm-qt/qt.conf + qt.conf: usr/local/lib/somafm-qt/qt.conf qt.WebEngineProcess.conf: usr/lib/x86_64-linux-gnu/qt5/libexec/qt.conf after: [somafm-qt] @@ -46,6 +60,7 @@ parts: # source-type: git source: . plugin: qmake + build-attributes: [keep-execstack] build-packages: - qtbase5-dev - qtmultimedia5-dev @@ -76,6 +91,7 @@ parts: - libglu1-mesa - ttf-ubuntu-font-family - fonts-dejavu + - qt5dxcb-plugin after: [desktop-qt5] desktop-qt5: @@ -83,3 +99,23 @@ parts: source-branch: stable source-subdir: qt plugin: make + make-parameters: ["FLAVOR=qt5"] + build-packages: + - build-essential + - qtbase5-dev + - dpkg-dev + stage-packages: + - libxkbcommon0 + - ttf-ubuntu-font-family + - dmz-cursor-theme + - light-themes + - adwaita-icon-theme + - gnome-themes-standard + - shared-mime-info + - libqt5gui5 + - libgdk-pixbuf2.0-0 + - libqt5svg5 # for loading icon themes which are svg + - try: [appmenu-qt5] # not available on core18 + - locales-all + - xdg-user-dirs + - fcitx-frontend-qt5 diff --git a/snap_build.txt b/snap_build.txt new file mode 100644 index 0000000..66e0778 --- /dev/null +++ b/snap_build.txt @@ -0,0 +1,4 @@ +snapcraft +snap install somafm-qt_master_amd64.snap --dangerous +snap connect somafm-qt:network-manager-observe +somafm-qt From 7577ee845dcda8a6d339ca140e33117a4758643b Mon Sep 17 00:00:00 2001 From: fredix Date: Sun, 19 Jul 2020 13:29:17 +0200 Subject: [PATCH 15/16] fixed font bug on channel's name --- channelsview.cpp | 3 ++- snap/snapcraft.yaml | 29 +++++++++++++++++++++++------ somafm-qt.pro | 1 + wrapper.sh | 10 ++++++++++ 4 files changed, 36 insertions(+), 7 deletions(-) create mode 100755 wrapper.sh diff --git a/channelsview.cpp b/channelsview.cpp index 4f09e3a..1c1ef00 100644 --- a/channelsview.cpp +++ b/channelsview.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include "channelsview.h" @@ -187,7 +188,7 @@ void ChannelsView::updateChannelList(ChannelList newList) { m_rowHeight, Qt::KeepAspectRatio); item->setData(pixmap, Qt::DecorationRole); - item->setFont(QFont("", -1, QFont::Bold)); + //item->setFont(QFont("", -1, QFont::Bold)); item->setTextAlignment(Qt::AlignCenter); } if((*it).value("favorite") == "yes") { diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index b46fa52..ddd001b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -16,12 +16,19 @@ architectures: [amd64] # https://bugs.launchpad.net/snapcraft/+bug/1836206/ layout: - /usr/share/qt5: - bind: $SNAP/usr/share/qt5 + /usr/share/qt5: + bind: $SNAP/usr/share/qt5 + /usr/lib/x86_64-linux-gnu/qt5/libexec: + bind: $SNAP/usr/lib/x86_64-linux-gnu/qt5/libexec + /usr/lib/x86_64-linux-gnu/qt5/plugins: + bind: $SNAP/usr/lib/x86_64-linux-gnu/qt5/plugins + apps: somafm-qt: - command: desktop-launch $SNAP/usr/bin/somafm-qt +# command: desktop-launch $SNAP/usr/bin/somafm-qt + command: desktop-launch $SNAP/usr/bin/wrapper.sh +# command: wrapper environment: LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio # QTWEBENGINE_DISABLE_SANDBOX: 1 @@ -52,6 +59,7 @@ parts: source: .snap-data/ organize: qt.conf: usr/local/lib/somafm-qt/qt.conf + qt.conf: usr/lib/somafm-qt/qt.conf qt.WebEngineProcess.conf: usr/lib/x86_64-linux-gnu/qt5/libexec/qt.conf after: [somafm-qt] @@ -66,10 +74,9 @@ parts: - qtmultimedia5-dev - qtwebengine5-dev - qtwebengine5-dev-tools - - wayland-protocols - qttools5-dev-tools - - qt5-default stage-packages: + - qt5-default - libqt5gui5 - libqt5multimedia5 - libqt5multimedia5-plugins @@ -78,7 +85,9 @@ parts: - libqt5webenginecore5 - libqt5webenginewidgets5 - libqt5webengine5 + - libqt5webkit5 - qtwayland5 + - wayland-protocols - libqt5dbus5 - libqt5core5a - gstreamer1.0-pulseaudio @@ -92,7 +101,7 @@ parts: - ttf-ubuntu-font-family - fonts-dejavu - qt5dxcb-plugin - after: [desktop-qt5] +# after: [desktop-qt5] desktop-qt5: source: https://github.com/ubuntu/snapcraft-desktop-helpers.git @@ -119,3 +128,11 @@ parts: - locales-all - xdg-user-dirs - fcitx-frontend-qt5 + + + wrapper: + plugin: dump + after: [somafm-qt] + source: . + organize: + wrapper.sh: usr/bin/wrapper.sh diff --git a/somafm-qt.pro b/somafm-qt.pro index 5d54205..bf4add3 100644 --- a/somafm-qt.pro +++ b/somafm-qt.pro @@ -13,6 +13,7 @@ target.path = /usr/bin INSTALLS += target TEMPLATE = app +# QMAKE_CXXFLAGS += "-fno-sized-deallocation" SOURCES += main.cpp\ mainwindow.cpp \ diff --git a/wrapper.sh b/wrapper.sh new file mode 100755 index 0000000..13fd634 --- /dev/null +++ b/wrapper.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# fonts +# export XDG_DATA_HOME=$SNAP/usr/share +export FONTCONFIG_PATH=$SNAP/etc/fonts/config.d +export FONTCONFIG_FILE=$SNAP/etc/fonts/fonts.conf + +# cd $SNAP_USER_DATA + +exec $SNAP/usr/bin/somafm-qt From a909789ff148ca82aba4e680e7fe0ca2cf3a73e3 Mon Sep 17 00:00:00 2001 From: fredix Date: Sun, 19 Jul 2020 21:44:16 +0200 Subject: [PATCH 16/16] really fixed font bug on channel's name --- channelsview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channelsview.cpp b/channelsview.cpp index 1c1ef00..352ca06 100644 --- a/channelsview.cpp +++ b/channelsview.cpp @@ -188,7 +188,7 @@ void ChannelsView::updateChannelList(ChannelList newList) { m_rowHeight, Qt::KeepAspectRatio); item->setData(pixmap, Qt::DecorationRole); - //item->setFont(QFont("", -1, QFont::Bold)); + item->setFont(QFont("AnyStyle", -1, QFont::Bold)); item->setTextAlignment(Qt::AlignCenter); } if((*it).value("favorite") == "yes") {