Resolve merge conflicts with latest upstream. Fix FreeBSD links and add 2 missing dependencies to BUILD.md

This commit is contained in:
Kevin Reinholz 2025-07-22 19:27:08 -07:00
commit 061a59d875
5 changed files with 48 additions and 22 deletions

View File

@ -95,8 +95,8 @@ jobs:
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: cemu-bin-macos-x64 pattern: cemu-bin-macos*
path: cemu-bin-macos-x64 path: cemu-macos
- name: Initialize - name: Initialize
run: | run: |
@ -137,7 +137,12 @@ jobs:
rm -r ./${{ env.CEMU_FOLDER_NAME }} rm -r ./${{ env.CEMU_FOLDER_NAME }}
- name: Create release from macos-bin - name: Create release from macos-bin
run: cp cemu-bin-macos-x64/Cemu.dmg upload/cemu-${{ env.CEMU_VERSION }}-macos-12-x64.dmg run: |
cd cemu-macos
for bin_dir in cemu-bin-macos-*; do
arch="${bin_dir##cemu-bin-macos-}"
cp $bin_dir/Cemu.dmg ../upload/cemu-${{ env.CEMU_VERSION }}-macos-12-$arch.dmg
done
- name: Create release - name: Create release
run: | run: |

View File

@ -21,8 +21,8 @@
- [Installing Library Dependencies](#installing-library-dependencies) - [Installing Library Dependencies](#installing-library-dependencies)
- [Build Cemu using CMake](#build-cemu-using-cmake) - [Build Cemu using CMake](#build-cemu-using-cmake)
- [FreeBSD](#freebsd) - [FreeBSD](#freebsd)
- [Dependencies](#dependencies) - [Installing Dependencies](#installing-dependencies)
- [Build Cemu](#build-cemu) - [Build Cemu on BSD with CMake](#build-cemu-on-bsd-with-cmake)
- [Updating Cemu and source code](#updating-cemu-and-source-code) - [Updating Cemu and source code](#updating-cemu-and-source-code)
## Windows ## Windows
@ -198,11 +198,11 @@ To compile Cemu, a recent enough compiler and STL with C++20 support is required
Or a higher version as desired. Or a higher version as desired.
### Dependencies ### Installing Dependencies
`sudo pkg install boost-libs cmake-core curl glslang gtk3 ninja png pkgconf rapidjson wayland wayland-protocols wx32-gtk3 xorg zstd` `sudo pkg install boost-libs cmake-core curl glslang gtk3 libzip ninja png pkgconf pugixml rapidjson sdl2 wayland wayland-protocols wx32-gtk3 xorg zstd`
### Build Cemu ### Build Cemu on BSD with CMake
``` ```
git clone --recursive https://github.com/cemu-project/Cemu git clone --recursive https://github.com/cemu-project/Cemu

View File

@ -111,17 +111,25 @@ bool CemuUpdateWindow::QueryUpdateInfo(std::string& downloadUrlOut, std::string&
auto* curl = curl_easy_init(); auto* curl = curl_easy_init();
urlStr.append(_curlUrlEscape(curl, BUILD_VERSION_STRING)); urlStr.append(_curlUrlEscape(curl, BUILD_VERSION_STRING));
#if BOOST_OS_LINUX || BOOST_OS_BSD // dummy placeholder on BSD for now #if BOOST_OS_LINUX || BOOST_OS_BSD // dummy placeholder on BSD for now
urlStr.append("&platform=linux_appimage_x86"); urlStr.append("&platform=linux_appimage");
#elif BOOST_OS_WINDOWS #elif BOOST_OS_WINDOWS
urlStr.append("&platform=windows"); urlStr.append("&platform=windows");
#elif BOOST_OS_MACOS #elif BOOST_OS_MACOS
urlStr.append("&platform=macos_bundle_x86"); urlStr.append("&platform=macos_bundle");
#else #else
#error Name for current platform is missing #error Name for current platform is missing
#endif #endif
#if defined(__aarch64__)
urlStr.append("_aarch64");
#elif defined(ARCH_X86_64)
urlStr.append("_x86_64");
#else
urlStr.append("_unknown");
#endif
#if BOOST_OS_BSD #if BOOST_OS_BSD
return false; // BSD users must update from source; no binary available return false; // BSD users must update from source; no binary available
#endif #endif
const auto& config = GetWxGUIConfig(); const auto& config = GetWxGUIConfig();
if(config.receive_untested_updates) if(config.receive_untested_updates)
urlStr.append("&allowNewUpdates=1"); urlStr.append("&allowNewUpdates=1");

View File

@ -112,13 +112,7 @@ std::optional<std::string> SaveScreenshot(std::vector<uint8> data, int width, in
} }
extern WindowSystem::WindowInfo g_window_info; extern WindowSystem::WindowInfo g_window_info;
const std::unordered_map<sHotkeyCfg*, std::function<void(void)>> HotkeySettings::s_cfgHotkeyToFuncMap{ std::unordered_map<sHotkeyCfg*, std::function<void(void)>> HotkeySettings::s_cfgHotkeyToFuncMap;
{&s_cfgHotkeys.toggleFullscreen, [](void) { s_mainWindow->ShowFullScreen(!s_mainWindow->IsFullScreen()); }},
{&s_cfgHotkeys.toggleFullscreenAlt, [](void) { s_mainWindow->ShowFullScreen(!s_mainWindow->IsFullScreen()); }},
{&s_cfgHotkeys.exitFullscreen, [](void) { s_mainWindow->ShowFullScreen(false); }},
{&s_cfgHotkeys.takeScreenshot, [](void) { if(g_renderer) g_renderer->RequestScreenshot(SaveScreenshot); }},
{&s_cfgHotkeys.toggleFastForward, [](void) { ActiveSettings::SetTimerShiftFactor((ActiveSettings::GetTimerShiftFactor() < 3) ? 3 : 1); }},
};
struct HotkeyEntry struct HotkeyEntry
{ {
@ -180,6 +174,25 @@ HotkeySettings::~HotkeySettings()
void HotkeySettings::Init(wxFrame* mainWindowFrame) void HotkeySettings::Init(wxFrame* mainWindowFrame)
{ {
s_cfgHotkeyToFuncMap.insert({
{&s_cfgHotkeys.toggleFullscreen, [](void) {
s_mainWindow->ShowFullScreen(!s_mainWindow->IsFullScreen());
}},
{&s_cfgHotkeys.toggleFullscreenAlt, [](void) {
s_mainWindow->ShowFullScreen(!s_mainWindow->IsFullScreen());
}},
{&s_cfgHotkeys.exitFullscreen, [](void) {
s_mainWindow->ShowFullScreen(false);
}},
{&s_cfgHotkeys.takeScreenshot, [](void) {
if (g_renderer)
g_renderer->RequestScreenshot(SaveScreenshot);
}},
{&s_cfgHotkeys.toggleFastForward, [](void) {
ActiveSettings::SetTimerShiftFactor((ActiveSettings::GetTimerShiftFactor() < 3) ? 3 : 1);
}},
});
s_keyboardHotkeyToFuncMap.reserve(s_cfgHotkeyToFuncMap.size()); s_keyboardHotkeyToFuncMap.reserve(s_cfgHotkeyToFuncMap.size());
for (const auto& [cfgHotkey, func] : s_cfgHotkeyToFuncMap) for (const auto& [cfgHotkey, func] : s_cfgHotkeyToFuncMap)
{ {
@ -325,7 +338,7 @@ void HotkeySettings::OnKeyboardHotkeyInputRightClick(wxMouseEvent& event)
} }
auto* inputButton = static_cast<wxButton*>(event.GetEventObject()); auto* inputButton = static_cast<wxButton*>(event.GetEventObject());
auto& cfgHotkey = *static_cast<sHotkeyCfg*>(inputButton->GetClientData()); auto& cfgHotkey = *static_cast<sHotkeyCfg*>(inputButton->GetClientData());
uKeyboardHotkey newHotkey{ sHotkeyCfg::keyboardNone }; uKeyboardHotkey newHotkey{sHotkeyCfg::keyboardNone};
if (cfgHotkey.keyboard.raw != newHotkey.raw) if (cfgHotkey.keyboard.raw != newHotkey.raw)
{ {
m_needToSave |= true; m_needToSave |= true;
@ -344,7 +357,7 @@ void HotkeySettings::OnControllerHotkeyInputRightClick(wxMouseEvent& event)
} }
auto* inputButton = static_cast<wxButton*>(event.GetEventObject()); auto* inputButton = static_cast<wxButton*>(event.GetEventObject());
auto& cfgHotkey = *static_cast<sHotkeyCfg*>(inputButton->GetClientData()); auto& cfgHotkey = *static_cast<sHotkeyCfg*>(inputButton->GetClientData());
ControllerHotkey_t newHotkey{ sHotkeyCfg::controllerNone }; ControllerHotkey_t newHotkey{sHotkeyCfg::controllerNone};
if (cfgHotkey.controller != newHotkey) if (cfgHotkey.controller != newHotkey)
{ {
m_needToSave |= true; m_needToSave |= true;
@ -394,7 +407,7 @@ void HotkeySettings::OnKeyUp(wxKeyEvent& event)
FinalizeInput<uKeyboardHotkey>(inputButton); FinalizeInput<uKeyboardHotkey>(inputButton);
} }
template <typename T> template<typename T>
void HotkeySettings::FinalizeInput(wxButton* inputButton) void HotkeySettings::FinalizeInput(wxButton* inputButton)
{ {
auto& cfgHotkey = *static_cast<sHotkeyCfg*>(inputButton->GetClientData()); auto& cfgHotkey = *static_cast<sHotkeyCfg*>(inputButton->GetClientData());
@ -409,7 +422,7 @@ void HotkeySettings::FinalizeInput(wxButton* inputButton)
m_activeInputButton = nullptr; m_activeInputButton = nullptr;
} }
template <typename T> template<typename T>
void HotkeySettings::RestoreInputButton(void) void HotkeySettings::RestoreInputButton(void)
{ {
FinalizeInput<T>(m_activeInputButton); FinalizeInput<T>(m_activeInputButton);

View File

@ -19,7 +19,7 @@ public:
private: private:
inline static wxFrame* s_mainWindow = nullptr; inline static wxFrame* s_mainWindow = nullptr;
static const std::unordered_map<sHotkeyCfg*, std::function<void(void)>> s_cfgHotkeyToFuncMap; static std::unordered_map<sHotkeyCfg*, std::function<void(void)>> s_cfgHotkeyToFuncMap;
inline static std::unordered_map<uint16, std::function<void(void)>> s_keyboardHotkeyToFuncMap{}; inline static std::unordered_map<uint16, std::function<void(void)>> s_keyboardHotkeyToFuncMap{};
inline static std::unordered_map<uint16, std::function<void(void)>> s_controllerHotkeyToFuncMap{}; inline static std::unordered_map<uint16, std::function<void(void)>> s_controllerHotkeyToFuncMap{};
inline static auto& s_cfgHotkeys = GetWxGUIConfig().hotkeys; inline static auto& s_cfgHotkeys = GetWxGUIConfig().hotkeys;