Commit Graph

45938 Commits

Author SHA1 Message Date
Joshua Vandaële
f1a639b12b
CWDemangler: Resolve missing-declarations warnings 2026-07-25 05:19:26 +02:00
Joshua Vandaële
b0a46872eb
DolphinQt/Config: Resolve sign-compare warnings 2026-07-25 05:19:26 +02:00
Joshua Vandaële
682490c220
FileSystemCommon: Resolve maybe-uninitialized warning 2026-07-25 05:19:26 +02:00
Joshua Vandaële
69527ec44b
DirectoryBlob: Resolve reorder warning 2026-07-25 05:19:26 +02:00
Joshua Vandaële
1edea92358
HSP_DeviceGBPlayer: Resolve shadowed variable warning 2026-07-25 05:19:26 +02:00
OatmealDome
707d3c7a73
Merge pull request #14475 from JoshuaVandaele/cmake-replaces-vs
CMake: Replace the Visual Studio project
2026-07-24 22:28:25 -04:00
Joshua Vandaële
c1261e7406
CMake: Introduce Presets, replacing Settings
This introduces a CMakePresets file for both Unix-likes and Windows that replace the old CMakeSettings.

It adds presets for **Debug** and **Release** profiles for both **x64** and **ARM64** architectures, as well as **Generic builds**.
Presets can be used using[ Visual Studio's built-in CMakePresets support](https://learn.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-170), or [Visual Studio Code's CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) extension.

They can also be used from the command line, like so:

- x64/Unix-like/Ninja:
  - Configure: `cmake --preset ninja-release-x64`
  - Build: `cmake --build --preset ninja-build-release-x64`
  - Configure + Build: `cmake --workflow --preset ninja-release-x64`
- ARM64/Windows/Visual Studio:
  - Configure: `cmake --preset visualstudio-release-arm64`
  - Build: `cmake --build --preset visualstudio-build-release-arm64`
  - Configure + Build: `cmake --workflow --preset visualstudio-release-arm64`

The Ninja generator is available to both Windows and Unix-likes, while the Visual Studio Generator is only available on Windows.

**Cross-compiling**

On **Windows**, the Visual Studio generator automatically takes care of everything, you just need to select an ARM64 preset.

On **Unix-likes**, to cross-compile you need to install a cross-compiler and (optionally) a sysroot of the target system.
Here is an example to compile from x64 to ARM64 with a sysroot:

- `cmake --preset ninja-release-arm64 -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_SYSROOT=/opt/sysroots/aarch64-linux-gnu`
- `cmake --build --preset ninja-build-release-arm64`

You will need a sysroot to link against Qt, since we do not vendor it in on platforms other than Windows.

**User presets**

A `CMakeUserPresets.json` file may be created locally at the root of the project to further customize your presets.
For example, here are the user presets I used to test this PR on Arch Linux with a generic Arch Linux ARM sysroot:

```json
{
  "version": 10,
  "configurePresets": [
    {
      "name": "gcc-debug-arm64",
      "inherits": "ninja-debug-arm64",
      "cacheVariables": {
        "CMAKE_C_COMPILER": "aarch64-linux-gnu-gcc",
        "CMAKE_CXX_COMPILER": "aarch64-linux-gnu-g++",
        "CMAKE_EXE_LINKER_FLAGS": "-L/opt/sysroots/ArchLinuxARM/lib",
        "CMAKE_SYSROOT": "/opt/sysroots/ArchLinuxARM"
      }
    },
    {
      "name": "clang-debug-arm64",
      "inherits": "ninja-debug-arm64",
      "cacheVariables": {
        "CMAKE_C_COMPILER": "clang",
        "CMAKE_CXX_COMPILER": "clang++",
        "CMAKE_C_FLAGS": "-target aarch64-linux-gnu",
        "CMAKE_CXX_FLAGS": "-target aarch64-linux-gnu",
        "CMAKE_SYSROOT": "/opt/sysroots/ArchLinuxARM"
      }
    },
    {
      "name": "clang-debug-x64",
      "inherits": "ninja-debug-x64",
      "cacheVariables": {
        "CMAKE_C_COMPILER": "clang",
        "CMAKE_CXX_COMPILER": "clang++"
      }
    }
  ],
  "buildPresets": [
    {
      "name": "gcc-build-debug-arm64",
      "configurePreset": "gcc-debug-arm64"
    },
    {
      "name": "clang-build-debug-arm64",
      "configurePreset": "clang-debug-arm64"
    },
    {
      "name": "clang-build-debug-x64",
      "configurePreset": "clang-debug-x64"
    }
  ],
  "workflowPresets": [
    {
      "name": "gcc-debug-arm64",
      "steps": [
        { "type": "configure", "name": "gcc-debug-arm64" },
        { "type": "build", "name": "gcc-build-debug-arm64" }
      ]
    },
    {
      "name": "clang-debug-arm64",
      "steps": [
        { "type": "configure", "name": "clang-debug-arm64" },
        { "type": "build", "name": "clang-build-debug-arm64" }
      ]
    },
    {
      "name": "clang-debug-x64",
      "steps": [
        { "type": "configure", "name": "clang-debug-x64" },
        { "type": "build", "name": "clang-build-debug-x64" }
      ]
    }
  ]
}
```

They are then used like so:
Configure + Build with GCC: `cmake --workflow --preset gcc-debug-arm64`
Configure + Build with Clang: `cmake --workflow --preset clang-debug-arm64`
Configure + Build with Clang (x64): `cmake --workflow --preset clang-debug-x64`

*Addendum: It should also now be possible to cross-compile from Windows to Unix-likes, and Unix-like to other Unix-like (e.g. Linux -> FreeBSD), however this is untested.*
2026-07-24 03:45:13 +02:00
Joshua Vandaële
c7b621ad08
CMake: Set VS startup project to dolphin-emu 2026-07-24 03:45:13 +02:00
Joshua Vandaële
fa83b0fe49
CMake: Disable install targets on Windows 2026-07-24 03:45:13 +02:00
Joshua Vandaële
8366609fc1
CMake: Error out if trying to build generic builds on Windows
Generic builds have never been supported on Windows.
2026-07-24 03:45:13 +02:00
Joshua Vandaële
808a82d5dd
CMake: Bump minimum requirement to 3.25 2026-07-24 03:45:13 +02:00
Joshua Vandaële
6da4bc38e1
CMake: Unify output directory 2026-07-24 03:45:13 +02:00
Joshua Vandaële
3d9f46cd64
CMake: Remove LINUX_LOCAL_DEV and symlink required files 2026-07-24 03:45:13 +02:00
Joshua Vandaële
fa2a250f01
CMake: Unify sys directories 2026-07-24 03:45:13 +02:00
Joshua Vandaële
a30aa5cf36
CMake: Unify translation directories 2026-07-24 03:45:13 +02:00
Joshua Vandaële
20bded8066
CMake: PDBs outside of Binaries 2026-07-24 03:45:13 +02:00
Joshua Vandaële
d2833fb788
Remove Visual Studio Projects and Solutions in favor of CMake 2026-07-24 03:45:13 +02:00
OatmealDome
d6e803e63d
Merge pull request #14737 from matellush/flatpak-runtime
Flatpak: Update runtime to `6.11`
2026-07-23 20:02:57 -04:00
matellush
a7f5427279
Flatpak: Update runtime to 6.11 2026-07-23 22:46:23 +02:00
OatmealDome
e2013caea0
Merge pull request #14748 from OatmealDome/mac-ccache
BuildMacOSUniversalBinary: Add flag to enable CCache
2026-07-22 20:32:09 -04:00
Scott Mansell
03e409a3e1
Merge pull request #14749 from tygyh/Replace-conditions-with-regex
UICommon: Replace `find != std::npos` with `contains`
2026-07-23 09:27:47 +12:00
OatmealDome
c490bc2c2e
BuildMacOSUniversalBinary: Add flag to enable CCache 2026-07-22 17:11:18 -04:00
Dr. Dystopia
2ca2a5c875 UICommon: Replace find != std::npos with contains 2026-07-22 12:15:55 +02:00
Scott Mansell
b008142f72
Merge pull request #14436 from cbartondock/master
Loading custom textures using combination of elf/dol game ids and iso game ids.
2026-07-22 09:54:01 +12:00
Scott Mansell
00626b263f
Merge pull request #14744 from acts-1631/security/elf-reader-bounds
Core/Boot: validate standalone ELF input ranges
2026-07-21 14:58:38 +12:00
Jordan Woyak
b24783f84d
Merge pull request #14743 from AdmiralCurtiss/sockaddr-init
IOS/NetIPTopDevice: Zero-initialize sockaddr structs
2026-07-20 20:17:44 -05:00
Acts1631
49453c045c Core: log invalid ELF input
Log each rejected ELF header, range, and symbol reference. This
provides actionable diagnostics for malformed files without changing the
validation behavior.
2026-07-20 21:10:29 -04:00
Acts1631
24aafdeb47 Core: validate standalone ELF input ranges
ElfReader trusted table offsets and counts from standalone ELF files.
Malformed input could make it read and write past the loaded file buffer.

Validate the ELF header, table ranges, segment data, section data, and
string-table references before accessing them. Invalid files use the
existing executable boot failure path.
2026-07-20 19:50:54 -04:00
Admiral H. Curtiss
95ee7de40e
IOS/NetIPTopDevice: Zero-initialize sockaddr structs
Fixes https://github.com/dolphin-emu/dolphin/security/advisories/GHSA-5fqv-9qrg-gm4j
2026-07-21 01:30:30 +02:00
Admiral H. Curtiss
da1aad5188
Merge pull request #14740 from acts-1631/security/netplay-lzo-bounds
NetPlay: bound LZO decompression output
2026-07-21 01:30:10 +02:00
Acts1631
5b9961b0c6 NetPlay: bound LZO decompression output
NetPlay save synchronization decoded remote LZO blocks with the unsafe
decoder and no output capacity. A malicious host could overflow a client
buffer with a block larger than its declared size.

Use the bounds-checking decoder, validate the declared output length, and
grow buffer results only after each checked block has been decoded.
2026-07-19 21:28:23 -04:00
Scott Mansell
cb9df12645
Merge pull request #14739 from JoshuaVandaele/mod-convert
GameFile: Disallow mods from being converted
2026-07-20 12:34:50 +12:00
Joshua Vandaële
48b640c8bb
GameFile: Disallow mods from being converted 2026-07-19 23:50:05 +02:00
JosJuice
415ec4de18
Merge pull request #14673 from tommywaaf/android-dolphinbar-balance-board
Android: Route DolphinBar Balance Board to the Balance Board slot
2026-07-18 12:34:53 +02:00
Scott Mansell
b6d8bc299e
Merge pull request #14726 from JosJuice/gcadapter-deregister-on-thread-end
GCAdapter: Deregister callback when scan thread exits
2026-07-16 08:58:02 +12:00
Admiral H. Curtiss
81402ca6aa
Merge pull request #14732 from khang06/small-tmd-check
IOS/ES: Prevent reading TMDs that are too small
2026-07-15 22:08:12 +02:00
cbartondock
83dc4685aa waterfall loading of textures via id to prefer elfid-gameid when launched via elf; fallback to gameid if no match 2026-07-15 12:02:16 -07:00
Khang
900febec29 IOS/ES: Prevent reading TMDs that are too small 2026-07-15 02:12:31 -04:00
Scott Mansell
fd8391a852
Merge pull request #14263 from JoshuaVandaele/ccache-toggle
CCache: Set as opt-in by default
2026-07-15 17:48:30 +12:00
Scott Mansell
566519d135
Merge pull request #14222 from Sintendo/ppcsymboldb-lookup
PPCSymbolDB: Avoid double lookups
2026-07-15 17:46:54 +12:00
Scott Mansell
ee5eba860d
Merge pull request #14651 from DacoTaco/fixes/dolalignment
fixes: make dolreader validate section addresses and sizes
2026-07-15 17:08:11 +12:00
Scott Mansell
552126a0e6
Merge pull request #14675 from JosJuice/game-ini-gbihf-texcache
GameSettings: Remove SafeTextureCacheColorSamples from gbihf
2026-07-15 17:01:46 +12:00
Scott Mansell
1ab4403c23
Merge pull request #14703 from JoshuaVandaele/miniupnpc-arm64-cross
Externals/miniupnpc: Disable warnings
2026-07-15 17:00:28 +12:00
Scott Mansell
d895ed7d5c
Merge pull request #14722 from idkwhere1sthisname/master
IOS/ES: allow Wii System Transfer and WagonCompat Transfer Tool to pass SetUID check
2026-07-15 16:45:43 +12:00
Dentomologist
d3b2943807
Merge pull request #14705 from JosJuice/directoryblob-dtk-comment
DiscIO: Add DTK alignment comment in DirectoryBlob
2026-07-14 13:52:09 -07:00
Dentomologist
00beaa84a5
Merge pull request #14730 from JoshuaVandaele/contributing-cxx-standard
Contributing.md: Update C++20 mentions to C++23
2026-07-14 11:58:45 -07:00
Admiral H. Curtiss
37726b610d
Merge pull request #14723 from Dentomologist/resource_pack_manager_fix_crash_when_removing_pack
ResourcePackManager: Fix crash when removing pack and properly update list
2026-07-14 19:26:15 +02:00
Admiral H. Curtiss
fee15d96ad
Merge pull request #14719 from cscd98/m3u-fix
m3u: normalize line endings except win32
2026-07-14 19:14:59 +02:00
JosJuice
1b67ed71f4
Merge pull request #14357 from Windsurf7/sonicunleashed-gameini
GameINI: Add codes to Sonic Unleashed
2026-07-14 18:49:16 +02:00
JosJuice
baf154de0e DiscIO: Add DTK alignment comment in DirectoryBlob
This requirement came up in the review of e013d95. Instead of just
removing the comment like e013d95 did, let's add a more detailed
comment.
2026-07-14 18:39:56 +02:00