From 3f75ea4e1c349d169e905b467c9f30ceb5082197 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 4 Apr 2026 04:46:13 +1100 Subject: Various cleanups: * emu/device.cpp: Take std::string_view tag in constructor. * emu/save.cpp: Cleaned up interface for reporting error messages. * docs: Cleaned up stuff that's no longer relevant. * machine/s3c44b0.cpp: Overhauled logging. * osd/modules/lib/osdobj_common.cpp: Removed CoreAudio options that no longer do anything. * Cleaned up some more stuff to prepare for 64-bit offs_t. --- scripts/src/osd/modules.lua | 6 ------ 1 file changed, 6 deletions(-) (limited to 'scripts/src/osd/modules.lua') diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index fddf73b4046..04892b50959 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -154,12 +154,6 @@ function osdmodulesbuild() ext_includedir("asio"), } - if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") then - buildoptions { - "-Wno-unused-private-field", - } - end - if _OPTIONS["targetos"]=="windows" then includedirs { MAME_DIR .. "3rdparty/winpcap/Include", -- cgit v1.2.3 From 21defbea953c36bba6eeec5ea6f7cf6d3cd310d8 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 4 Apr 2026 07:00:33 +1100 Subject: Fix up more stuff for upgraded tools, etc. docs: It's no longer possible to get a working Qt 5 setup with MSYS2, and there's no 32-bit Qt 6 package. Updated docs to reflect this. Use Qt 6 on Windows, use qmake to find moc. Fixed linking on Windows with static SDL3. input/input_dinput.cpp: Support SDL3. --- docs/source/initialsetup/compilingmame.rst | 8 ++++---- scripts/src/osd/modules.lua | 20 +++++++++++++++---- scripts/src/osd/sdl3.lua | 6 ++++++ scripts/src/tools.lua | 7 +++++++ src/emu/validity.cpp | 32 +++++++++++++++--------------- src/osd/modules/debugger/debugqt.cpp | 2 +- src/osd/modules/input/input_dinput.cpp | 6 ++++++ src/osd/modules/input/input_sdl3.cpp | 2 +- src/osd/sdl3/window.cpp | 1 - src/osd/sdl3/window.h | 2 -- src/tools/testkeys.cpp | 8 ++++---- 11 files changed, 61 insertions(+), 33 deletions(-) (limited to 'scripts/src/osd/modules.lua') diff --git a/docs/source/initialsetup/compilingmame.rst b/docs/source/initialsetup/compilingmame.rst index 63b9825b7ff..5b59b79a3ae 100644 --- a/docs/source/initialsetup/compilingmame.rst +++ b/docs/source/initialsetup/compilingmame.rst @@ -147,7 +147,7 @@ building for. ``mingw-w64-x86_64-libc++``. * To build against the portable SDL interfaces, you’ll need ``mingw-w64-x86_64-SDL2`` and ``mingw-w64-x86_64-SDL2_ttf``. -* To build the Qt debugger, you’ll need ``mingw-w64-x86_64-qt5``. +* To build the Qt debugger, you’ll need ``mingw-w64-x86_64-qt6-base``. * Open the **mingw64.exe** helper from the **msys64** installation folder or the **MSYS2 MinGW 64-bit** shortcut from the start menu to start a Bash shell configured with the correct paths and environment variables. @@ -162,7 +162,7 @@ building for. ``mingw-w64-clang-x86_64-libc++``. * To build against the portable SDL interfaces, you’ll need ``mingw-w64-clang-x86_64-SDL2`` and ``mingw-w64-clang-x86_64-SDL2_ttf``. -* To build the Qt debugger, you’ll need ``mingw-w64-clang-x86_64-qt5``. +* To build the Qt debugger, you’ll need ``mingw-w64-clang-x86_64-qt6-base``. * Open the **clang64.exe** helper from the **msys64** installation folder or use the **MSYS2 CLANG64** shortcut to start a Bash shell configured with the correct paths and environment variables. @@ -177,7 +177,7 @@ building for. ``mingw-w64-clang-aarch64-libc++``. * To build against the portable SDL interfaces, you’ll need ``mingw-w64-clang-aarch64-SDL2`` and ``mingw-w64-clang-aarch64-SDL2_ttf``. -* To build the Qt debugger, you’ll need ``mingw-w64-clang-aarch64-qt5``. +* To build the Qt debugger, you’ll need ``mingw-w64-clang-aarch64-qt6-base``. * Open the **clangarm64.exe** helper from the **msys64** installation folder or use the **MSYS2 CLANGARM64** shortcut to start a Bash shell configured with the correct paths and environment variables. @@ -190,7 +190,7 @@ building for. ``mingw-w64-i686-libc++``. * To build against the portable SDL interfaces, you’ll need ``mingw-w64-i686-SDL2`` and ``mingw-w64-i686-SDL2_ttf``. -* To build the Qt debugger, you’ll need ``mingw-w64-i686-qt5``. +* It is no longer possible to include the Qt debugger in 32-bit builds. * Open the **mingw32.exe** helper from the **msys64** installation folder or the **MSYS2 MinGW 32-bit** shortcut from the start menu to start a Bash shell configured with the correct paths and environment variables. diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index 04892b50959..9e656b95206 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -401,7 +401,19 @@ function qtdebuggerbuild() local MOC = "" if (os.is("windows")) then - MOC = "moc" + local qt_host_libexecs + if _OPTIONS["QT_HOME"]~=nil then + qt_host_libexecs = backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_HOST_LIBEXECS") + else + qt_host_libexecs = backtick("qmake -query QT_HOST_LIBEXECS") + end + MOCTST = backtick(qt_host_libexecs .. "/moc --version") + if MOCTST=='' then + print("Qt's Meta Object Compiler (moc) wasn't found!") + os.exit(1) + else + MOC = qt_host_libexecs .. "/moc" + end else if _OPTIONS["QT_HOME"]~=nil then local MOCTST = backtick(_OPTIONS["QT_HOME"] .. "/bin/moc --version 2>/dev/null") @@ -515,9 +527,9 @@ function osdmodulestargetconf() "-L$(shell qmake -query QT_INSTALL_LIBS)", } links { - "Qt5Core.dll", - "Qt5Gui.dll", - "Qt5Widgets.dll", + "Qt6Core.dll", + "Qt6Gui.dll", + "Qt6Widgets.dll", } elseif _OPTIONS["targetos"]=="macosx" then local qt_version = str_to_version(backtick("qmake -query QT_VERSION")) diff --git a/scripts/src/osd/sdl3.lua b/scripts/src/osd/sdl3.lua index b68ee0c2771..7446f6e475e 100644 --- a/scripts/src/osd/sdl3.lua +++ b/scripts/src/osd/sdl3.lua @@ -83,7 +83,13 @@ function maintargetosdoptions(_target,_subtarget) links { "dinput8", + "gdi32", + "imm32", + "ole32", "psapi", + "setupapi", + "uuid", + "version", } elseif _OPTIONS["targetos"]=="haiku" then links { diff --git a/scripts/src/tools.lua b/scripts/src/tools.lua index d4d31e3cb94..1c79e7da848 100644 --- a/scripts/src/tools.lua +++ b/scripts/src/tools.lua @@ -816,6 +816,13 @@ if (_OPTIONS["osd"] == "sdl") or (_OPTIONS["osd"] == "sdl3") then end links { libsdl, + "gdi32", + "imm32", + "ole32", + "oleaut32", + "setupapi", + "uuid", + "version", } configuration { "vs*" } links { diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp index 8fe11e39e16..b65e1faf3c9 100644 --- a/src/emu/validity.cpp +++ b/src/emu/validity.cpp @@ -616,10 +616,10 @@ void validate_rgb() // test factor multiplication (method) imm = random_i32(); - expected_a *= imm; - expected_r *= imm; - expected_g *= imm; - expected_b *= imm; + expected_a = expected_a * imm; + expected_r = expected_r * imm; + expected_g = expected_g * imm; + expected_b = expected_b * imm; rgb.mul_imm(imm); check_expected("rgbaint_t::mul_imm"); @@ -730,28 +730,28 @@ void validate_rgb() // test uniform or imm = random_i32(); - expected_a |= imm; - expected_r |= imm; - expected_g |= imm; - expected_b |= imm; + expected_a = expected_a | imm; + expected_r = expected_r | imm; + expected_g = expected_g | imm; + expected_b = expected_b | imm; rgb.or_imm(imm); check_expected("rgbaint_t::or_imm"); // test uniform and imm = random_i32(); - expected_a &= imm; - expected_r &= imm; - expected_g &= imm; - expected_b &= imm; + expected_a = expected_a & imm; + expected_r = expected_r & imm; + expected_g = expected_g & imm; + expected_b = expected_b & imm; rgb.and_imm(imm); check_expected("rgbaint_t::and_imm"); // test uniform xor imm = random_i32(); - expected_a ^= imm; - expected_r ^= imm; - expected_g ^= imm; - expected_b ^= imm; + expected_a = expected_a ^ imm; + expected_r = expected_r ^ imm; + expected_g = expected_g ^ imm; + expected_b = expected_b ^ imm; rgb.xor_imm(imm); check_expected("rgbaint_t::xor_imm"); diff --git a/src/osd/modules/debugger/debugqt.cpp b/src/osd/modules/debugger/debugqt.cpp index aeae07324e4..da600c4c58e 100644 --- a/src/osd/modules/debugger/debugqt.cpp +++ b/src/osd/modules/debugger/debugqt.cpp @@ -70,7 +70,7 @@ public: virtual void wait_for_debugger(device_t &device, bool firststop) override; virtual void debugger_update() override; #if defined(_WIN32) && !defined(SDLMAME_WIN32) - virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *) override + virtual bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override { winwindow_qt_filter(message); return false; diff --git a/src/osd/modules/input/input_dinput.cpp b/src/osd/modules/input/input_dinput.cpp index 900aa4b8eec..5b2f99e7b01 100644 --- a/src/osd/modules/input/input_dinput.cpp +++ b/src/osd/modules/input/input_dinput.cpp @@ -1276,11 +1276,17 @@ std::pair, LPCDIDATAFORMAT> dinput_a window_handle = window.platform_window(); #elif defined(SDLMAME_WIN32) auto const sdlwindow = window.platform_window(); +#if SDL_VERSION_ATLEAST(3, 0, 0) + window_handle = reinterpret_cast(SDL_GetPointerProperty(SDL_GetWindowProperties(sdlwindow), SDL_PROP_WINDOW_WIN32_HWND_POINTER, nullptr)); + if (!window_handle) + return std::make_pair(nullptr, nullptr); +#else SDL_SysWMinfo info; SDL_VERSION(&info.version); if (!SDL_GetWindowWMInfo(sdlwindow, &info)) return std::make_pair(nullptr, nullptr); window_handle = info.info.win.window; +#endif #endif switch (cooperative_level) { diff --git a/src/osd/modules/input/input_sdl3.cpp b/src/osd/modules/input/input_sdl3.cpp index ee067e32df0..e344f9304cb 100644 --- a/src/osd/modules/input/input_sdl3.cpp +++ b/src/osd/modules/input/input_sdl3.cpp @@ -633,7 +633,7 @@ private: s8 currkey[MAX_KEYS]; }; - SDL_KeyboardID m_keyboard_id; + [[maybe_unused]] SDL_KeyboardID m_keyboard_id; keyboard_trans_table const &m_trans_table; keyboard_state m_keyboard; std::chrono::steady_clock::time_point m_capslock_pressed; diff --git a/src/osd/sdl3/window.cpp b/src/osd/sdl3/window.cpp index a2a20b2d3fd..caf240f1285 100644 --- a/src/osd/sdl3/window.cpp +++ b/src/osd/sdl3/window.cpp @@ -1373,7 +1373,6 @@ sdl_window_info::sdl_window_info( , m_minimum_dim(0, 0) , m_windowed_dim(0, 0) , m_rendered_event(0, 1) - , m_extra_flags(0) , m_mouse_captured(false) , m_mouse_hidden(false) , m_pointer_mask(0) diff --git a/src/osd/sdl3/window.h b/src/osd/sdl3/window.h index 2f8a744690b..6c4b1e094c7 100644 --- a/src/osd/sdl3/window.h +++ b/src/osd/sdl3/window.h @@ -118,8 +118,6 @@ private: // Original display_mode SDL_DisplayMode m_original_mode; - int m_extra_flags; - // monitor info bool m_mouse_captured; bool m_mouse_hidden; diff --git a/src/tools/testkeys.cpp b/src/tools/testkeys.cpp index c0f39aed09d..2827b93107b 100644 --- a/src/tools/testkeys.cpp +++ b/src/tools/testkeys.cpp @@ -9,16 +9,16 @@ // //============================================================ -#ifdef SDLMAME_SDL3 +#if defined(SDLMAME_SDL3) #include #include -#endif +#endif // defined(SDLMAME_SDL3) #include "osdcore.h" -#ifndef SDLMAME_SDL3 +#if !defined(SDLMAME_SDL3) #include "SDL2/SDL.h" -#endif +#endif // !defined(SDLMAME_SDL3) #include #include -- cgit v1.2.3 From f9fb5fcff0d77d26c1c88d13c14c59ae37e9fea9 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 4 Apr 2026 07:38:32 +1100 Subject: Fixed Qt debugger build on Windows with clang. Qt provides inline definitions of dllimport functions, which causes a warning. There are too many of them to practically leave the warning enabled for this module. --- scripts/src/osd/modules.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/src/osd/modules.lua') diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index 9e656b95206..aaaf8965ad0 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -358,6 +358,11 @@ function qtdebuggerbuild() buildoptions { "-Wno-error=inconsistent-missing-override", } + if _OPTIONS["targetos"]=="windows" then + buildoptions { + "-Wno-ignored-attributes", + } + end configuration { } end -- cgit v1.2.3 From 551c10eba468ad6e5be3200a1bd246fa9731de16 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 5 Apr 2026 06:10:51 +1000 Subject: Move build system adjusttment and fixes: * Bumped minimum clang version to 13 - clang 12 is just too buggy. * Assume Qt 6 will be used, dropped Qt 5 support. * Fixed finding Qt headers on Fedora and hopefully other distros. * Always use static SDL2 on Windows. * debugger/qt/debuggerview.cpp: Fixed build with Qt < 6.6. * imgtool/modules/vzdos.cpp: Fixed build with Linux GCC 11. --- .github/workflows/ci-linux.yml | 2 +- docs/source/initialsetup/compilingmame.rst | 85 ++++++++--------------- scripts/genie.lua | 22 +++--- scripts/src/osd/modules.lua | 62 ++++++----------- scripts/src/osd/sdl.lua | 2 + scripts/src/osd/sdl3_cfg.lua | 2 +- scripts/src/osd/sdl_cfg.lua | 2 +- src/osd/modules/debugger/qt/breakpointswindow.cpp | 4 -- src/osd/modules/debugger/qt/dasmwindow.cpp | 10 +-- src/osd/modules/debugger/qt/debuggerview.cpp | 14 ++-- src/osd/modules/debugger/qt/mainwindow.cpp | 6 +- src/osd/modules/debugger/qt/memorywindow.cpp | 6 +- src/tools/imgtool/modules/vzdos.cpp | 2 +- 13 files changed, 75 insertions(+), 144 deletions(-) (limited to 'scripts/src/osd/modules.lua') diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 4610644aa1a..03e263bff80 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -48,7 +48,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libfontconfig-dev libasound2-dev libxinerama-dev libxi-dev qtbase5-dev qtbase5-dev-tools + sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libfontconfig-dev libasound2-dev libxinerama-dev libxi-dev qt6-base-dev qt6-base-dev-tools - name: Install clang if: matrix.compiler == 'clang' run: sudo apt-get install -y clang diff --git a/docs/source/initialsetup/compilingmame.rst b/docs/source/initialsetup/compilingmame.rst index 5b59b79a3ae..69e6f0c0b14 100644 --- a/docs/source/initialsetup/compilingmame.rst +++ b/docs/source/initialsetup/compilingmame.rst @@ -9,7 +9,7 @@ All Platforms ------------- * To compile MAME, you need a C++20 compiler and runtime library. We - support building with GCC version 11 or later and clang version 11 or + support building with GCC version 11 or later and clang version 13 or later. MAME should run with GNU libstdc++ version 11 or later or libc++ version 11 or later. The initial release of any major version of GCC should be avoided. For example, if you want to compile MAME @@ -96,7 +96,7 @@ Windows 11 or later. will need to install the MSYS2 packages for SDL 2 version 2.0.14 or later. * By default, MAME will include the native Windows debugger. To also include the portable Qt debugger, add **USE_QTDEBUG=1** to the make options. You - will need to install the MSYS2 packages for Qt 5. + will need to install the MSYS2 packages for Qt 6. Using a standard MSYS2 installation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -119,18 +119,22 @@ These instructions assume you have some familiarity with MSYS2 and the ``bash``, ``git`` and ``make``. * For debugging you may want to install ``gdb``. * To build the HTML user/developer documentation, you’ll need - ``mingw-w64-x86_64-librsvg``, ``mingw-w64-x86_64-python-sphinx``, - ``mingw-w64-x86_64-python-sphinx_rtd_theme`` and - ``mingw-w64-x86_64-python-sphinxcontrib-svg2pdfconverter`` for a 64-bit MinGW - environment (or alternatively ``mingw-w64-i686-librsvg``, - ``mingw-w64-i686-python-sphinx``, ``mingw-w64-i686-python-sphinx_rtd_theme`` - and ``mingw-w64-x86_64-python-sphinxcontrib-svg2pdfconverter`` a 32-bit MinGW - environment). + ``mingw-w64-clang-x86_64-librsvg``, ``mingw-w64-clang-x86_64-python-sphinx``, + ``mingw-w64-clang-x86_64-python-sphinx_rtd_theme`` and + ``mingw-w64-clang-x86_64-python-sphinxcontrib-svg2pdfconverter`` for a CLANG64 + environment (or alternatively ``mingw-w64-clang-aarch64-librsvg``, + ``mingw-w64-clang-aarch64-python-sphinx``, + ``mingw-w64-clang-aarch64-python-sphinx_rtd_theme`` and + ``mingw-w64-clang-aarch64-python-sphinxcontrib-svg2pdfconverter`` a CLANGARM64 + environment). You must build the PDF documentation using the CLANG64 (or + CLANGARM64) environment. * To build the PDF documentation, you’ll additionally need - ``mingw-w64-x86_64-texlive-latex-extra`` and - ``mingw-w64-x86_64-texlive-fonts-recommended`` (or - ``mingw-w64-i686-texlive-latex-extra`` and - ``mingw-w64-i686-texlive-fonts-recommended`` for a 32-bit MinGW environment). + ``mingw-w64-clang-x86_64-texlive-latex-extra`` and + ``mingw-w64-clang-x86_64-texlive-fonts-recommended`` (or + ``mingw-w64-clang-aarch64-texlive-latex-extra`` and + ``mingw-w64-clang-aarch64-texlive-fonts-recommended`` for a 64-bit ARM + system). You must build the PDF documentation using the CLANG64 (or + CLANGARM64) environment. * To generate API documentation from source, you’ll need ``doxygen``. * If you plan to rebuild bgfx shaders and you want to rebuild the GLSL parser, you’ll need ``bison``. @@ -182,46 +186,15 @@ building for. use the **MSYS2 CLANGARM64** shortcut to start a Bash shell configured with the correct paths and environment variables. -**32-bit x86 (libstdc++/MSVCRT)** +**32-bit x86** -* You’ll need ``mingw-w64-i686-gcc`` and ``mingw-w64-i686-python``. -* To link using the LLVM linker (generally much faster than the GNU linker), - you’ll need ``mingw-w64-i686-lld``, ``mingw-w64-i686-llvm`` and - ``mingw-w64-i686-libc++``. -* To build against the portable SDL interfaces, you’ll need - ``mingw-w64-i686-SDL2`` and ``mingw-w64-i686-SDL2_ttf``. -* It is no longer possible to include the Qt debugger in 32-bit builds. -* Open the **mingw32.exe** helper from the **msys64** installation folder or the - **MSYS2 MinGW 32-bit** shortcut from the start menu to start a Bash shell - configured with the correct paths and environment variables. - -For example you could use these commands to ensure you have the packages you -need to compile MAME, omitting the ones for configurations you don’t plan to -build for or combining multiple **pacman** commands to install more packages at -once:: - - pacman -Syu - pacman -S curl git make - pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-python - pacman -S mingw-w64-x86_64-llvm mingw-w64-x86_64-libc++ mingw-w64-x86_64-lld - pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_ttf - pacman -S mingw-w64-x86_64-qt5 - pacman -S mingw-w64-i686-gcc mingw-w64-i686-python - pacman -S mingw-w64-i686-llvm mingw-w64-i686-libc++ mingw-w64-i686-lld - pacman -S mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_ttf - pacman -S mingw-w64-i686-qt5 - pacman -S mingw-w64-clang-aarch64-clang mingw-w64-clang-aarch64-python mingw-w64-clang-aarch64-gcc-compat - pacman -S mingw-w64-clang-aarch64-lld mingw-w64-clang-aarch64-llvm mingw-w64-clang-aarch64-libc++ - pacman -S mingw-w64-clang-aarch64-SDL2 mingw-w64-clang-aarch64-SDL2_ttf - pacman -S mingw-w64-clang-aarch64-qt5 - -You could use these commands to install the current version of the -mame-essentials package and add the MAME package repository to your pacman -configuration:: - - curl -O "https://repo.mamedev.org/x86_64/mame-essentials-1.0.6-1-x86_64.pkg.tar.xz" - pacman -U mame-essentials-1.0.6-1-x86_64.pkg.tar.xz - echo -e '\n[mame]\nInclude = /etc/pacman.d/mirrorlist.mame\nSigLevel = Never' >> /etc/pacman.conf +It is no longer possible to compile 32-bit x86 MAME build using an MSYS2 +environment. Up-to-date 32-bit versions of GCC exceed the available address +space when compiling MAME’s address space classes and Lua bindings. MSYS2 no +longer provides 32-bit x86 LLVM and clang packages. To build MAME for 32-bit +x86 systems, you must use an environment that allows cross-compiling for a +32-bit target using 64-bit tools (e.g. using a MinGW environment on a Linux +system). Building with Microsoft Visual Studio ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -298,7 +271,7 @@ Fedora Linux You’ll need a few prerequisites from your Linux distribution. Make sure you get SDL 2 version 2.0.14 or later as earlier versions lack required functionality:: - sudo dnf install gcc gcc-c++ SDL2-devel SDL2_ttf-devel libXi-devel libXinerama-devel qt5-qtbase-devel qt5-qttools expat-devel fontconfig-devel alsa-lib-devel pulseaudio-libs-devel + sudo dnf install git gcc gcc-c++ SDL2-devel SDL2_ttf-devel libXi-devel libXinerama-devel qt6-qtbase-devel expat-devel fontconfig-devel alsa-lib-devel pulseaudio-libs-devel If you want to use the more efficient LLVM tools for archiving static libraries and linking, you’ll need to install the corresponding packages:: @@ -314,7 +287,7 @@ the theme and the SVG converter:: The HTML documentation can be built with this command:: - make -C docs SPHINXBUILD=sphinx-build-3 html + make -C docs html .. _compiling-ubuntu: @@ -325,7 +298,7 @@ Debian and Ubuntu (including Raspberry Pi and ODROID devices) You’ll need a few prerequisites from your Linux distribution. Make sure you get SDL 2 version 2.0.14 or later as earlier versions lack required functionality:: - sudo apt-get install git build-essential python3 libsdl2-dev libsdl2-ttf-dev libfontconfig-dev libpulse-dev qtbase5-dev qtbase5-dev-tools qtchooser qt5-qmake + sudo apt-get install git build-essential python3 libsdl2-dev libsdl2-ttf-dev libfontconfig-dev libpulse-dev qt6-base-dev qt6-base-dev-tools qtchooser Compilation is exactly as described above in All Platforms. Note the Ubuntu Linux modifies GCC to enable the GNU C Library “fortify source” feature by @@ -339,7 +312,7 @@ Arch Linux You’ll need a few prerequisites from your distro:: - sudo pacman -S base-devel git sdl2_ttf python libxinerama libpulse alsa-lib qt5-base + sudo pacman -S base-devel git sdl2_ttf python libxinerama libpulse alsa-lib qt6-base Compilation is exactly as described above in All Platforms. diff --git a/scripts/genie.lua b/scripts/genie.lua index fcc4680a56d..a11e84548dd 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -1012,8 +1012,8 @@ end local version = str_to_version(_OPTIONS["gcc_version"]) if string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android") then - if version < 70000 then - print("Clang version 7.0 or later needed") + if version < 130000 then + print("Clang version 13 or later needed") os.exit(-1) end buildoptions { @@ -1202,18 +1202,12 @@ configuration { "osx*" } } configuration { "mingw*" } - if _OPTIONS["osd"]=="sdl" then - linkoptions { - "-Wl,--start-group", - } - else - linkoptions { - "-static", - } - flags { - "LinkSupportCircularDependencies", - } - end + linkoptions { + "-static", + } + flags { + "LinkSupportCircularDependencies", + } links { "user32", "winmm", diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index aaaf8965ad0..e0a3025f9de 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -410,9 +410,9 @@ function qtdebuggerbuild() if _OPTIONS["QT_HOME"]~=nil then qt_host_libexecs = backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_HOST_LIBEXECS") else - qt_host_libexecs = backtick("qmake -query QT_HOST_LIBEXECS") + qt_host_libexecs = backtick("qmake6 -query QT_HOST_LIBEXECS") end - MOCTST = backtick(qt_host_libexecs .. "/moc --version") + local MOCTST = backtick(qt_host_libexecs .. "/moc --version") if MOCTST=='' then print("Qt's Meta Object Compiler (moc) wasn't found!") os.exit(1) @@ -438,15 +438,14 @@ function qtdebuggerbuild() MOC = _OPTIONS["QT_HOME"] .. "/bin/moc" end else - local MOCTST = backtick("which moc-qt5 2>/dev/null") - if MOCTST=='' then - MOCTST = backtick("which moc 2>/dev/null") - end + local qt_host_libexecs = backtick("qmake6 -query QT_HOST_LIBEXECS") + MOCTST = backtick(qt_host_libexecs .. "/moc --version 2>/dev/null") if MOCTST=='' then print("Qt's Meta Object Compiler (moc) wasn't found!") os.exit(1) + else + MOC = qt_host_libexecs .. "/moc" end - MOC = MOCTST end end @@ -467,7 +466,7 @@ function qtdebuggerbuild() if _OPTIONS["targetos"]=="windows" then configuration { "mingw*" } buildoptions { - "-I$(shell qmake -query QT_INSTALL_HEADERS)", + "-I$(shell qmake6 -query QT_INSTALL_HEADERS)", } configuration { } elseif _OPTIONS["targetos"]=="macosx" then @@ -481,7 +480,7 @@ function qtdebuggerbuild() } else buildoptions { - backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"), + "-I$(shell qmake6 -query QT_INSTALL_HEADERS)", } end end @@ -529,7 +528,7 @@ function osdmodulestargetconf() if _OPTIONS["USE_QTDEBUG"]=="1" then if _OPTIONS["targetos"]=="windows" then linkoptions { - "-L$(shell qmake -query QT_INSTALL_LIBS)", + "-L$(shell qmake6 -query QT_INSTALL_LIBS)", } links { "Qt6Core.dll", @@ -537,47 +536,30 @@ function osdmodulestargetconf() "Qt6Widgets.dll", } elseif _OPTIONS["targetos"]=="macosx" then - local qt_version = str_to_version(backtick("qmake -query QT_VERSION")) linkoptions { "-F" .. backtick("qmake -query QT_INSTALL_LIBS"), } - if qt_version < 60000 then - links { - "Qt5Core.framework", - "Qt5Gui.framework", - "Qt5Widgets.framework", - } - else - links { - "QtCore.framework", - "QtGui.framework", - "QtWidgets.framework", - } - end + links { + "QtCore.framework", + "QtGui.framework", + "QtWidgets.framework", + } else if _OPTIONS["QT_HOME"]~=nil then - local qt_version = str_to_version(backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_VERSION")) linkoptions { "-L" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_LIBS"), } - if qt_version < 60000 then - links { - "Qt5Core", - "Qt5Gui", - "Qt5Widgets", - } - else - links { - "Qt6Core", - "Qt6Gui", - "Qt6Widgets", - } end else - local str = backtick(pkgconfigcmd() .. " --libs Qt5Widgets") - addlibfromstring(str) - addoptionsfromstring(str) + linkoptions { + "-L$(shell qmake6 -query QT_INSTALL_LIBS)", + } end + links { + "Qt6Core", + "Qt6Gui", + "Qt6Widgets", + } end end diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 814bb32eea3..a53b7fe858f 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -59,6 +59,8 @@ function maintargetosdoptions(_target,_subtarget) links { "SDL2main", "SDL2", + "imm32", + "version", } configuration { "vs*" } links { diff --git a/scripts/src/osd/sdl3_cfg.lua b/scripts/src/osd/sdl3_cfg.lua index b0195355d7c..7eace8f65f6 100644 --- a/scripts/src/osd/sdl3_cfg.lua +++ b/scripts/src/osd/sdl3_cfg.lua @@ -133,7 +133,7 @@ elseif _OPTIONS["targetos"]=="linux" then } else buildoptions { - backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"), + "-I$(shell qmake6 -query QT_INSTALL_HEADERS)", } end elseif _OPTIONS["targetos"]=="macosx" then diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua index 400a559862e..9efd4944cf2 100644 --- a/scripts/src/osd/sdl_cfg.lua +++ b/scripts/src/osd/sdl_cfg.lua @@ -142,7 +142,7 @@ elseif _OPTIONS["targetos"]=="linux" then } else buildoptions { - backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"), + "-I$(shell qmake6 -query QT_INSTALL_HEADERS)", } end elseif _OPTIONS["targetos"]=="macosx" then diff --git a/src/osd/modules/debugger/qt/breakpointswindow.cpp b/src/osd/modules/debugger/qt/breakpointswindow.cpp index 7dc3db34179..6cd924a5639 100644 --- a/src/osd/modules/debugger/qt/breakpointswindow.cpp +++ b/src/osd/modules/debugger/qt/breakpointswindow.cpp @@ -5,11 +5,7 @@ #include "util/xmlfile.h" -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include -#else -#include -#endif #include #include #include diff --git a/src/osd/modules/debugger/qt/dasmwindow.cpp b/src/osd/modules/debugger/qt/dasmwindow.cpp index a7d57f0518c..9a9cd087144 100644 --- a/src/osd/modules/debugger/qt/dasmwindow.cpp +++ b/src/osd/modules/debugger/qt/dasmwindow.cpp @@ -11,17 +11,13 @@ #include "util/xmlfile.h" -#include -#include -#include -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include #include -#else -#include -#endif +#include +#include #include #include +#include namespace osd::debugger::qt { diff --git a/src/osd/modules/debugger/qt/debuggerview.cpp b/src/osd/modules/debugger/qt/debuggerview.cpp index 2da7a58c3fd..e57e0902845 100644 --- a/src/osd/modules/debugger/qt/debuggerview.cpp +++ b/src/osd/modules/debugger/qt/debuggerview.cpp @@ -133,11 +133,11 @@ void DebuggerView::paintEvent(QPaintEvent *event) if ((textAttr & DCA_SELECTED) && (textAttr & DCA_CURRENT)) { - #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - bgColor.setRgb(palette.color(QPalette::Accent).rgb()); - #else - bgColor.setRgb(0xff,0xc0,0x80); - #endif +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) + bgColor.setRgb(palette.color(QPalette::Accent).rgb()); +#else + bgColor.setRgb(0xff,0xc0,0x80); +#endif } if (textAttr & DCA_CHANGED) @@ -317,11 +317,7 @@ void DebuggerView::mousePressEvent(QMouseEvent *event) debug_view_xy const topLeft = m_view->visible_position(); debug_view_xy const visibleCharDims = m_view->visible_size(); debug_view_xy clickViewPosition; -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) const QPointF mousePosition = event->position(); -#else - const QPointF mousePosition = event->localPos(); -#endif clickViewPosition.x = (std::min)(int(topLeft.x + (mousePosition.x() / fontWidth)), topLeft.x + visibleCharDims.x - 1); clickViewPosition.y = (std::min)(int(topLeft.y + (mousePosition.y() / fontHeight)), topLeft.y + visibleCharDims.y - 1); diff --git a/src/osd/modules/debugger/qt/mainwindow.cpp b/src/osd/modules/debugger/qt/mainwindow.cpp index 1f765afc2a6..6ed30d52114 100644 --- a/src/osd/modules/debugger/qt/mainwindow.cpp +++ b/src/osd/modules/debugger/qt/mainwindow.cpp @@ -11,13 +11,9 @@ #include "util/xmlfile.h" -#include -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include #include -#else -#include -#endif +#include #include #include #include diff --git a/src/osd/modules/debugger/qt/memorywindow.cpp b/src/osd/modules/debugger/qt/memorywindow.cpp index 34147169f39..44f09e0b836 100644 --- a/src/osd/modules/debugger/qt/memorywindow.cpp +++ b/src/osd/modules/debugger/qt/memorywindow.cpp @@ -10,14 +10,10 @@ #include "util/xmlfile.h" +#include #include #include #include -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) -#include -#else -#include -#endif #include #include #include diff --git a/src/tools/imgtool/modules/vzdos.cpp b/src/tools/imgtool/modules/vzdos.cpp index b7dee751434..b9cdc7160d8 100644 --- a/src/tools/imgtool/modules/vzdos.cpp +++ b/src/tools/imgtool/modules/vzdos.cpp @@ -132,7 +132,7 @@ static imgtoolerr_t vzdos_read_sector_data(imgtool::image &img, int track, int s if (ret) return (imgtoolerr_t)ret; /* verify sector checksums */ - if (get_u16le(&buffer[DATA_SIZE + 2]) != util::sum16_creator::simple(buffer, DATA_SIZE + 2)) + if (get_u16le(&buffer[DATA_SIZE + 2]) != uint16_t(util::sum16_creator::simple(buffer, DATA_SIZE + 2))) return IMGTOOLERR_CORRUPTFILE; memcpy(data, &buffer, DATA_SIZE + 2); -- cgit v1.2.3 From ddaf4bc23874813057c33c7bdea8f7b2dee46e55 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 5 Apr 2026 06:21:29 +1000 Subject: Remove leftover end from Lua script. --- scripts/src/osd/modules.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts/src/osd/modules.lua') diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index e0a3025f9de..21d80152a63 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -549,7 +549,6 @@ function osdmodulestargetconf() linkoptions { "-L" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_LIBS"), } - end else linkoptions { "-L$(shell qmake6 -query QT_INSTALL_LIBS)", -- cgit v1.2.3 From 9673d67a073116a40742d8872f8db4e1c6226cb4 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Tue, 7 Apr 2026 16:32:35 +0700 Subject: osd: target Windows 10 API * remove MODERN_WIN_API flag --- makefile | 5 ----- scripts/src/osd/modules.lua | 9 --------- scripts/src/osd/windows_cfg.lua | 17 ++--------------- 3 files changed, 2 insertions(+), 29 deletions(-) (limited to 'scripts/src/osd/modules.lua') diff --git a/makefile b/makefile index 9d9b742ae68..5a7c2cdb6ff 100644 --- a/makefile +++ b/makefile @@ -27,7 +27,6 @@ # NO_OPENGL = 0 # USE_DISPATCH_GL = 0 -# MODERN_WIN_API = 0 # USE_SDL = 1 # SDL_INI_PATH = .;$HOME/.mame/;ini; # SDL2_MULTIAPI = 1 @@ -747,10 +746,6 @@ ifdef USE_QTDEBUG PARAMS += --USE_QTDEBUG='$(USE_QTDEBUG)' endif -ifdef MODERN_WIN_API -PARAMS += --MODERN_WIN_API='$(MODERN_WIN_API)' -endif - ifdef USE_SDL PARAMS += --USE_SDL='$(USE_SDL)' endif diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index 21d80152a63..b7fe831439b 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -709,15 +709,6 @@ if not _OPTIONS["NO_USE_PIPEWIRE"] then end end -newoption { - trigger = "MODERN_WIN_API", - description = "Use Modern Windows APIs", - allowed = { - { "0", "Use classic Windows APIs - allows support for XP and later" }, - { "1", "Use Modern Windows APIs - support for Windows 8.1 and later" }, - }, -} - newoption { trigger = "USE_QTDEBUG", description = "Use QT debugger", diff --git a/scripts/src/osd/windows_cfg.lua b/scripts/src/osd/windows_cfg.lua index 2eb8bae410a..0e4d2014f32 100644 --- a/scripts/src/osd/windows_cfg.lua +++ b/scripts/src/osd/windows_cfg.lua @@ -16,23 +16,10 @@ configuration { "vs*" } configuration { } -if not _OPTIONS["MODERN_WIN_API"] then - _OPTIONS["MODERN_WIN_API"] = "0" -end - -if _OPTIONS["MODERN_WIN_API"]=="1" then - defines { - "WINVER=0x0602", - "_WIN32_WINNT=0x0602", - "NTDDI_VERSION=0x06030000", - "MODERN_WIN_API", - } -else defines { - "_WIN32_WINNT=0x0602", - "NTDDI_VERSION=0x06000000", + "WINVER=0x0A00", + "_WIN32_WINNT=0x0A00", } -end if _OPTIONS["USE_TAPTUN"]=="1" or _OPTIONS["USE_PCAP"]=="1" then defines { -- cgit v1.2.3