diff --git a/.github/BUILDING.md b/.github/BUILDING.md index eeffec2..b1615e4 100644 --- a/.github/BUILDING.md +++ b/.github/BUILDING.md @@ -2,22 +2,20 @@ ### The dependencies for Debian-like distributions. -#### git is only needed for Ubuntu 22.04 - ``` -sudo apt install build-essential cmake libunwind-dev libglfw3-dev libvulkan-dev vulkan-validationlayers-dev libsox-dev git libasound2-dev +sudo apt install build-essential cmake libunwind-dev libglfw3-dev libvulkan-dev vulkan-validationlayers-dev libsox-dev git libasound2-dev nasm g++-14 ``` ### The dependencies for Fedora distributions: ``` -sudo dnf install cmake libunwind-devel glfw-devel vulkan-devel vulkan-validation-layers-devel gcc-c++ gcc sox-devel alsa-lib-devel +sudo dnf install cmake libunwind-devel glfw-devel vulkan-devel vulkan-validation-layers-devel gcc-c++ gcc sox-devel alsa-lib-devel nasm ``` ### The dependencies for Arch distributions: ``` -sudo pacman -S libunwind glfw-x11 vulkan-devel sox git cmake alsa-lib +sudo pacman -S libunwind glfw-x11 vulkan-devel sox git cmake alsa-lib nasm ``` ## Cloning the Repo diff --git a/.github/workflows/rpcsx.yml b/.github/workflows/rpcsx.yml index c165ed8..b11cd7a 100644 --- a/.github/workflows/rpcsx.yml +++ b/.github/workflows/rpcsx.yml @@ -29,7 +29,7 @@ jobs: libsox-dev echo "deb http://azure.archive.ubuntu.com/ubuntu noble main universe" | sudo tee /etc/apt/sources.list sudo apt update - sudo apt install g++-14 ninja-build libasound2-dev + sudo apt install g++-14 ninja-build libasound2-dev nasm VULKANVER=1.3.290 curl -sSfLo Vulkan-Headers.tar.gz https://github.com/KhronosGroup/Vulkan-Headers/archive/v${VULKANVER}.tar.gz tar -xf Vulkan-Headers*.tar.gz diff --git a/.gitmodules b/.gitmodules index 2fd4413..4113d6c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,9 @@ [submodule "3rdparty/json"] path = 3rdparty/json url = ../../nlohmann/json.git +[submodule "3rdparty/FFmpeg"] + path = 3rdparty/FFmpeg + url = ../../FFmpeg/FFmpeg.git +[submodule "3rdparty/LibAtrac9"] + path = 3rdparty/LibAtrac9 + url = ../../RPCSX/LibAtrac9.git diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 72d48ad..e2f9b9f 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -31,3 +31,41 @@ if(NOT nlohmann_json_FOUND) add_subdirectory(json) endif() +add_subdirectory(LibAtrac9) + +set(FFMPEG_PATH ${CMAKE_CURRENT_SOURCE_DIR}/FFmpeg) +add_custom_command( + OUTPUT ${FFMPEG_PATH}/config.h + COMMAND ./configure + COMMENT "Configuring FFmpeg..." + WORKING_DIRECTORY ${FFMPEG_PATH} +) +add_custom_target(ffmpeg-configure DEPENDS ${FFMPEG_PATH}/config.h) + +add_custom_target(ffmpeg-build) +add_custom_command( + TARGET ffmpeg-build + COMMAND $(MAKE) -C ${FFMPEG_PATH} + COMMENT "Building FFmpeg..." + DEPENDS ffmpeg-configure + WORKING_DIRECTORY ${FFMPEG_PATH} +) + +add_library(ffmpeg-core INTERFACE) +add_dependencies(ffmpeg-core ffmpeg-build) + +function(import_ffmpeg_library name) + add_library(ffmpeg::${name} STATIC IMPORTED GLOBAL) + set_property(TARGET ffmpeg::${name} PROPERTY IMPORTED_LOCATION "${FFMPEG_PATH}/lib${name}/lib${name}.a") + set_property(TARGET ffmpeg::${name} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${FFMPEG_PATH}") +endfunction() + +import_ffmpeg_library(avcodec) +import_ffmpeg_library(avformat) +import_ffmpeg_library(avfilter) +import_ffmpeg_library(avdevice) +import_ffmpeg_library(avutil) +import_ffmpeg_library(swscale) +import_ffmpeg_library(swresample) +import_ffmpeg_library(postproc) + diff --git a/3rdparty/FFmpeg b/3rdparty/FFmpeg new file mode 160000 index 0000000..f5f590b --- /dev/null +++ b/3rdparty/FFmpeg @@ -0,0 +1 @@ +Subproject commit f5f590b1e72cbd1da257d87d1adf1e9db3b9e2a9 diff --git a/3rdparty/LibAtrac9 b/3rdparty/LibAtrac9 new file mode 160000 index 0000000..55a4e0c --- /dev/null +++ b/3rdparty/LibAtrac9 @@ -0,0 +1 @@ +Subproject commit 55a4e0c17a6148c0208d2c9641352a605f788749 diff --git a/rpcsx/CMakeLists.txt b/rpcsx/CMakeLists.txt index 6fc8c30..f69e7f6 100644 --- a/rpcsx/CMakeLists.txt +++ b/rpcsx/CMakeLists.txt @@ -75,6 +75,9 @@ add_subdirectory(core) target_include_directories(rpcsx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(rpcsx PUBLIC + ffmpeg::avcodec + ffmpeg::swresample + ffmpeg::avutil rpcsx-gpu orbis::kernel rx