Browse Source

Merge branch 'master' of ssh://code.petrovs.info:2233/blago/TangraPlay

pull/3/head 0.3.2
Blagovest Petrov 4 years ago
parent
commit
bfea17acaa
  1. 58
      CMakeLists.txt
  2. BIN
      Resources/128-apps-org.petrovs_info.tangraplay.png
  3. BIN
      Resources/16-apps-org.petrovs_info.tangraplay.png
  4. BIN
      Resources/32-apps-org.petrovs_info.tangraplay.png
  5. BIN
      Resources/48-apps-org.petrovs_info.tangraplay.png
  6. BIN
      Resources/64-apps-org.petrovs_info.tangraplay.png
  7. 10
      Resources/CMakeLists.txt
  8. 2
      TangraPlay.pro
  9. 3
      main.cpp
  10. 9
      main.qml
  11. 5
      make-flatpak.sh
  12. 32
      org.petrovs_info.tangraplay.appdata.xml
  13. 11
      org.petrovs_info.tangraplay.desktop
  14. 31
      org.petrovs_info.tangraplay.json

58
CMakeLists.txt

@ -0,0 +1,58 @@
project(tangraplay)
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
set(QT_MIN_VERSION "5.10.0")
set(KF5_DEP_VERSION "5.40.0")
# We need some parts of the ECM CMake helpers.
find_package(ECM ${KF5_DEP_VERSION} QUIET REQUIRED NO_MODULE)
# We append to the module path so modules can be overridden from the command line.
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Quick QuickControls2 Multimedia Widgets Gui )
include_directories(.)
include_directories(${Qt5Core_PRIVATE_INCLUDE_DIRS})
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(ECMOptionalAddSubdirectory)
include(ECMAddAppIcon)
include(ECMInstallIcons)
add_subdirectory(Resources)
qt5_add_resources(RESOURCES qml.qrc)
SET(SOURCES
main.cpp
)
add_executable(tangraplay
${SOURCES}
${RESOURCES}
)
qt5_use_modules(tangraplay Quick QuickControls2 Core Multimedia )
target_link_libraries(tangraplay
Qt5::Quick
Qt5::QuickControls2
Qt5::Core
Qt5::Widgets
Qt5::Gui
Qt5::Multimedia )
install(TARGETS tangraplay DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS org.petrovs_info.tangraplay.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES org.petrovs_info.tangraplay.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})

BIN
Resources/128-apps-org.petrovs_info.tangraplay.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
Resources/16-apps-org.petrovs_info.tangraplay.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

BIN
Resources/32-apps-org.petrovs_info.tangraplay.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
Resources/48-apps-org.petrovs_info.tangraplay.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
Resources/64-apps-org.petrovs_info.tangraplay.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

10
Resources/CMakeLists.txt

@ -0,0 +1,10 @@
ecm_install_icons(
ICONS
128-apps-org.petrovs_info.tangraplay.png
64-apps-org.petrovs_info.tangraplay.png
48-apps-org.petrovs_info.tangraplay.png
32-apps-org.petrovs_info.tangraplay.png
16-apps-org.petrovs_info.tangraplay.png
DESTINATION ${ICON_INSTALL_DIR}
)

2
TangraPlay.pro

@ -1,4 +1,4 @@
QT += quick QT += quick gui core widgets
CONFIG += c++11 CONFIG += c++11

3
main.cpp

@ -1,11 +1,12 @@
#include <QGuiApplication> #include <QGuiApplication>
#include <QApplication>
#include <QQmlApplicationEngine> #include <QQmlApplicationEngine>
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv); QApplication app(argc, argv);
QQmlApplicationEngine engine; QQmlApplicationEngine engine;
const QUrl url(QStringLiteral("qrc:/main.qml")); const QUrl url(QStringLiteral("qrc:/main.qml"));

9
main.qml

@ -113,6 +113,15 @@ Window {
onClicked: mainWindow.hide() onClicked: mainWindow.hide()
} }
Text {
id: appTitle
anchors.left: buttonMinimize.right
text: qsTr("TangraPlay")
font.pixelSize: 20
font.bold: true
color: "#f9c620"
}
} }
} }

5
make-flatpak.sh

@ -0,0 +1,5 @@
#!/bin/bash
flatpak-builder --user --install build-dir org.petrovs_info.tangraplay.json
flatpak run org.petrovs_info.tangraplay

32
org.petrovs_info.tangraplay.appdata.xml

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<component type="desktop">
<id>org.petrovs_info.tangraplay</id>
<launchable type="desktop-id">org.petrovs_info.tangraplay.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LGPL-2.0+</project_license>
<name>TangraPlay</name>
<summary>TangraPlay</summary>
<description>
<p>Application for Radio Tangra</p>
<p xml:lang="en-GB">Приложение за радио Тангра</p>
</description>
<releases>
<release version="0.0.1" date="2020-30-21"/>
</releases>
<screenshots>
<screenshot type="default">
<image type="source">https://tangraplay.petrovs.info/images/tangraplay.png</image>
</screenshot>
</screenshots>
<categories>
<category>Multimedia</category>
</categories>
<url type="homepage">https://tangraplay.petrovs.info</url>
<url type="bugtracker">https://code.petrovs.info/blago/TangraPlay/issues</url>
<project_group>petrovs_info</project_group>
<update_contact>blagovest_AT_petrovs.info</update_contact>
<provides>
<binary>tangraplay</binary>
</provides>
<content_rating type="oars-1.1"/>
</component>

11
org.petrovs_info.tangraplay.desktop

@ -0,0 +1,11 @@
[Desktop Entry]
Name=TangraPlay
GenericName=TangraPlay
Comment=Плеър за Рок Радио Тангра
Exec=tangraplay
Terminal=false
Icon=org.petrovs_info.tangraplay
Type=Application
X-KDE-PluginInfo-Website=http://tangraplay.petrovs.info
Categories=AudioVideo;Player
Keywords=Player;Radio;Tangra;Rock;Broadcast

31
org.petrovs_info.tangraplay.json

@ -0,0 +1,31 @@
{
"app-id": "org.petrovs_info.tangraplay",
"runtime": "org.kde.Platform",
"runtime-version": "5.15",
"sdk": "org.kde.Sdk",
"command": "tangraplay",
"finish-args": [
"--share=ipc",
"--socket=x11",
"--socket=wayland",
"--filesystem=host",
"--device=dri",
"--socket=pulseaudio",
"--share=network"
],
"modules": [
{
"name": "tangraplay",
"buildsystem": "cmake-ninja",
// "config-opts": ["-DCMAKE_BUILD_TYPE=RelWithDebInfo"],
"sources": [
{
"type": "git",
"url": "https://code.petrovs.info/blago/TangraPlay.git",
"branch": "flatpak-cmake"
}
]
}
]
}
Loading…
Cancel
Save