mirror of
https://github.com/spalencsar/bearwave.git
synced 2026-07-06 22:24:17 +02:00
fix: About dialog crash and flatpak build id (1.0.5 pkgrel 8)
Replace the tall ScrollView/license layout that crashed under KDE Dialog with a compact layout matching the other dialogs. Inject BEARWAVE_GIT_HASH into flatpak builds via manifest env (no .git in builder sandbox).
This commit is contained in:
2
PKGBUILD
2
PKGBUILD
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Sebastian Palencsar <moin@nerdbear.de>
|
# Maintainer: Sebastian Palencsar <moin@nerdbear.de>
|
||||||
pkgname=bearwave-git
|
pkgname=bearwave-git
|
||||||
pkgver=1.0.5
|
pkgver=1.0.5
|
||||||
pkgrel=7
|
pkgrel=8
|
||||||
pkgdesc="KDE-focused desktop internet radio app"
|
pkgdesc="KDE-focused desktop internet radio app"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="https://github.com/spalencsar/bearwave"
|
url="https://github.com/spalencsar/bearwave"
|
||||||
|
|||||||
@@ -19,20 +19,34 @@ for arg in "$@"; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
git_hash="$(git -C "${root}" rev-parse --short HEAD 2>/dev/null || echo unknown)"
|
||||||
|
build_manifest="${root}/.flatpak-builder-manifest.json"
|
||||||
|
python3 - "${root}/de.nerdbear.bearwave.json" "${build_manifest}" "${git_hash}" <<'PY'
|
||||||
|
import json, sys
|
||||||
|
src, dst, git_hash = sys.argv[1], sys.argv[2], sys.argv[3]
|
||||||
|
with open(src, encoding="utf-8") as f:
|
||||||
|
manifest = json.load(f)
|
||||||
|
module = manifest["modules"][0]
|
||||||
|
module.setdefault("build-options", {}).setdefault("env", {})["BEARWAVE_GIT_HASH"] = git_hash
|
||||||
|
with open(dst, "w", encoding="utf-8") as f:
|
||||||
|
json.dump(manifest, f, indent=4)
|
||||||
|
f.write("\n")
|
||||||
|
PY
|
||||||
|
|
||||||
if [[ "${mode}" == "reexport" ]]; then
|
if [[ "${mode}" == "reexport" ]]; then
|
||||||
flatpak-builder \
|
flatpak-builder \
|
||||||
--repo=flatpak_repo \
|
--repo=flatpak_repo \
|
||||||
--gpg-sign="${gpg_key_id}" \
|
--gpg-sign="${gpg_key_id}" \
|
||||||
--export-only \
|
--export-only \
|
||||||
flatpak_build \
|
flatpak_build \
|
||||||
de.nerdbear.bearwave.json
|
"${build_manifest}"
|
||||||
else
|
else
|
||||||
flatpak-builder \
|
flatpak-builder \
|
||||||
--repo=flatpak_repo \
|
--repo=flatpak_repo \
|
||||||
--gpg-sign="${gpg_key_id}" \
|
--gpg-sign="${gpg_key_id}" \
|
||||||
--force-clean \
|
--force-clean \
|
||||||
flatpak_build \
|
flatpak_build \
|
||||||
de.nerdbear.bearwave.json
|
"${build_manifest}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
flatpak build-update-repo --gpg-sign="${gpg_key_id}" flatpak_repo
|
flatpak build-update-repo --gpg-sign="${gpg_key_id}" flatpak_repo
|
||||||
|
|||||||
@@ -18,6 +18,11 @@ set(SOURCES
|
|||||||
# Create executable
|
# Create executable
|
||||||
add_executable(bearwave ${SOURCES})
|
add_executable(bearwave ${SOURCES})
|
||||||
|
|
||||||
|
if(BEARWAVE_GIT_HASH)
|
||||||
|
# set via -D from build scripts
|
||||||
|
elseif(DEFINED ENV{BEARWAVE_GIT_HASH} AND NOT "$ENV{BEARWAVE_GIT_HASH}" STREQUAL "")
|
||||||
|
set(BEARWAVE_GIT_HASH "$ENV{BEARWAVE_GIT_HASH}")
|
||||||
|
else()
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND git rev-parse --short HEAD
|
COMMAND git rev-parse --short HEAD
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||||
@@ -25,6 +30,7 @@ execute_process(
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
ERROR_QUIET
|
ERROR_QUIET
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
if(NOT BEARWAVE_GIT_HASH)
|
if(NOT BEARWAVE_GIT_HASH)
|
||||||
set(BEARWAVE_GIT_HASH "unknown")
|
set(BEARWAVE_GIT_HASH "unknown")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -14,6 +14,12 @@ Dialog {
|
|||||||
property string appVersion: Qt.application.version
|
property string appVersion: Qt.application.version
|
||||||
property string buildId: "?"
|
property string buildId: "?"
|
||||||
|
|
||||||
|
title: qsTr("About BearWave")
|
||||||
|
modal: true
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: compactMode ? 360 : 480
|
||||||
|
standardButtons: Dialog.Ok
|
||||||
|
|
||||||
readonly property string versionLine: {
|
readonly property string versionLine: {
|
||||||
var version = root.appVersion
|
var version = root.appVersion
|
||||||
if (version === undefined || version === null || version === "")
|
if (version === undefined || version === null || version === "")
|
||||||
@@ -24,25 +30,13 @@ Dialog {
|
|||||||
return qsTr("Version") + " " + String(version) + " · " + qsTr("build") + " " + String(build)
|
return qsTr("Version") + " " + String(version) + " · " + qsTr("build") + " " + String(build)
|
||||||
}
|
}
|
||||||
|
|
||||||
modal: true
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: compactMode ? 360 : 520
|
|
||||||
height: compactMode ? 560 : 680
|
|
||||||
standardButtons: Dialog.Ok
|
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
spacing: 16
|
spacing: 12
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
spacing: 6
|
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.preferredWidth: 72
|
Layout.preferredWidth: 72
|
||||||
Layout.preferredHeight: 72
|
Layout.preferredHeight: 72
|
||||||
sourceSize.width: 72
|
|
||||||
sourceSize.height: 72
|
|
||||||
source: "qrc:/assets/app/bearwave.png"
|
source: "qrc:/assets/app/bearwave.png"
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
smooth: true
|
smooth: true
|
||||||
@@ -53,14 +47,14 @@ Dialog {
|
|||||||
text: qsTr("BearWave")
|
text: qsTr("BearWave")
|
||||||
color: BearTheme.textMain
|
color: BearTheme.textMain
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: 26
|
font.pixelSize: 22
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: qsTr("Internet Radio Player for KDE")
|
text: qsTr("Internet Radio Player for KDE")
|
||||||
color: BearTheme.textMuted
|
color: BearTheme.textMuted
|
||||||
font.pixelSize: 14
|
font.pixelSize: 13
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@@ -69,144 +63,42 @@ Dialog {
|
|||||||
color: BearTheme.textMuted
|
color: BearTheme.textMuted
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
spacing: 8
|
|
||||||
Layout.topMargin: 8
|
|
||||||
Layout.bottomMargin: 8
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: qsTr("Author: Sebastian Palencsár")
|
text: qsTr("Author: Sebastian Palencsár")
|
||||||
color: BearTheme.textMain
|
color: BearTheme.textMain
|
||||||
font.bold: true
|
font.pixelSize: 13
|
||||||
font.pixelSize: 14
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
spacing: 16
|
spacing: 12
|
||||||
|
|
||||||
ToolButton {
|
Button {
|
||||||
Layout.preferredWidth: 40
|
text: qsTr("Website")
|
||||||
Layout.preferredHeight: 40
|
|
||||||
onClicked: Qt.openUrlExternally("https://palencsar.pro")
|
onClicked: Qt.openUrlExternally("https://palencsar.pro")
|
||||||
ToolTip.visible: hovered
|
|
||||||
ToolTip.text: qsTr("Open website")
|
|
||||||
contentItem: Item {
|
|
||||||
Image {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: 19
|
|
||||||
height: 19
|
|
||||||
source: "qrc:/assets/ui/globe.svg"
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
smooth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
background: Rectangle {
|
|
||||||
radius: 20
|
|
||||||
color: parent.hovered ? "#274261" : "#1f3147"
|
|
||||||
border.color: BearTheme.cardBorder
|
|
||||||
border.width: 1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
Button {
|
||||||
Layout.preferredWidth: 40
|
text: qsTr("GitHub")
|
||||||
Layout.preferredHeight: 40
|
|
||||||
onClicked: Qt.openUrlExternally("https://github.com/spalencsar")
|
onClicked: Qt.openUrlExternally("https://github.com/spalencsar")
|
||||||
ToolTip.visible: hovered
|
|
||||||
ToolTip.text: qsTr("Open GitHub")
|
|
||||||
contentItem: Item {
|
|
||||||
Image {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: 19
|
|
||||||
height: 19
|
|
||||||
source: "qrc:/assets/ui/github.svg"
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
smooth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
background: Rectangle {
|
|
||||||
radius: 20
|
|
||||||
color: parent.hovered ? "#274261" : "#1f3147"
|
|
||||||
border.color: BearTheme.cardBorder
|
|
||||||
border.width: 1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
Button {
|
||||||
Layout.preferredWidth: 40
|
text: qsTr("LinkedIn")
|
||||||
Layout.preferredHeight: 40
|
|
||||||
onClicked: Qt.openUrlExternally("https://www.linkedin.com/in/spalencsar/")
|
onClicked: Qt.openUrlExternally("https://www.linkedin.com/in/spalencsar/")
|
||||||
ToolTip.visible: hovered
|
|
||||||
ToolTip.text: qsTr("Open LinkedIn")
|
|
||||||
contentItem: Item {
|
|
||||||
Image {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: 19
|
|
||||||
height: 19
|
|
||||||
source: "qrc:/assets/ui/linkedin.svg"
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
smooth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
background: Rectangle {
|
|
||||||
radius: 20
|
|
||||||
color: parent.hovered ? "#274261" : "#1f3147"
|
|
||||||
border.color: BearTheme.cardBorder
|
|
||||||
border.width: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
spacing: 8
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("GNU GPLv3 License")
|
Layout.preferredWidth: root.width - 48
|
||||||
color: BearTheme.textMain
|
|
||||||
font.bold: true
|
|
||||||
}
|
|
||||||
Label {
|
|
||||||
text: qsTr("Copyright (c) 2026")
|
|
||||||
color: BearTheme.textMuted
|
color: BearTheme.textMuted
|
||||||
font.pixelSize: 11
|
font.pixelSize: 10
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.minimumHeight: 140
|
|
||||||
radius: 8
|
|
||||||
color: "#101a26"
|
|
||||||
border.color: BearTheme.cardBorder
|
|
||||||
|
|
||||||
ScrollView {
|
|
||||||
id: licenseScroll
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: 10
|
|
||||||
clip: true
|
|
||||||
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
|
||||||
|
|
||||||
Label {
|
|
||||||
width: licenseScroll.availableWidth
|
|
||||||
color: BearTheme.textMain
|
|
||||||
font.pixelSize: 11
|
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>."
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
text: qsTr("Licensed under GNU GPLv3-or-later. Copyright (c) 2026 Sebastian Palencsar.")
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user