changeset 252:a0eeb2cc7e6d

*: resolve make distcheck failures
author Paper <paper@paper.us.eu.org>
date Tue, 06 Feb 2024 02:24:49 -0500
parents 4d635d3e168a
children b3549da699a6
files Makefile.am dep/animia/Makefile.am dep/anitomy/Makefile.am dep/pugixml/Makefile.am src/gui/widgets/sidebar.cc
diffstat 5 files changed, 161 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Sun Feb 04 21:18:23 2024 -0500
+++ b/Makefile.am	Tue Feb 06 02:24:49 2024 -0500
@@ -1,37 +1,123 @@
 bin_PROGRAMS = minori
 
+# Localization
+
 minori_locale_ts = \
 	rc/locale/en_GB.ts \
 	rc/locale/es.ts
 
-.ts.qm:
-	$(MKDIR_P) `dirname $@`; \
-	$(LRELEASE) $< -qm $@
-
 minori_locale_qm = $(minori_locale_ts:.ts=.qm)
 
-# this has to be in the root build folder
 rc/locale/translations.qrc: $(minori_locale_qm)
+	$(MKDIR_P) $$(dirname $@); \
 	printf "<!DOCTYPE rcc><RCC version=\"1.0\">\n\t<qresource prefix=\"locale/\">\n" > $@; \
 	for q in $(minori_locale_qm); do \
-		printf "\t\t<file>%s</file>\n" "`basename $$q`" >> $@; \
+		printf "\t\t<file>%s</file>\n" "$$(basename $$q)" >> $@; \
 	done;
 	printf "\t</qresource>\n</RCC>\n" >> $@;
 
+# Qt resources
+
 minori_qtrc = \
 	$(top_srcdir)/rc/icons/icons.qrc	\
-	$(top_srcdir)/rc/player_data.qrc	\
-	rc/locale/translations.qrc
+	$(top_srcdir)/rc/player_data.qrc
+
+# various things we want to distribute
+
+minori_icons_png = \
+	$(top_srcdir)/rc/icons/16x16/arrow-circle-315.png \
+	$(top_srcdir)/rc/icons/16x16/calendar.png \
+	$(top_srcdir)/rc/icons/16x16/chart.png \
+	$(top_srcdir)/rc/icons/16x16/clock-history-frame.png \
+	$(top_srcdir)/rc/icons/16x16/cross-button.png \
+	$(top_srcdir)/rc/icons/16x16/document-list.png \
+	$(top_srcdir)/rc/icons/16x16/feed.png \
+	$(top_srcdir)/rc/icons/16x16/film.png \
+	$(top_srcdir)/rc/icons/16x16/gear.png \
+	$(top_srcdir)/rc/icons/16x16/magnifier.png \
+	$(top_srcdir)/rc/icons/16x16/navigation-270-button.png \
+	$(top_srcdir)/rc/icons/16x16/plus-button.png \
+	$(top_srcdir)/rc/icons/24x24/application-export.png \
+	$(top_srcdir)/rc/icons/24x24/application-sidebar-list.png \
+	$(top_srcdir)/rc/icons/24x24/arrow-circle-double-135.png \
+	$(top_srcdir)/rc/icons/24x24/feed.png \
+	$(top_srcdir)/rc/icons/24x24/folder-open.png \
+	$(top_srcdir)/rc/icons/24x24/gear.png \
+	$(top_srcdir)/rc/icons/24x24/globe.png \
+	$(top_srcdir)/rc/icons/24x24/inbox-film.png \
+	$(top_srcdir)/rc/icons/24x24/megaphone.png \
+	$(top_srcdir)/rc/icons/24x24/question.png \
+	$(top_srcdir)/rc/icons/favicon.png
+
+minori_linux_rc = \
+	$(top_srcdir)/rc/linux/Minori.desktop \
+	$(top_srcdir)/rc/linux/Minori.png
+
+minori_osx_rc = \
+	$(top_srcdir)/rc/osx/Minori.app/Contents/Resources/Minori.icns \
+	$(top_srcdir)/rc/osx/Minori.app/Contents/Info.plist \
+	$(top_srcdir)/rc/osx/Minori.app/Contents/PkgInfo
+
+minori_win32_rc = \
+	$(top_srcdir)/rc/win32/dark/dark.qrc \
+	$(top_srcdir)/rc/win32/dark/dark.qss \
+	$(top_srcdir)/rc/win32/favicon.ico \
+	$(top_srcdir)/rc/win32/resource.rc \
+	$(top_srcdir)/rc/win32/version.rc
+
+minori_scripts = \
+	$(top_srcdir)/scripts/osx/deploy_build.sh \
+	$(top_srcdir)/scripts/win32/deploy_build.sh
+
+EXTRA_DIST = \
+	$(minori_icons_png) \
+	$(top_srcdir)/rc/icons/README.md \
+	$(minori_linux_rc) \
+	$(minori_osx_rc) \
+	$(minori_win32_rc) \
+	$(minori_scripts)
+
+# OS-specific
+
+if BUILD_GLIB
+
+files_glib = src/sys/glib/dark_theme.cc
+cflags_glib = $(GLIB_CFLAGS)
+libs_glib = $(GLIB_LIBS)
+
+endif
 
 if BUILD_WIN
 
-minori_qtrc += $(top_srcdir)/rc/win32/dark/dark.qrc
+files_win = src/sys/win32/dark_theme.cc
+libs_win = -lole32 -luuid
+ldflags_win = -mwindows
+
+# Add dark stylesheet to resources
+qtrc_win = $(top_srcdir)/rc/win32/dark/dark.qrc
+
+if BUILD_WINDRES
+
+wrcflags_version = -DWRC_VERSION=0,`echo $(PACKAGE_VERSION) | @SED@ 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1,\2,\3/'`
+
+WRCFLAGS = --use-temp-file -I. -I$(srcdir) $(wrcflags_version) $(CPPFLAGS)
+.rc.$(OBJEXT):
+	$(WINDRES) $(WRCFLAGS) -i $< -o $@
+files_windres=rc/win32/version.rc rc/win32/resource.rc
+
+endif # BUILD_WINDRES
+
+endif # BUILD_WIN
+
+if BUILD_OSX
+
+files_osx = src/sys/osx/dark_theme.cc src/sys/osx/permissions.cc
+cflags_osx = -mmacosx-version-min=10.15
+libs_osx = -lobjc
+ldflags_osx = -framework Foundation -framework AppKit
 
 endif
 
-rc/final_qrc.cc: $(minori_qtrc)
-	$(RCC) -o $@ $(minori_qtrc)
-
 minori_qtheaders = \
 	include/core/http.h			\
 	include/gui/dialog/about.h		\
@@ -78,40 +164,12 @@
 	include/sys/osx/filesystem.h	\
 	include/sys/win32/dark_theme.h	\
 	include/track/media.h			\
+	dep/json/json.hpp	\
+	dep/json/json_fwd.hpp	\
+	dep/mini/ini.h	\
+	dep/semver/semver.hpp	\
 	$(minori_qtheaders)
 
-minori_moc_sources = $(minori_qtheaders:.h=_moc.cc)
-
-if BUILD_GLIB
-files_glib = src/sys/glib/dark_theme.cc
-cflags_glib = $(GLIB_CFLAGS)
-libs_glib = $(GLIB_LIBS)
-endif
-
-if BUILD_WIN
-files_win = src/sys/win32/dark_theme.cc
-libs_win = -lole32 -luuid
-ldflags_win = -mwindows
-
-if BUILD_WINDRES
-
-wrcflags_version = -DWRC_VERSION=0,`echo $(PACKAGE_VERSION) | @SED@ 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1,\2,\3/'`
-
-WRCFLAGS = --use-temp-file -I. -I$(srcdir) $(wrcflags_version) $(CPPFLAGS)
-.rc.$(OBJEXT):
-	$(WINDRES) $(WRCFLAGS) -i $< -o $@
-files_windres=rc/win32/version.rc rc/win32/resource.rc
-endif # BUILD_WINDRES
-
-endif # BUILD_WIN
-
-if BUILD_OSX
-files_osx = src/sys/osx/dark_theme.cc src/sys/osx/filesystem.cc src/sys/osx/permissions.cc
-cflags_osx = -mmacosx-version-min=10.15
-libs_osx = -lobjc
-ldflags_osx = -framework Foundation -framework AppKit
-endif
-
 minori_SOURCES = \
 	src/core/anime_db.cc		\
 	src/core/anime.cc		\
@@ -157,11 +215,15 @@
 	$(files_osx)			\
 	$(files_glib)			\
 	$(files_win)			\
-	$(files_windres)
+	$(files_windres)	\
+	$(minori_locale_ts)	\
+	$(minori_qtrc)	\
+	$(minori_locale_qm)	\
+	$(minori_moc_sources)	\
+	rc/locale/translations.qrc	\
+	rc/final_qrc.cc
 
-nodist_minori_SOURCES = \
-	$(minori_moc_sources)	\
-	rc/final_qrc.cc
+minori_moc_sources = $(minori_qtheaders:.h=_moc.cc)
 
 minori_includes = \
 	-I$(top_srcdir)/include \
@@ -171,16 +233,25 @@
 	-I$(top_srcdir)/dep
 
 minori_CPPFLAGS = $(QT_CPPFLAGS) $(LIBCURL_CPPFLAGS) $(minori_includes)
-minori_CXXFLAGS = $(cflags_osx) $(cflags_glib) $(cflags_win)
+minori_CXXFLAGS = $(QT_CXXFLAGS) $(cflags_osx) $(cflags_glib) $(cflags_win)
 minori_LDFLAGS = $(QT_LDFLAGS) $(ldflags_osx) $(ldflags_win)
 
 minori_DEPENDENCIES = dep/pugixml/libpugixml.la dep/animia/libanimia.la dep/anitomy/libanitomy.la
 minori_LDADD = $(libs_glib) $(LIBCURL) $(QT_LIBS) $(libs_osx) $(libs_win) $(minori_DEPENDENCIES)
 
+# Build only one qrc, otherwise we get a ton of
+# weird linking errors
+rc/final_qrc.cc: $(minori_qtrc)
+	$(RCC) -o $@ $(minori_qtrc)
+
 .h_moc.cc:
-	$(MKDIR_P) -- `dirname $@`
+	$(MKDIR_P) -- $$(dirname $@)
 	$(MOC) -o $@ $(minori_includes) $<
 
+.ts.qm:
+	$(MKDIR_P) $$(dirname $@); \
+	$(LRELEASE) $< -qm $@
+
 SUFFIXES = .h _moc.cc .ts .qm
 SUBDIRS = $(subdirs)
 ACLOCAL_AMFLAGS = -I m4
--- a/dep/animia/Makefile.am	Sun Feb 04 21:18:23 2024 -0500
+++ b/dep/animia/Makefile.am	Tue Feb 06 02:24:49 2024 -0500
@@ -1,5 +1,32 @@
 lib_LTLIBRARIES = libanimia.la
-include_HEADERS = include/animia.h
+
+include_HEADERS = \
+	include/animia.h
+
+animiadir = $(includedir)/animia
+nobase_animia_HEADERS = \
+	include/animia/media.h \
+	include/animia/player.h \
+	include/animia/types.h
+
+noinst_HEADERS = \
+	include/animia/fd/kvm.h \
+	include/animia/fd/libutil.h \
+	include/animia/fd/proc.h \
+	include/animia/fd/win32.h \
+	include/animia/fd/xnu.h \
+	include/animia/util/osx.h \
+	include/animia/util/win32.h \
+	include/animia/win/wayland/ext-foreign-toplevel-list-v1.h \
+	include/animia/win/wayland/wlr-foreign-toplevel-management-unstable-v1.h \
+	include/animia/win/quartz.h \
+	include/animia/win/wayland.h \
+	include/animia/win/win32.h \
+	include/animia/win/x11.h \
+	include/animia/fd.h \
+	include/animia/strategies.h \
+	include/animia/util.h \
+	include/animia/win.h
 
 if BUILD_WIN
 files_win = src/fd/win32.cc src/win/win32.cc src/util/win32.cc
@@ -40,6 +67,9 @@
 libs_wayland = @WAYLAND_LIBS@
 endif
 
+EXTRA_DIST = \
+	$(top_srcdir)/data/players.anisthesia
+
 libanimia_la_SOURCES = \
 	src/animia.cc \
 	src/fd.cc \
--- a/dep/anitomy/Makefile.am	Sun Feb 04 21:18:23 2024 -0500
+++ b/dep/anitomy/Makefile.am	Tue Feb 06 02:24:49 2024 -0500
@@ -10,10 +10,11 @@
 	anitomy/token.cpp	\
 	anitomy/tokenizer.cpp
 
-include_HEADERS = \
+pkginclude_HEADERS = \
 	anitomy/anitomy.h	\
 	anitomy/element.h	\
 	anitomy/keyword.h	\
+	anitomy/options.h	\
 	anitomy/parser.h	\
 	anitomy/string.h	\
 	anitomy/token.h	\
--- a/dep/pugixml/Makefile.am	Sun Feb 04 21:18:23 2024 -0500
+++ b/dep/pugixml/Makefile.am	Tue Feb 06 02:24:49 2024 -0500
@@ -1,5 +1,9 @@
 lib_LTLIBRARIES = libpugixml.la
-libpugixml_la_SOURCES = src/pugixml.cpp
+
+libpugixml_la_SOURCES = \
+	src/pugixml.cpp \
+	src/pugiconfig.hpp
+
 include_HEADERS = src/pugixml.hpp
 
 libpugixml_la_CXXFLAGS = -std=c++11
--- a/src/gui/widgets/sidebar.cc	Sun Feb 04 21:18:23 2024 -0500
+++ b/src/gui/widgets/sidebar.cc	Tue Feb 06 02:24:49 2024 -0500
@@ -4,8 +4,6 @@
 #include <QListWidgetItem>
 #include <QMouseEvent>
 
-#include <iostream>
-
 SideBar::SideBar(QWidget* parent) : QListWidget(parent) {
 	setFrameShape(QFrame::NoFrame);
 	setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
@@ -69,10 +67,10 @@
 }
 
 int SideBar::AddSeparatorsToIndex(int index) {
-	int i = 0, separators = 0, items = 0;
+	int separators = 0, items = 0;
 
 	for (; items <= index; ) {
-		if (IndexIsSeparator(indexFromItem(item(i++)))) {
+		if (IndexIsSeparator(indexFromItem(item(items + separators)))) {
 			separators++;
 		} else {
 			items++;