mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
losing my mind
This commit is contained in:
6
.github/workflows/python-app.yml
vendored
6
.github/workflows/python-app.yml
vendored
@@ -25,6 +25,7 @@ jobs:
|
|||||||
brew update
|
brew update
|
||||||
brew install portaudio libsndfile libsamplerate pkg-config
|
brew install portaudio libsndfile libsamplerate pkg-config
|
||||||
|
|
||||||
|
# Use MSYS2 for Windows audio library build with all codec dependencies
|
||||||
- name: Set up MSYS2 (Windows)
|
- name: Set up MSYS2 (Windows)
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
uses: msys2/setup-msys2@v2
|
uses: msys2/setup-msys2@v2
|
||||||
@@ -40,6 +41,9 @@ jobs:
|
|||||||
mingw-w64-x86_64-libvorbis
|
mingw-w64-x86_64-libvorbis
|
||||||
mingw-w64-x86_64-libogg
|
mingw-w64-x86_64-libogg
|
||||||
mingw-w64-x86_64-opus
|
mingw-w64-x86_64-opus
|
||||||
|
mingw-w64-x86_64-mpg123
|
||||||
|
mingw-w64-x86_64-lame
|
||||||
|
mingw-w64-x86_64-speex
|
||||||
|
|
||||||
- name: Build static audio library (Windows)
|
- name: Build static audio library (Windows)
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
@@ -50,7 +54,7 @@ jobs:
|
|||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Build with static linking
|
# Build with static linking
|
||||||
make all
|
make static
|
||||||
|
|
||||||
# Verify the build
|
# Verify the build
|
||||||
make verify
|
make verify
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ ifneq (,$(findstring MINGW,$(UNAME_S)))
|
|||||||
CFLAGS = -Wall -Wextra -O3 -fPIC -std=c99 -I/mingw64/include -m64
|
CFLAGS = -Wall -Wextra -O3 -fPIC -std=c99 -I/mingw64/include -m64
|
||||||
LDFLAGS = -shared -Wl,--export-all-symbols -static-libgcc -static-libstdc++ -L/mingw64/lib -m64
|
LDFLAGS = -shared -Wl,--export-all-symbols -static-libgcc -static-libstdc++ -L/mingw64/lib -m64
|
||||||
|
|
||||||
# Core libraries (try static first, fall back to dynamic)
|
# Core libraries with full dependency chain
|
||||||
CORE_LIBS =
|
CORE_LIBS =
|
||||||
ifneq (,$(wildcard /mingw64/lib/libportaudio.a))
|
ifneq (,$(wildcard /mingw64/lib/libportaudio.a))
|
||||||
CORE_LIBS += /mingw64/lib/libportaudio.a
|
CORE_LIBS += /mingw64/lib/libportaudio.a
|
||||||
@@ -29,10 +29,35 @@ ifneq (,$(findstring MINGW,$(UNAME_S)))
|
|||||||
CORE_LIBS += -lportaudio
|
CORE_LIBS += -lportaudio
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# libsndfile and ALL its dependencies (order matters!)
|
||||||
ifneq (,$(wildcard /mingw64/lib/libsndfile.a))
|
ifneq (,$(wildcard /mingw64/lib/libsndfile.a))
|
||||||
CORE_LIBS += /mingw64/lib/libsndfile.a
|
CORE_LIBS += /mingw64/lib/libsndfile.a
|
||||||
|
|
||||||
|
# libsndfile codec dependencies
|
||||||
|
ifneq (,$(wildcard /mingw64/lib/libFLAC.a))
|
||||||
|
CORE_LIBS += /mingw64/lib/libFLAC.a
|
||||||
|
endif
|
||||||
|
ifneq (,$(wildcard /mingw64/lib/libvorbisenc.a))
|
||||||
|
CORE_LIBS += /mingw64/lib/libvorbisenc.a /mingw64/lib/libvorbisfile.a /mingw64/lib/libvorbis.a
|
||||||
|
endif
|
||||||
|
ifneq (,$(wildcard /mingw64/lib/libogg.a))
|
||||||
|
CORE_LIBS += /mingw64/lib/libogg.a
|
||||||
|
endif
|
||||||
|
ifneq (,$(wildcard /mingw64/lib/libopus.a))
|
||||||
|
CORE_LIBS += /mingw64/lib/libopus.a
|
||||||
|
endif
|
||||||
|
ifneq (,$(wildcard /mingw64/lib/libmpg123.a))
|
||||||
|
CORE_LIBS += /mingw64/lib/libmpg123.a
|
||||||
|
endif
|
||||||
|
ifneq (,$(wildcard /mingw64/lib/libmp3lame.a))
|
||||||
|
CORE_LIBS += /mingw64/lib/libmp3lame.a
|
||||||
|
endif
|
||||||
|
ifneq (,$(wildcard /mingw64/lib/libspeex.a))
|
||||||
|
CORE_LIBS += /mingw64/lib/libspeex.a
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
CORE_LIBS += -lsndfile
|
# Dynamic linking with all dependencies
|
||||||
|
CORE_LIBS += -lsndfile -lFLAC -lvorbisenc -lvorbisfile -lvorbis -logg -lopus -lmpg123 -lmp3lame -lspeex
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(wildcard /mingw64/lib/libsamplerate.a))
|
ifneq (,$(wildcard /mingw64/lib/libsamplerate.a))
|
||||||
@@ -41,22 +66,10 @@ ifneq (,$(findstring MINGW,$(UNAME_S)))
|
|||||||
CORE_LIBS += -lsamplerate
|
CORE_LIBS += -lsamplerate
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Optional codec libraries
|
# System libraries (always dynamic)
|
||||||
CODEC_LIBS =
|
SYSTEM_LIBS = -lwinmm -lole32 -luuid -lksuser -lsetupapi -lws2_32 -ladvapi32
|
||||||
ifneq (,$(wildcard /mingw64/lib/libFLAC.a))
|
|
||||||
CODEC_LIBS += /mingw64/lib/libFLAC.a
|
|
||||||
endif
|
|
||||||
ifneq (,$(wildcard /mingw64/lib/libvorbisenc.a))
|
|
||||||
CODEC_LIBS += /mingw64/lib/libvorbisenc.a /mingw64/lib/libvorbisfile.a /mingw64/lib/libvorbis.a
|
|
||||||
endif
|
|
||||||
ifneq (,$(wildcard /mingw64/lib/libogg.a))
|
|
||||||
CODEC_LIBS += /mingw64/lib/libogg.a
|
|
||||||
endif
|
|
||||||
|
|
||||||
# System libraries
|
LIBS = $(CORE_LIBS) $(SYSTEM_LIBS)
|
||||||
SYSTEM_LIBS = -lwinmm -lole32 -luuid -lksuser -lsetupapi -lws2_32
|
|
||||||
|
|
||||||
LIBS = $(CORE_LIBS) $(CODEC_LIBS) $(SYSTEM_LIBS)
|
|
||||||
OBJ_EXT = .o
|
OBJ_EXT = .o
|
||||||
|
|
||||||
else ifeq ($(UNAME_S),Darwin)
|
else ifeq ($(UNAME_S),Darwin)
|
||||||
|
|||||||
Reference in New Issue
Block a user