Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed May 2, 2024
2 parents 8c906f5 + e838116 commit 57aa432
Show file tree
Hide file tree
Showing 284 changed files with 13,971 additions and 7,429 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Checks: '*,-altera-*,-clang-analyzer-optin.performance.Padding,-bugprone-easily-swappable-parameters,-bugprone-assignment-in-if-condition,-clang-diagnostic-invalid-command-line-argument,-concurrency-mt-unsafe,-cppcoreguidelines*,-hicpp-*,-llvmlibc-restrict-system-libc-headers,-readability-identifier-length,-readability-function-cognitive-complexity,-google-readability-function-size,-readability-function-size,-readability-magic-numbers,-readability-non-const-parameter,-google-readability-todo'
Checks: '*,-clang-analyzer-optin.core.EnumCastOutOfRange,-readability-avoid-nested-conditional-operator,-bugprone-switch-missing-default-case,-misc-include-cleaner,-altera-*,-clang-analyzer-optin.performance.Padding,-bugprone-easily-swappable-parameters,-bugprone-assignment-in-if-condition,-clang-diagnostic-invalid-command-line-argument,-concurrency-mt-unsafe,-cppcoreguidelines*,-hicpp-*,-llvmlibc-restrict-system-libc-headers,-readability-identifier-length,-readability-function-cognitive-complexity,-google-readability-function-size,-readability-function-size,-readability-magic-numbers,-readability-non-const-parameter,-google-readability-todo'
WarningsAsErrors: ''
HeaderFilterRegex: ''
FormatStyle: none
Expand Down
43 changes: 0 additions & 43 deletions .eslintrc-min.json

This file was deleted.

62 changes: 0 additions & 62 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: install linters
run: |
sudo apt-get update
sudo apt-get install -y npm cppcheck flawfinder clang-tidy
sudo apt-get install -y npm clang-tidy
sudo ./build.sh installdeps
npm install eslint --save-dev
npm install stylelint --save-dev
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,38 @@ https://github.com/jcorporation/myMPD/

***

## myMPD v15.0.0 (2024-05-02)

This release reworks the table and grid layouts for all views. Each view can now be displayed as table or grid.

### API changes

- The `cols` param was renamed to `fields`
- MYMPD_API_PLAYLIST_LIST: response changed
- MYMPD_API_VIEW_SAVE: new
- MYMPD_API_COLS_SAVE: removed

### Changelog

- Feat: All views can be displayed as table or grid (with pictures) #1051
- Feat: Add setting for default sort tag in library view #1207
- Feat: Add lua library for myGPIOd support #1208
- Feat: Support range for listplaylist and listplaylistinfo (MPD 0.24) #1214
- Feat: Support playlistlength command (MPD 0.24) #1213
- Feat: Add column for "File type" in song lists #1225
- Feat: Add thumbnail column to views #1093
- Feat: Add playlist art handler
- Feat: Configurable columns for playlist view
- Feat: Add option to disable covercache pruning #1237
- Feat: Add support for sticker find operators contains, starts_with (MPD 0.24)
- Feat: Provide and install a systemd user unit #1262
- Upd: Bootstrap 5.3.3
- Upd: Support ESLint 9
- Fix: List and search playlists in filesystem view
- Fix: SSL issues with iPhone clients

***

## myMPD 14.1.2 (2024-04-15)

This is a small bugfix release.
Expand Down Expand Up @@ -35,6 +67,7 @@ This release enables the support for sticker sorting and fixes a severe mongoose
- Feat: Sort sticker search results (MPD 0.24) #1094
- Fix: Problems with settings in 14.0.x #1221
- Fix: Browse filesystem layout #1235
- Fix: Re-add custom css to mongoose dir listing

***

Expand Down
136 changes: 80 additions & 56 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cmake_policy(SET CMP0003 NEW)
# myMPD is written in C
# supported compilers: gcc, clang
project(mympd
VERSION 14.1.2
VERSION 15.0.0
LANGUAGES C
)

Expand All @@ -23,6 +23,7 @@ message("Cmake build type: ${CMAKE_BUILD_TYPE}")
message("Compiler: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
message("CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}")
message("CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}")
message("Arch: ${CMAKE_C_LIBRARY_ARCHITECTURE}")

# reset cmake default flags
set(CMAKE_C_FLAGS_DEBUG "")
Expand Down Expand Up @@ -50,6 +51,7 @@ option(MYMPD_ENABLE_FLAC "Enables flac support, default ON" "ON")
option(MYMPD_ENABLE_IPV6 "Enables IPv6, default ON" "ON")
option(MYMPD_ENABLE_LIBID3TAG "Enables libid3tag support, default ON" "ON")
option(MYMPD_ENABLE_LUA "Enables lua support, default ON" "ON")
option(MYMPD_ENABLE_MYGPIOD "Enables myGPIOd support, default ON" "ON")
option(MYMPD_MANPAGES "Creates and installs manpages" "ON")
option(MYMPD_MINIMAL "Enables minimal myMPD build, disables all MYMPD_ENABLE_* flags" "OFF")
option(MYMPD_STARTUP_SCRIPT "Installs the startup script, default ON" "ON")
Expand All @@ -63,6 +65,7 @@ if(MYMPD_MINIMAL)
set(MYMPD_ENABLE_IPV6 "OFF")
set(MYMPD_ENABLE_LUA "OFF")
set(MYMPD_ENABLE_LIBID3TAG "OFF")
set(MYMPD_ENABLE_MYGPIOD "OFF")
endif()

if(MYMPD_ENABLE_EXPERIMENTAL)
Expand All @@ -78,56 +81,6 @@ include(GNUInstallDirs)
# custom cmake modules
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/")

# calculate paths
if(CMAKE_INSTALL_PREFIX MATCHES "/usr")
set(SUBDIR "/${PROJECT_NAME}")
set(SUBDIRLIB "/lib")
set(SUBDIRCACHE "/cache")
else()
# for install in /opt
set(SUBDIR "")
set(SUBDIRLIB "")
set(SUBDIRCACHE "")
endif()

message("Executables in: ${CMAKE_INSTALL_FULL_BINDIR}")

if(CMAKE_INSTALL_PREFIX STREQUAL "/usr/local")
set(MYMPD_WORK_DIR "/${CMAKE_INSTALL_LOCALSTATEDIR}${SUBDIRLIB}${SUBDIR}")
set(MYMPD_CACHE_DIR "/${CMAKE_INSTALL_LOCALSTATEDIR}${SUBDIRCACHE}${SUBDIR}")
else()
set(MYMPD_WORK_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}${SUBDIRLIB}${SUBDIR}")
set(MYMPD_CACHE_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}${SUBDIRCACHE}${SUBDIR}")
endif()

message("Workdir: ${MYMPD_WORK_DIR}")
message("Cachedir: ${MYMPD_CACHE_DIR}")

# create assets and set doc root
set(ENV{MYMPD_BUILDDIR} "${CMAKE_CURRENT_BINARY_DIR}")

if(MYMPD_EMBEDDED_ASSETS)
message("Embedding assets in binary")
set(MYMPD_DOC_ROOT "${MYMPD_WORK_DIR}/empty")
set(MYMPD_LUALIBS_PATH "")
execute_process(COMMAND "${PROJECT_SOURCE_DIR}/build.sh" createassets RESULT_VARIABLE RC_CREATE_ASSETS)
# remove object files with embedded assets
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/src/CMakeFiles/mympd.dir/web_server/utility.c.o")
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/src/CMakeFiles/mympd.dir/mympd_api/scripts.c.o")
else()
message("Serving assets from filesystem")
set(MYMPD_DOC_ROOT "${PROJECT_SOURCE_DIR}/htdocs")
set(MYMPD_LUALIBS_PATH "${PROJECT_SOURCE_DIR}/contrib/lualibs")
execute_process(COMMAND "${PROJECT_SOURCE_DIR}/build.sh" copyassets RESULT_VARIABLE RC_CREATE_ASSETS)
endif()

if(RC_CREATE_ASSETS GREATER 0)
message(FATAL_ERROR "Creating assets failed")
endif()

message("Document root: ${MYMPD_DOC_ROOT}")
message("Docdir: ${CMAKE_INSTALL_FULL_DOCDIR}")

# required dependencies
find_package(Threads REQUIRED)
find_package(PCRE2 REQUIRED)
Expand Down Expand Up @@ -176,11 +129,74 @@ if(MYMPD_ENABLE_LUA)
else()
message("Lua is disabled because it was not found")
set(MYMPD_ENABLE_LUA "OFF")
set(MYMPD_ENABLE_MYGPIOD "OFF")
endif()
else()
message("Lua is disabled by user")
endif()

if(MYMPD_ENABLE_MYGPIOD)
message("Searching for libmygpio")
find_package(LIBMYGPIO)
if(NOT LIBMYGPIO_FOUND)
message("Compiling static version of libmygpio")
set(MYMPD_ENABLE_MYGPIOD_STATIC "ON")
endif()
else()
message("myGPIO support is disabled by user")
endif()

# calculate paths
if(CMAKE_INSTALL_PREFIX MATCHES "/usr")
set(SUBDIR "/${PROJECT_NAME}")
set(SUBDIRLIB "/lib")
set(SUBDIRCACHE "/cache")
else()
# for install in /opt
set(SUBDIR "")
set(SUBDIRLIB "")
set(SUBDIRCACHE "")
endif()

message("Executables in: ${CMAKE_INSTALL_FULL_BINDIR}")

if(CMAKE_INSTALL_PREFIX STREQUAL "/usr/local")
set(MYMPD_WORK_DIR "/${CMAKE_INSTALL_LOCALSTATEDIR}${SUBDIRLIB}${SUBDIR}")
set(MYMPD_CACHE_DIR "/${CMAKE_INSTALL_LOCALSTATEDIR}${SUBDIRCACHE}${SUBDIR}")
else()
set(MYMPD_WORK_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}${SUBDIRLIB}${SUBDIR}")
set(MYMPD_CACHE_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}${SUBDIRCACHE}${SUBDIR}")
endif()

message("Workdir: ${MYMPD_WORK_DIR}")
message("Cachedir: ${MYMPD_CACHE_DIR}")

# create assets and set doc root
set(ENV{MYMPD_BUILDDIR} "${CMAKE_CURRENT_BINARY_DIR}")
set(ENV{MYMPD_ENABLE_MYGPIOD} "${MYMPD_ENABLE_MYGPIOD}")

if(MYMPD_EMBEDDED_ASSETS)
message("Embedding assets in binary")
set(MYMPD_DOC_ROOT "${MYMPD_WORK_DIR}/empty")
set(MYMPD_LUALIBS_PATH "")
execute_process(COMMAND "${PROJECT_SOURCE_DIR}/build.sh" createassets RESULT_VARIABLE RC_CREATE_ASSETS)
# remove object files with embedded assets
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/src/CMakeFiles/mympd.dir/web_server/utility.c.o")
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/src/CMakeFiles/mympd.dir/mympd_api/scripts.c.o")
else()
message("Serving assets from filesystem")
set(MYMPD_DOC_ROOT "${PROJECT_SOURCE_DIR}/htdocs")
set(MYMPD_LUALIBS_PATH "${CMAKE_CURRENT_BINARY_DIR}/contrib/lualibs")
execute_process(COMMAND "${PROJECT_SOURCE_DIR}/build.sh" copyassets RESULT_VARIABLE RC_CREATE_ASSETS)
endif()

if(RC_CREATE_ASSETS GREATER 0)
message(FATAL_ERROR "Creating assets failed")
endif()

message("Document root: ${MYMPD_DOC_ROOT}")
message("Docdir: ${CMAKE_INSTALL_FULL_DOCDIR}")

# translation files
if(MYMPD_EMBEDDED_ASSETS)
if(EXISTS "${PROJECT_BINARY_DIR}/htdocs/assets/i18n/bg-BG.json.gz")
Expand Down Expand Up @@ -244,7 +260,8 @@ endif()
# configure some files - version and path information
configure_file(src/compile_time.h.in "${PROJECT_BINARY_DIR}/compile_time.h")
configure_file(cmake/Install.cmake.in cmake/Install.cmake @ONLY)
configure_file(contrib/initscripts/mympd.service.in contrib/initscripts/mympd.service @ONLY)
configure_file(contrib/initscripts/mympd.service.system.in contrib/initscripts/system/mympd.service @ONLY)
configure_file(contrib/initscripts/mympd.service.user.in contrib/initscripts/user/mympd.service @ONLY)
configure_file(contrib/initscripts/mympd.sysVinit.in contrib/initscripts/mympd.sysVinit @ONLY)
configure_file(contrib/initscripts/mympd.openrc.in contrib/initscripts/mympd.openrc @ONLY)
configure_file(contrib/initscripts/mympd.freebsdrc.in contrib/initscripts/mympd.freebsdrc @ONLY)
Expand Down Expand Up @@ -400,7 +417,7 @@ add_subdirectory("cli_tools")

# link all together
target_link_libraries(mympd
libmympdclient
mympdclient
mjson
mpack
mongoose
Expand All @@ -413,15 +430,22 @@ target_link_libraries(mympd
)

# link optional dependencies
if(LIBID3TAG_FOUND)
if(MYMPD_ENABLE_LIBID3TAG)
target_link_libraries(mympd ${LIBID3TAG_LIBRARIES})
endif()
if(FLAC_FOUND)
if(MYMPD_ENABLE_FLAC)
target_link_libraries(mympd ${FLAC_LIBRARIES})
endif()
if(LUA_FOUND)
if(MYMPD_ENABLE_LUA)
target_link_libraries(mympd ${LUA_LIBRARIES})
endif()
if(MYMPD_ENABLE_MYGPIOD)
if(MYMPD_ENABLE_MYGPIOD_STATIC)
target_link_libraries(mympd mygpio)
else()
target_link_libraries(mympd ${LIBMYGPIO_LIBRARIES})
endif()
endif()

# install
install(TARGETS mympd DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
Expand Down
Loading

0 comments on commit 57aa432

Please sign in to comment.