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
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: |

View File

@ -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

View File

@ -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");

View File

@ -112,13 +112,7 @@ std::optional<std::string> SaveScreenshot(std::vector<uint8> data, int width, in
}
extern WindowSystem::WindowInfo g_window_info;
const 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); }},
};
std::unordered_map<sHotkeyCfg*, std::function<void(void)>> 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<wxButton*>(event.GetEventObject());
auto& cfgHotkey = *static_cast<sHotkeyCfg*>(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<wxButton*>(event.GetEventObject());
auto& cfgHotkey = *static_cast<sHotkeyCfg*>(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<uKeyboardHotkey>(inputButton);
}
template <typename T>
template<typename T>
void HotkeySettings::FinalizeInput(wxButton* inputButton)
{
auto& cfgHotkey = *static_cast<sHotkeyCfg*>(inputButton->GetClientData());
@ -409,7 +422,7 @@ void HotkeySettings::FinalizeInput(wxButton* inputButton)
m_activeInputButton = nullptr;
}
template <typename T>
template<typename T>
void HotkeySettings::RestoreInputButton(void)
{
FinalizeInput<T>(m_activeInputButton);

View File

@ -19,7 +19,7 @@ public:
private:
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_controllerHotkeyToFuncMap{};
inline static auto& s_cfgHotkeys = GetWxGUIConfig().hotkeys;