mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-11 00:05:50 +00:00
Scanning textures/presets dirs for textures and scanning preset dir for presets. Scanning is now done recursively, so presets and textures can be organized into subdirectories instead of needing to be flattened into a single directory. On POSIX systems makes use of [ftw](https://linux.die.net/man/3/ftw) which should be relatively efficient. Otherwise falls back to recursing with `dirent` (for windows). Probably should have made an autoconf check for `ftw` instead of doing `#ifdef WIN32`. * Scan subdirectories in presets directory * remove preset subdir config * Recursively scan for textures too, add c++-17 compatibility * Refactor directory scanning code so it's reused by texture loader and preset loader. Make cross-platform (maybe) * filescanner in makefile * extension filter for file loader * make extensions match up' * need string.h * Add FileScanner.cpp to win build (maybe) * scan all dirs * #ifndef #ifdef is def fun * bogus comment * bleh * bleh * itunes plugin with c++17 * EyeTunes needs to know about the FileScanner Co-authored-by: milkdropper.com <milkdropper.com@gmail.com> Co-authored-by: milkdropper <59471060+milkdropper@users.noreply.github.com>
57 lines
2.0 KiB
Makefile
57 lines
2.0 KiB
Makefile
ACLOCAL_AMFLAGS=-I m4
|
|
AM_CPPFLAGS=-DDATADIR_PATH='"${pkgdatadir}"'
|
|
SUBDIRS=src
|
|
PRESETSDIR=presets
|
|
EXTRA_DIST=README.md AUTHORS.txt presets fonts vendor $(PRESETSDIR)
|
|
CLEANFILES=dist
|
|
|
|
# stick apps in bin
|
|
# bin_PROGRAMS = $(top_builddir)/bin
|
|
|
|
# aka /usr/local/share/projectM
|
|
pm_data_dir = $(pkgdatadir)
|
|
pm_font_dir = $(pm_data_dir)/fonts
|
|
|
|
# files to install
|
|
pm_data__DATA = src/libprojectM/config.inp
|
|
pm_font__DATA = fonts/Vera.ttf fonts/VeraMono.ttf
|
|
|
|
# find and install all preset files
|
|
install-data-local:
|
|
find "$(PRESETSDIR)" -type d -exec $(MKDIR_P) "$(DESTDIR)/$(pm_data_dir)/{}" \;
|
|
find "$(PRESETSDIR)" -type f -exec $(INSTALL_DATA) "{}" "$(DESTDIR)/$(pm_data_dir)/{}" \;
|
|
|
|
# from https://stackoverflow.com/questions/30897170/ac-subst-does-not-expand-variable answer: https://stackoverflow.com/a/30960268
|
|
# ptomato https://stackoverflow.com/users/172999/ptomato
|
|
|
|
src/libprojectM/config.inp: src/libprojectM/config.inp.in Makefile
|
|
$(AM_V_GEN)rm -f $@ $@.tmp && \
|
|
$(SED) -e "s,%datadir%,$(datadir),"g $< >$@.tmp && \
|
|
chmod a-w $@.tmp && \
|
|
mv $@.tmp $@
|
|
|
|
macOS/Build/Products/Debug/presets:
|
|
mkdir -p macOS/Build/Products/Debug
|
|
ln -s $(PWD)/presets macOS/Build/Products/Debug/
|
|
|
|
build-mac: macOS/Build/Products/Debug/presets
|
|
xcrun xcodebuild -scheme "projectM SDL" -configuration Debug -derivedDataPath macOS
|
|
@echo "Products built in macOS/Build/Products/Debug"
|
|
open macOS/Build/Products/Debug
|
|
|
|
# do a macOS build
|
|
dist-mac: dist
|
|
make clean
|
|
./configure --disable-sdlframework
|
|
rm -rf dist
|
|
xcrun xcodebuild -scheme "projectM SDL" -configuration Release archive -archivePath build/ProjectM.xcarchive
|
|
xcrun xcodebuild -scheme "iProjectM" -configuration Release archive -archivePath build/iTunes.xcarchive
|
|
mkdir -p dist
|
|
# mv build/ProjectM.xcarchive/Products/Applications/projectM\ SDL.app dist/
|
|
mv src/projectM-iTunes/iTunes\ Visualizer.pkg dist/iTunes-plugin-macOS.pkg
|
|
mv src/projectM-sdl/projectM\ SDL.pkg dist/projectM-macOS.pkg
|
|
mv projectM-*.tar.gz dist/
|
|
@echo "Success!\nBuilt iTunes plugin installer and SDL apps in dist/"
|
|
|
|
CLEANFILES+=src/libprojectM/config.inp
|