mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
Merge pull request #504 from clangen/clangen/contributions-03-12-2022
Merge community provided contributions and resolve conflicts.
This commit is contained in:
commit
090c5f288d
@ -4,28 +4,13 @@ if (NOT "${LIBOPENMPT}" STREQUAL "LIBOPENMPT-NOTFOUND")
|
||||
add_plugin("src/plugins/libopenmptdecoder" "openmptdecoder")
|
||||
endif()
|
||||
|
||||
# systemd / MPRIS detection
|
||||
if (NOT ENABLE_MPRIS MATCHES "false")
|
||||
find_library(LIB_SYSTEMD NAMES systemd)
|
||||
if (NOT LIB_SYSTEMD MATCHES "LIB_SYSTEMD-NOTFOUND")
|
||||
message(STATUS "[mpris] systemd found at " ${LIB_SYSTEMD})
|
||||
message(STATUS "[mpris] setting ENABLE_MPRIS=true")
|
||||
set(ENABLE_MPRIS "true")
|
||||
else()
|
||||
message(STATUS "[mpris] systemd *not* found. MPRIS plugin not enabled")
|
||||
set(ENABLE_MPRIS "false")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
add_plugin("src/plugins/alsaout" "alsaout")
|
||||
add_plugin("src/plugins/pulseout" "pulseout")
|
||||
add_plugin("src/plugins/mpris" "mpris")
|
||||
if (${ENABLE_PIPEWIRE} MATCHES "true")
|
||||
add_plugin("src/plugins/pipewireout" "pipewireout")
|
||||
endif()
|
||||
if (${ENABLE_MPRIS} MATCHES "true")
|
||||
add_plugin("src/plugins/mpris" "mpris")
|
||||
endif()
|
||||
if (${ENABLE_SNDIO} MATCHES "true")
|
||||
add_plugin("src/plugins/sndioout" "sndioout")
|
||||
endif()
|
||||
|
@ -1,7 +1,12 @@
|
||||
macro(add_plugin plugin_dir plugin_name)
|
||||
message(STATUS "[add-plugin] adding '${plugin_name}' at path '${plugin_dir}")
|
||||
add_subdirectory(${plugin_dir})
|
||||
add_dependencies(musikcube ${plugin_name})
|
||||
add_dependencies(musikcubed ${plugin_name})
|
||||
add_dependencies(core_c_demo ${plugin_name})
|
||||
get_property(PLUGIN_DISABLED GLOBAL PROPERTY "DISABLE_${plugin_name}")
|
||||
if (NOT PLUGIN_DISABLED STREQUAL "true")
|
||||
add_dependencies(musikcube ${plugin_name})
|
||||
add_dependencies(musikcubed ${plugin_name})
|
||||
add_dependencies(core_c_demo ${plugin_name})
|
||||
else()
|
||||
message(STATUS "[add-plugin] *** WARNING! *** ${plugin_name} not found.")
|
||||
endif()
|
||||
endmacro(add_plugin)
|
@ -1,3 +1,11 @@
|
||||
0.97.1
|
||||
|
||||
* added the ability to use `libelogind` or `basu` instead of `libsystemd` for
|
||||
the `mpris` plugin (@robertgzr)
|
||||
* some warning cleanups when using wsprintw (@trofi)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
0.97.0
|
||||
|
||||
* no functional changes to the app
|
||||
@ -7,10 +15,14 @@
|
||||
distribution that are more universally compatible across different
|
||||
versions of macOS and Linux distributions.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
0.96.13
|
||||
|
||||
* macOS and Linux only release that fixes standalone binaries.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
0.96.11
|
||||
|
||||
* added support for ffmpeg5 libraries.
|
||||
@ -23,15 +35,21 @@
|
||||
* added additional PipeWire output debugging.
|
||||
* rewrote build system and packaging scripts.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
0.96.10
|
||||
|
||||
* fixed `-rpath` for macOS build.
|
||||
* fixed race condition in WasapiOut that caused the app to crash.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
0.96.9
|
||||
|
||||
* fixed `-rpath` to use `$ORIGIN` instead of `./` to appease `Feodra 35`.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
0.96.8
|
||||
|
||||
* updated `FfmpegDecoder` to perform resampling internally when `WasapiOutput`
|
||||
@ -58,11 +76,15 @@
|
||||
|
||||
0.96.7
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
* re-compile for Windows; Windows Defender was unhappy with the original
|
||||
binaries.
|
||||
|
||||
0.96.6
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
* fixed some drawing issues with overlays/dialogs with certain versions of
|
||||
ncurses.
|
||||
* added category-level (e.g. album, artist, etc) durations in browse and
|
||||
|
@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.0)
|
||||
project(musikcube)
|
||||
set (musikcube_VERSION_MAJOR 0)
|
||||
set (musikcube_VERSION_MINOR 97)
|
||||
set (musikcube_VERSION_PATCH 0)
|
||||
set (musikcube_VERSION_PATCH 1)
|
||||
set (musikcube_VERSION "${musikcube_VERSION_MAJOR}.${musikcube_VERSION_MINOR}.${musikcube_VERSION_PATCH}")
|
||||
set (LIBRARY_OUTPUT_PATH ${musikcube_SOURCE_DIR}/bin/plugins)
|
||||
set (EXECUTABLE_OUTPUT_PATH ${musikcube_SOURCE_DIR}/bin)
|
||||
|
@ -1,6 +1,6 @@
|
||||
%define name musikcube
|
||||
%define build_timestamp %{lua: print(os.date("%Y%m%d"))}
|
||||
%define version 0.97.0
|
||||
%define version 0.97.1
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{dist}
|
||||
|
@ -38,9 +38,9 @@
|
||||
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 97
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_COMMIT_HASH "#5496aba9"
|
||||
#define VERSION "0.97.0"
|
||||
#define VERSION_PATCH 1
|
||||
#define VERSION_COMMIT_HASH "#0199dba0"
|
||||
#define VERSION "0.97.1"
|
||||
|
||||
namespace musik {
|
||||
namespace cube {
|
||||
|
@ -32,8 +32,6 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdafx.h>
|
||||
#include "WindowUtil.h"
|
||||
|
||||
@ -52,4 +50,4 @@ namespace musik { namespace cube { namespace windowutil {
|
||||
return false;
|
||||
}
|
||||
|
||||
} } }
|
||||
} } }
|
||||
|
@ -363,7 +363,7 @@ size_t TransportWindow::WritePlayingFormat(WINDOW *w, size_t width) {
|
||||
metadataFieldToPosition[token->value] = Position(x, y, cols);
|
||||
|
||||
ON(w, attr);
|
||||
checked_wprintw(w, value.c_str());
|
||||
checked_wprintw(w, "%s", value.c_str());
|
||||
OFF(w, attr);
|
||||
|
||||
remaining -= cols;
|
||||
@ -678,7 +678,7 @@ void TransportWindow::Update(TimeMode timeMode) {
|
||||
|
||||
if (stopped && !this->buffering) {
|
||||
ON(c, disabled);
|
||||
checked_wprintw(c, Strings.STOPPED.c_str());
|
||||
checked_wprintw(c, "%s", Strings.STOPPED.c_str());
|
||||
displayCache.Reset();
|
||||
OFF(c, disabled);
|
||||
}
|
||||
@ -692,7 +692,7 @@ void TransportWindow::Update(TimeMode timeMode) {
|
||||
wmove(c, 0, shuffleOffset);
|
||||
Color const shuffleAttrs = this->playback.IsShuffled() ? gb : disabled;
|
||||
ON(c, shuffleAttrs);
|
||||
checked_wprintw(c, shuffleLabel.c_str());
|
||||
checked_wprintw(c, "%s", shuffleLabel.c_str());
|
||||
OFF(c, shuffleAttrs);
|
||||
this->shufflePos.Set(shuffleOffset, narrow_cast<int>(shuffleWidth));
|
||||
|
||||
@ -811,7 +811,7 @@ void TransportWindow::Update(TimeMode timeMode) {
|
||||
wmove(c, 1, 0); /* move cursor to the second line */
|
||||
|
||||
ON(c, volumeAttrs);
|
||||
checked_wprintw(c, volume.c_str());
|
||||
checked_wprintw(c, "%s", volume.c_str());
|
||||
OFF(c, volumeAttrs);
|
||||
|
||||
if (replayGainEnabled) {
|
||||
@ -834,7 +834,7 @@ void TransportWindow::Update(TimeMode timeMode) {
|
||||
|
||||
ON(c, repeatAttrs);
|
||||
this->repeatPos.Set(getcurx(c), narrow_cast<int>(u8cols(repeatModeLabel)));
|
||||
checked_wprintw(c, repeatModeLabel.c_str());
|
||||
checked_wprintw(c, "%s", repeatModeLabel.c_str());
|
||||
OFF(c, repeatAttrs);
|
||||
|
||||
this->Invalidate();
|
||||
|
@ -226,7 +226,7 @@ void DialogOverlay::OnRedraw() {
|
||||
if (this->title.size()) {
|
||||
wmove(c, currentY, currentX);
|
||||
wattron(c, A_BOLD);
|
||||
checked_wprintw(c, text::Ellipsize(this->title, this->width - 4).c_str());
|
||||
checked_wprintw(c, "%s", text::Ellipsize(this->title, this->width - 4).c_str());
|
||||
wattroff(c, A_BOLD);
|
||||
currentY += 2;
|
||||
}
|
||||
@ -234,7 +234,7 @@ void DialogOverlay::OnRedraw() {
|
||||
if (this->message.size()) {
|
||||
for (size_t i = 0; i < messageLines.size(); i++) {
|
||||
wmove(c, currentY, currentX);
|
||||
checked_wprintw(c, this->messageLines.at(i).c_str());
|
||||
checked_wprintw(c, "%s", this->messageLines.at(i).c_str());
|
||||
++currentY;
|
||||
}
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ void InputOverlay::OnRedraw() {
|
||||
if (this->title.size()) {
|
||||
wmove(c, 0, 1);
|
||||
wattron(c, A_BOLD);
|
||||
checked_wprintw(c, text::Align(this->title, text::AlignCenter, this->width - 4).c_str());
|
||||
checked_wprintw(c, "%s", text::Align(this->title, text::AlignCenter, this->width - 4).c_str());
|
||||
wattroff(c, A_BOLD);
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ void ListOverlay::UpdateContents() {
|
||||
if (this->title.size()) {
|
||||
wmove(c, currentY, currentX);
|
||||
wattron(c, A_BOLD);
|
||||
checked_wprintw(c, text::Align(this->title, text::AlignCenter, this->width - 4).c_str());
|
||||
checked_wprintw(c, "%s", text::Align(this->title, text::AlignCenter, this->width - 4).c_str());
|
||||
wattroff(c, A_BOLD);
|
||||
currentY += 2;
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ void ShortcutsWindow::OnRedraw() {
|
||||
}
|
||||
|
||||
wattron(c, keyAttrs);
|
||||
checked_wprintw(c, key.c_str());
|
||||
checked_wprintw(c, "%s", key.c_str());
|
||||
wattroff(c, keyAttrs);
|
||||
|
||||
remaining -= len;
|
||||
@ -252,7 +252,7 @@ void ShortcutsWindow::OnRedraw() {
|
||||
len = remaining;
|
||||
}
|
||||
|
||||
checked_wprintw(c, value.c_str());
|
||||
checked_wprintw(c, "%s", value.c_str());
|
||||
remaining -= len;
|
||||
}
|
||||
}
|
||||
|
@ -115,6 +115,6 @@ void ToastOverlay::OnRedraw() {
|
||||
|
||||
for (int i = 0; i < (int) this->titleLines.size(); i++) {
|
||||
wmove(c, i, 1);
|
||||
checked_wprintw(c, text::Ellipsize(this->titleLines[i], this->width - 4).c_str());
|
||||
checked_wprintw(c, "%s", text::Ellipsize(this->titleLines[i], this->width - 4).c_str());
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
@ -2,8 +2,22 @@ set (mpris_SOURCES
|
||||
mpris.cpp
|
||||
dbus.cpp)
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules (SYSTEMD REQUIRED libsystemd)
|
||||
if (USE_ELOGIND MATCHES "true")
|
||||
set(SDBUS "libelogind >= 239.3")
|
||||
elseif (USE_BASU MATCHES "true")
|
||||
set(SDBUS "basu")
|
||||
else()
|
||||
set(SDBUS "libsystemd")
|
||||
endif()
|
||||
|
||||
add_library(mpris SHARED ${mpris_SOURCES})
|
||||
target_link_libraries(mpris systemd)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(SDBUS IMPORTED_TARGET ${SDBUS})
|
||||
|
||||
if (SDBUS_LINK_LIBRARIES STREQUAL "")
|
||||
message(STATUS "[mpris] plugin enabled. using " ${SDBUS_LINK_LIBRARIES})
|
||||
add_library(mpris SHARED ${mpris_SOURCES})
|
||||
target_link_libraries(mpris PkgConfig::SDBUS)
|
||||
else()
|
||||
set_property(GLOBAL PROPERTY DISABLE_mpris "true")
|
||||
message(STATUS "[mpris] plugin *not* enabled. setting 'DISABLE_mpris=true'")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user