diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml index 2b9ee491..df8e186d 100644 --- a/.github/workflows/deploy_release.yml +++ b/.github/workflows/deploy_release.yml @@ -95,8 +95,8 @@ jobs: - uses: actions/download-artifact@v4 with: - name: cemu-bin-macos-x64 - path: cemu-bin-macos-x64 + pattern: cemu-bin-macos* + path: cemu-macos - name: Initialize run: | @@ -137,7 +137,12 @@ jobs: rm -r ./${{ env.CEMU_FOLDER_NAME }} - 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 run: | diff --git a/BUILD.md b/BUILD.md index cd2f8f6e..0bedb8f0 100644 --- a/BUILD.md +++ b/BUILD.md @@ -21,8 +21,8 @@ - [Installing Library Dependencies](#installing-library-dependencies) - [Build Cemu using CMake](#build-cemu-using-cmake) - [FreeBSD](#freebsd) - - [Dependencies](#dependencies) - - [Build Cemu](#build-cemu) + - [Installing Dependencies](#installing-dependencies) + - [Build Cemu on BSD with CMake](#build-cemu-on-bsd-with-cmake) - [Updating Cemu and source code](#updating-cemu-and-source-code) ## 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. -### 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 diff --git a/src/gui/wxgui/CemuUpdateWindow.cpp b/src/gui/wxgui/CemuUpdateWindow.cpp index 911c990c..542ae588 100644 --- a/src/gui/wxgui/CemuUpdateWindow.cpp +++ b/src/gui/wxgui/CemuUpdateWindow.cpp @@ -111,17 +111,25 @@ bool CemuUpdateWindow::QueryUpdateInfo(std::string& downloadUrlOut, std::string& auto* curl = curl_easy_init(); urlStr.append(_curlUrlEscape(curl, BUILD_VERSION_STRING)); #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 urlStr.append("&platform=windows"); #elif BOOST_OS_MACOS - urlStr.append("&platform=macos_bundle_x86"); + urlStr.append("&platform=macos_bundle"); #else #error Name for current platform is missing #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 return false; // BSD users must update from source; no binary available #endif + const auto& config = GetWxGUIConfig(); if(config.receive_untested_updates) urlStr.append("&allowNewUpdates=1"); diff --git a/src/gui/wxgui/input/HotkeySettings.cpp b/src/gui/wxgui/input/HotkeySettings.cpp index c1b7e3c3..5334820c 100644 --- a/src/gui/wxgui/input/HotkeySettings.cpp +++ b/src/gui/wxgui/input/HotkeySettings.cpp @@ -112,13 +112,7 @@ std::optional SaveScreenshot(std::vector data, int width, in } extern WindowSystem::WindowInfo g_window_info; -const std::unordered_map> 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); }}, -}; +std::unordered_map> HotkeySettings::s_cfgHotkeyToFuncMap; struct HotkeyEntry { @@ -180,6 +174,25 @@ HotkeySettings::~HotkeySettings() 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()); for (const auto& [cfgHotkey, func] : s_cfgHotkeyToFuncMap) { @@ -325,7 +338,7 @@ void HotkeySettings::OnKeyboardHotkeyInputRightClick(wxMouseEvent& event) } auto* inputButton = static_cast(event.GetEventObject()); auto& cfgHotkey = *static_cast(inputButton->GetClientData()); - uKeyboardHotkey newHotkey{ sHotkeyCfg::keyboardNone }; + uKeyboardHotkey newHotkey{sHotkeyCfg::keyboardNone}; if (cfgHotkey.keyboard.raw != newHotkey.raw) { m_needToSave |= true; @@ -344,7 +357,7 @@ void HotkeySettings::OnControllerHotkeyInputRightClick(wxMouseEvent& event) } auto* inputButton = static_cast(event.GetEventObject()); auto& cfgHotkey = *static_cast(inputButton->GetClientData()); - ControllerHotkey_t newHotkey{ sHotkeyCfg::controllerNone }; + ControllerHotkey_t newHotkey{sHotkeyCfg::controllerNone}; if (cfgHotkey.controller != newHotkey) { m_needToSave |= true; @@ -394,7 +407,7 @@ void HotkeySettings::OnKeyUp(wxKeyEvent& event) FinalizeInput(inputButton); } -template +template void HotkeySettings::FinalizeInput(wxButton* inputButton) { auto& cfgHotkey = *static_cast(inputButton->GetClientData()); @@ -409,7 +422,7 @@ void HotkeySettings::FinalizeInput(wxButton* inputButton) m_activeInputButton = nullptr; } -template +template void HotkeySettings::RestoreInputButton(void) { FinalizeInput(m_activeInputButton); diff --git a/src/gui/wxgui/input/HotkeySettings.h b/src/gui/wxgui/input/HotkeySettings.h index c9395b5a..52181968 100644 --- a/src/gui/wxgui/input/HotkeySettings.h +++ b/src/gui/wxgui/input/HotkeySettings.h @@ -19,7 +19,7 @@ public: private: inline static wxFrame* s_mainWindow = nullptr; - static const std::unordered_map> s_cfgHotkeyToFuncMap; + static std::unordered_map> s_cfgHotkeyToFuncMap; inline static std::unordered_map> s_keyboardHotkeyToFuncMap{}; inline static std::unordered_map> s_controllerHotkeyToFuncMap{}; inline static auto& s_cfgHotkeys = GetWxGUIConfig().hotkeys;