Skip to content

Commit 8b20ac6

Browse files
committed
Add vgmstream plugin; add vgmstream as submodule
1 parent 5ac64d6 commit 8b20ac6

15 files changed

Lines changed: 1901 additions & 2 deletions

.github/workflows/build.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
release:
8+
types: [published]
9+
10+
permissions:
11+
contents: write # needed for release upload
12+
13+
jobs:
14+
build:
15+
name: Build fooyin and plugin
16+
runs-on: ubuntu-latest
17+
container: archlinux:latest
18+
19+
env:
20+
FOOYIN_REF: master
21+
FOOYIN_PREFIX: ${{ github.workspace }}/fooyin-install
22+
23+
steps:
24+
- name: Dependencies
25+
run: |
26+
pacman -Syu --noconfirm --needed \
27+
alsa-lib \
28+
base-devel \
29+
cmake \
30+
ffmpeg \
31+
git \
32+
icu \
33+
ninja \
34+
qt6-base \
35+
qt6-svg \
36+
qt6-tools \
37+
taglib \
38+
zlib
39+
40+
- name: Checkout plugin
41+
uses: actions/checkout@v7
42+
with:
43+
submodules: recursive
44+
45+
- name: Checkout fooyin
46+
uses: actions/checkout@v7
47+
with:
48+
repository: fooyin/fooyin
49+
ref: ${{ env.FOOYIN_REF }}
50+
path: fooyin
51+
submodules: recursive
52+
53+
- name: Configure fooyin
54+
run: |
55+
cmake -S fooyin -B fooyin-build -G Ninja \
56+
-DCMAKE_BUILD_TYPE=Release \
57+
-DCMAKE_INSTALL_PREFIX="$FOOYIN_PREFIX" \
58+
-DBUILD_PCH=ON \
59+
-DBUILD_TRANSLATIONS=OFF \
60+
-DINSTALL_HEADERS=ON \
61+
-DPLUGIN_SELECTION=none
62+
63+
- name: Build fooyin
64+
run: cmake --build fooyin-build
65+
66+
- name: Install fooyin
67+
run: cmake --install fooyin-build
68+
69+
- name: Configure plugin
70+
run: |
71+
cmake -S . -B build -G Ninja \
72+
-DCMAKE_BUILD_TYPE=Release \
73+
-DCMAKE_PREFIX_PATH="$FOOYIN_PREFIX"
74+
75+
- name: Build plugin
76+
run: cmake --build build
77+
78+
- name: Upload artifact
79+
uses: actions/upload-artifact@v6
80+
with:
81+
name: fooyin-plugin-vgmstream
82+
path: build/fyplugin_vgmstream.so
83+
if-no-files-found: error
84+
85+
attach:
86+
name: Attach to release
87+
if: github.event_name == 'release' && github.event.action == 'published'
88+
runs-on: ubuntu-latest
89+
needs: build
90+
steps:
91+
- name: Download artifact
92+
uses: actions/download-artifact@v7
93+
with:
94+
name: fooyin-plugin-vgmstream
95+
path: ./artifacts
96+
97+
- name: Upload artifact to release
98+
uses: svenstaro/upload-release-action@v2
99+
with:
100+
repo_token: ${{ secrets.GITHUB_TOKEN }}
101+
tag: ${{ github.event.release.tag_name }}
102+
file: ./artifacts/fyplugin_vgmstream.so
103+
overwrite: true

.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
*.*#
2+
*.a
3+
*.app
4+
*.autosave
5+
*.core
6+
*.debug
7+
*.embed.manifest
8+
*.moc
9+
*.o
10+
*.obj
11+
*.orig
12+
*.prl
13+
*.qm
14+
*.rc
15+
*.rej
16+
*.res
17+
*.so
18+
*.so.*
19+
*_pch.h.cpp
20+
*_resource.rc
21+
*_wrapper.bat
22+
*_wrapper.sh
23+
*~
24+
.#*
25+
.DS_Store
26+
.qmake.cache
27+
.qmake.stash
28+
.vscode
29+
.idea
30+
Makefile*
31+
Thumbs.db
32+
moc_*.cpp
33+
qrc_*.cpp
34+
tags
35+
ui_*.h
36+
wrapper.bat
37+
wrapper.sh
38+
debug_toolchain.cmake
39+
40+
# generated files
41+
CMakeLists.txt.user*
42+
compile_commands.json
43+
fooyin_version.h
44+
packagetar.sh
45+
changelog
46+
fooyin.spec
47+
48+
# Vim temporary files
49+
.*.swp
50+
51+
# Directories
52+
# ---------------------
53+
54+
.cache/
55+
.cmake/
56+
.moc/
57+
.obj/
58+
.pch/
59+
.rcc/
60+
.uic/
61+
/*-debug/
62+
/*-release/
63+
/build*/
64+
/lib/
65+
debug/
66+
Debug/
67+
release/
68+
Release/
69+
tmp/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "3rdparty/vgmstream"]
2+
path = 3rdparty/vgmstream
3+
url = https://github.com/vgmstream/vgmstream.git

3rdparty/vgmstream

Submodule vgmstream added at beb753e

CMakeLists.txt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
3+
project(
4+
vgmstream
5+
VERSION 1.0.0
6+
DESCRIPTION "VGMStream plugin for fooyin"
7+
HOMEPAGE_URL "https://github.com/fooyin/fooyin-plugin-vgmstream"
8+
LANGUAGES CXX
9+
)
10+
11+
set(CMAKE_AUTOMOC ON)
12+
set(CMAKE_AUTOUIC ON)
13+
14+
find_package(Fooyin)
15+
find_package(VGMStream QUIET MODULE)
16+
17+
if(VGMSTREAM_FOUND)
18+
message(STATUS "Using system vgmstream")
19+
elseif(EXISTS "${CMAKE_SOURCE_DIR}/3rdparty/vgmstream/CMakeLists.txt")
20+
message(STATUS "Using 3rd-party vgmstream")
21+
add_subdirectory(${CMAKE_SOURCE_DIR}/3rdparty/vgmstream vgmstream EXCLUDE_FROM_ALL)
22+
add_library(VGMStream::VGMStream ALIAS libvgmstream)
23+
set(VGMSTREAM_TARGET VGMStream::VGMStream)
24+
else()
25+
message(STATUS "vgmstream not found; skipping vgmstream plugin")
26+
return()
27+
endif()
28+
29+
create_fooyin_plugin(
30+
vgmstream
31+
JSON_IN src/vgmstream.json.in
32+
DEPENDS Fooyin::Core
33+
Fooyin::Gui
34+
${VGMSTREAM_TARGET}
35+
SOURCES src/vgmstreamdefs.h
36+
src/vgmstreaminput.cpp
37+
src/vgmstreaminput.h
38+
src/vgmstreamplugin.cpp
39+
src/vgmstreamplugin.h
40+
src/vgmstreamsettings.cpp
41+
src/vgmstreamsettings.h
42+
)

0 commit comments

Comments
 (0)