Mefiresu / RSDKv5-Decompilation

A complete decompilation of Retro Engine (v5) ported to the Wii
Other
52 stars 6 forks source link

Current Issue With Compiling Mania With Plus Support #48

Closed bladehorton closed 7 months ago

bladehorton commented 8 months ago

Receiving this error upon trying to compile. All of the dependencies are installed, alongside the "portaudio" package the output is whining about.

"compiling RSDKv5/main.cpp... Package portaudio was not found in the pkg-config search path. Perhaps you should add the directory containing `portaudio.pc' to the PKG_CONFIG_PATH environment variable Package 'portaudio', required by 'virtual:world', not found In file included from RSDKv5/RSDK/Core/RetroEngine.hpp:613, from RSDKv5/main.cpp:1: ./RSDKv5/RSDK/Core/ModAPI.hpp:10:10: fatal error: tinyxml2.h: No such file or directory 10 | #include "tinyxml2.h" | ^~~~ compilation terminated. make: *** [Makefile:229: bin/obj/Linux/OGL/RSDKv5/RSDKv5/main.o] Error 1"

Arch Linux

Mefiresu commented 8 months ago

This repo is a fork for the Wii port of RSDKv5/Mania. Are you trying to build the Linux version or the Wii port? Either way, the standard Makefile has been deprecated in favor of CMake for all platforms. Documentation is in a branch upstream: https://github.com/Rubberduckycooly/RSDKv5-Decompilation/blob/cmake-docs/README.md#how-to-build For cross compiling the Wii port (with devkitpro installed):

mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Wii.cmake
make -j8
bladehorton commented 8 months ago

Well, that got me further. However, I'm still receiving the error with the "portaudio" package "not being installed". And yes, I am trying to install the Wii port.

Mefiresu commented 8 months ago

portaudio isn't used at all in the Wii port, are you sure you followed the build guide correctly?

bladehorton commented 8 months ago

I am pretty sure yes, let me have another look...

bladehorton commented 8 months ago

Which build guide am I supposed to be following here?

Mefiresu commented 8 months ago

The link I sent you earlier (there's a Switch build guide that is pretty much identical to how you would build the Wii port, only by using -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Wii.cmake for the cmake command.

bladehorton commented 8 months ago

Further and further again, new error

"CMake Error at platforms/NintendoWii.cmake:22 (message): GAME_STATIC must be on Call Stack (most recent call first): CMakeLists.txt:66 (include) "

Mefiresu commented 8 months ago

Add -DGAME_STATIC=ON to the cmake command.

bladehorton commented 8 months ago

No change.

Using "cmake -B build -DGAME_STATIC=ON -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Wii.cmake "

saulfabregwiivc commented 8 months ago

try cloning the repo again, use the command: git clone https://github.com/Mefiresu/RSDKv5-Decompilation.git --recursive

--recursive is very important, because with it you'll clone all the subrepos and sublibraries needed by this port.

bladehorton commented 8 months ago

New error surprisingly.

"CMake Error at platforms/NintendoWii.cmake:70 (target_compile_options): Cannot specify compile options for target "PRIVATE" which is not built by this project. Call Stack (most recent call first): CMakeLists.txt:66 (include)

CMake Error at platforms/NintendoWii.cmake:71 (target_compile_definitions): Cannot specify compile definitions for target "PRIVATE" which is not built by this project. Call Stack (most recent call first): CMakeLists.txt:66 (include)

CMake Error at platforms/NintendoWii.cmake:72 (target_link_options): Cannot specify link options for target "PRIVATE" which is not built by this project. Call Stack (most recent call first): CMakeLists.txt:66 (include)

"

Mefiresu commented 7 months ago

You need the source code for Mania as well. I made this bash script to automate the whole building, try it.

#!/bin/bash
set -ex

echo "## Cloning repos"
git clone https://github.com/Rubberduckycooly/Sonic-Mania-Decompilation.git
git clone --recursive https://github.com/Mefiresu/RSDKv5-Decompilation.git Sonic-Mania-Decompilation/dependencies/v5wii

echo "## Creating build directory"
cd Sonic-Mania-Decompilation
mkdir build
cd build

echo "## Building"
cmake .. -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Wii.cmake -DRSDK_PATH="dependencies/v5wii" -DGAME_STATIC=ON
make -j$(nproc)

echo "## Done, build is in $(pwd)/dependencies/RSDKv5/RetroEngine.dol"
bladehorton commented 7 months ago

Well I'll be, this results in a successful build! I will have to wait for a few hours before I can test it on my Wii, to see if it even boots, let alone has Plus support. Sorry if I was such a pain that you had to make this script.