diff options
Diffstat (limited to 'scripts/src/osd/modules.lua')
-rw-r--r-- | scripts/src/osd/modules.lua | 85 |
1 files changed, 72 insertions, 13 deletions
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index f779912deb2..b532124302f 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -16,7 +16,7 @@ end function addlibfromstring(str) if (str==nil) then return end for w in str:gmatch("%S+") do - if string.starts(w,"-l")==true then + if string.starts(w,"-l") then links { string.sub(w,3) } @@ -27,7 +27,7 @@ end function addoptionsfromstring(str) if (str==nil) then return end for w in str:gmatch("%S+") do - if string.starts(w,"-l")==false then + if not string.starts(w,"-l") then linkoptions { w } @@ -50,16 +50,19 @@ function osdmodulesbuild() } files { - MAME_DIR .. "src/osd/osdnet.cpp", - MAME_DIR .. "src/osd/osdnet.h", MAME_DIR .. "src/osd/watchdog.cpp", MAME_DIR .. "src/osd/watchdog.h", + MAME_DIR .. "src/osd/interface/audio.h", MAME_DIR .. "src/osd/interface/inputcode.h", MAME_DIR .. "src/osd/interface/inputdev.h", MAME_DIR .. "src/osd/interface/inputfwd.h", MAME_DIR .. "src/osd/interface/inputman.h", MAME_DIR .. "src/osd/interface/inputseq.cpp", MAME_DIR .. "src/osd/interface/inputseq.h", + MAME_DIR .. "src/osd/interface/midiport.h", + MAME_DIR .. "src/osd/interface/nethandler.cpp", + MAME_DIR .. "src/osd/interface/nethandler.h", + MAME_DIR .. "src/osd/interface/uievents.h", MAME_DIR .. "src/osd/modules/debugger/debug_module.h", MAME_DIR .. "src/osd/modules/debugger/debuggdbstub.cpp", MAME_DIR .. "src/osd/modules/debugger/debugimgui.cpp", @@ -107,6 +110,8 @@ function osdmodulesbuild() MAME_DIR .. "src/osd/modules/monitor/monitor_module.h", MAME_DIR .. "src/osd/modules/monitor/monitor_sdl.cpp", MAME_DIR .. "src/osd/modules/monitor/monitor_win32.cpp", + MAME_DIR .. "src/osd/modules/netdev/netdev_common.cpp", + MAME_DIR .. "src/osd/modules/netdev/netdev_common.h", MAME_DIR .. "src/osd/modules/netdev/netdev_module.h", MAME_DIR .. "src/osd/modules/netdev/none.cpp", MAME_DIR .. "src/osd/modules/netdev/pcap.cpp", @@ -130,7 +135,9 @@ function osdmodulesbuild() MAME_DIR .. "src/osd/modules/sound/none.cpp", MAME_DIR .. "src/osd/modules/sound/pa_sound.cpp", MAME_DIR .. "src/osd/modules/sound/pulse_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/pipewire_sound.cpp", MAME_DIR .. "src/osd/modules/sound/sdl_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/sound_module.cpp", MAME_DIR .. "src/osd/modules/sound/sound_module.h", MAME_DIR .. "src/osd/modules/sound/xaudio2_sound.cpp", } @@ -298,6 +305,22 @@ function osdmodulesbuild() } end + err = os.execute(pkgconfigcmd() .. " --exists libpipewire-0.3") + if not err then + _OPTIONS["NO_USE_PIPEWIRE"] = "1" + end + + if _OPTIONS["NO_USE_PIPEWIRE"]=="1" then + defines { + "NO_USE_PIPEWIRE", + } + else + buildoptions { + backtick(pkgconfigcmd() .. " --cflags libpipewire-0.3"), + } + end + + if _OPTIONS["NO_USE_MIDI"]=="1" then defines { "NO_USE_MIDI", @@ -380,12 +403,16 @@ function qtdebuggerbuild() if _OPTIONS["QT_HOME"]~=nil then MOCTST = backtick(_OPTIONS["QT_HOME"] .. "/bin/moc --version 2>/dev/null") if (MOCTST=='') then - MOCTST = backtick(_OPTIONS["QT_HOME"] .. "/libexec/moc --version 2>/dev/null") - if (MOCTST=='') then + local qt_host_libexecs = backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_HOST_LIBEXECS") + if not string.starts(qt_host_libexecs,"/") then + qt_host_libexecs = _OPTIONS["QT_HOME"] .. "/libexec" + end + 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 = _OPTIONS["QT_HOME"] .. "/libexec/moc" + MOC = qt_host_libexecs .. "/moc" end else MOC = _OPTIONS["QT_HOME"] .. "/bin/moc" @@ -395,7 +422,7 @@ function qtdebuggerbuild() if (MOCTST=='') then MOCTST = backtick("which moc 2>/dev/null") end - if (MOCTST=='') then + if MOCTST=='' then print("Qt's Meta Object Compiler (moc) wasn't found!") os.exit(1) end @@ -490,14 +517,23 @@ function osdmodulestargetconf() "Qt5Widgets.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"), } - links { - "Qt5Core.framework", - "Qt5Gui.framework", - "Qt5Widgets.framework", - } + if qt_version < 60000 then + links { + "Qt5Core.framework", + "Qt5Gui.framework", + "Qt5Widgets.framework", + } + else + links { + "QtCore.framework", + "QtGui.framework", + "QtWidgets.framework", + } + end else if _OPTIONS["QT_HOME"]~=nil then local qt_version = str_to_version(backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_VERSION")) @@ -547,6 +583,12 @@ function osdmodulestargetconf() ext_lib("pulse"), } end + + if _OPTIONS["NO_USE_PIPEWIRE"]=="0" then + local str = backtick(pkgconfigcmd() .. " --libs libpipewire-0.3") + addlibfromstring(str) + addoptionsfromstring(str) + end end @@ -650,6 +692,23 @@ if not _OPTIONS["NO_USE_PULSEAUDIO"] then end newoption { + trigger = "NO_USE_PIPEWIRE", + description = "Disable Pipewire interface", + allowed = { + { "0", "Enable Pipewire" }, + { "1", "Disable Pipewire" }, + }, +} + +if not _OPTIONS["NO_USE_PIPEWIRE"] then + if _OPTIONS["targetos"]=="linux" then + _OPTIONS["NO_USE_PIPEWIRE"] = "0" + else + _OPTIONS["NO_USE_PIPEWIRE"] = "1" + end +end + +newoption { trigger = "MODERN_WIN_API", description = "Use Modern Windows APIs", allowed = { |