Mercurial > minori
diff Makefile.am @ 249:6b2441c776dd
*: merge
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Wed, 24 Jan 2024 20:18:59 -0500 |
parents | 1ae4d8b28a5c ed5ab3896666 |
children | c130f47f6f48 |
line wrap: on
line diff
--- a/Makefile.am Wed Jan 24 20:18:14 2024 -0500 +++ b/Makefile.am Wed Jan 24 20:18:59 2024 -0500 @@ -1,9 +1,33 @@ bin_PROGRAMS = minori +minori_locale_ts = \ + rc/locale/en_GB.ts \ + rc/locale/es.ts + +.ts.qm: + @MKDIR_P@ `dirname $@`; \ + @QT_LRELEASE@ $< -qm $@ + +minori_locale_qm = $(minori_locale_ts:.ts=.qm) + +# this has to be in the root build folder +translations.qrc: $(minori_locale_qm) + printf "<!DOCTYPE rcc><RCC version=\"1.0\">\n\t<qresource prefix=\"locale/\">\n" > $@; \ + for q in $(minori_locale_qm); do \ + printf "\t\t<file alias=\"%s\">%s</file>\n" "`basename $$q`" "$$q" >> $@; \ + done; \ + printf "\t</qresource>\n</RCC>\n" >> $@; + minori_qtrc = \ - $(top_srcdir)/rc/dark.qrc \ - $(top_srcdir)/rc/icons.qrc \ - $(top_srcdir)/rc/player_data.qrc + $(top_srcdir)/rc/icons/icons.qrc \ + $(top_srcdir)/rc/player_data.qrc \ + translations.qrc + +if BUILD_WIN + +minori_qtrc += $(top_srcdir)/rc/win32/dark/dark.qrc + +endif rc/final_qrc.cc: $(minori_qtrc) @QT_RCC@ -o $@ $(minori_qtrc) @@ -66,21 +90,25 @@ if BUILD_WIN files_win = src/sys/win32/dark_theme.cc +libs_win = -lole32 -luuid +ldflags_win = -mwindows if BUILD_WINDRES -# Untested... -wrcflags_version = -DWRC_VERSION=0,`echo '$(PACKAGE_VERSION)' | @SED@ 's/(\d+)\.(\d+)\.(\d+)/\1,\2,\3/'` -WRCFLAGS = --use-temp-file -I. -I$(srcdir) $(wrcflags_version) +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 +files_windres=rc/win32/version.rc rc/win32/resource.rc endif endif if BUILD_OSX -files_osx = src/sys/osx/dark_theme.cc src/sys/osx/filesystem.cc -libs_osx = Foundation AppKit +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 = \ @@ -139,19 +167,17 @@ -I$(top_srcdir)/dep/anitomy \ -I$(top_srcdir)/dep -minori_CPPFLAGS = $(minori_includes) @QT_CXXFLAGS@ @LIBCURL_CPPFLAGS@ -minori_CXXFLAGS = $(cflags_glib) $(cflags_win) $(cflags_osx) +minori_CPPFLAGS = @LIBCURL_CPPFLAGS@ $(minori_includes) +minori_CXXFLAGS = @QT_CXXFLAGS@ $(cflags_osx) $(cflags_glib) $(cflags_win) -std=c++17 +minori_LDFLAGS = $(ldflags_osx) $(ldflags_win) minori_DEPENDENCIES = dep/pugixml/libpugixml.la dep/animia/libanimia.la dep/anitomy/libanitomy.la -minori_LDADD = $(libs_glib) $(libs_osx) @LIBCURL@ @QT_LIBS@ dep/pugixml/libpugixml.la dep/animia/libanimia.la dep/anitomy/libanitomy.la - -.qrc_qrc.cc: - +minori_LDADD = $(libs_glib) $(libs_osx) $(libs_win) @LIBCURL@ @QT_LIBS@ dep/pugixml/libpugixml.la dep/animia/libanimia.la dep/anitomy/libanitomy.la .h_moc.cc: @MKDIR_P@ -- `dirname $@` @QT_MOC@ -o $@ $(minori_includes) $< -SUFFIXES = .h _moc.cc .qrc _qrc.cc +SUFFIXES = .h _moc.cc .ts .qm SUBDIRS = $(subdirs) ACLOCAL_AMFLAGS = -I m4