diff options
Diffstat (limited to 'docs/release/scripts/src/osd/modules.lua')
-rw-r--r-- | docs/release/scripts/src/osd/modules.lua | 74 |
1 files changed, 58 insertions, 16 deletions
diff --git a/docs/release/scripts/src/osd/modules.lua b/docs/release/scripts/src/osd/modules.lua index 3fc89424e6d..87e684a50f6 100644 --- a/docs/release/scripts/src/osd/modules.lua +++ b/docs/release/scripts/src/osd/modules.lua @@ -15,8 +15,8 @@ end function addlibfromstring(str) if (str==nil) then return end - for w in str:gmatch("%S+") do - if string.starts(w,"-l")==true then + for w in str:gmatch("%S+") do + if string.starts(w,"-l")==true then links { string.sub(w,3) } @@ -26,8 +26,8 @@ end function addoptionsfromstring(str) if (str==nil) then return end - for w in str:gmatch("%S+") do - if string.starts(w,"-l")==false then + for w in str:gmatch("%S+") do + if string.starts(w,"-l")==false then linkoptions { w } @@ -67,6 +67,7 @@ function osdmodulesbuild() MAME_DIR .. "src/osd/modules/sound/direct_sound.cpp", MAME_DIR .. "src/osd/modules/sound/coreaudio_sound.cpp", MAME_DIR .. "src/osd/modules/sound/sdl_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/xaudio2_sound.cpp", MAME_DIR .. "src/osd/modules/sound/none.cpp", } @@ -122,7 +123,7 @@ function osdmodulesbuild() if _OPTIONS["USE_QTDEBUG"]=="1" then defines { "USE_QTDEBUG=1", - } + } else defines { "USE_QTDEBUG=0", @@ -137,6 +138,15 @@ function qtdebuggerbuild() removeflags { "SingleOutputDir", } + local version = str_to_version(_OPTIONS["gcc_version"]) + if _OPTIONS["gcc"]~=nil and (string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs")) then + configuration { "gmake" } + if (version >= 30600) then + buildoptions { + "-Wno-inconsistent-missing-override", + } + end + end files { MAME_DIR .. "src/osd/modules/debugger/debugqt.cpp", @@ -175,7 +185,7 @@ function qtdebuggerbuild() defines { "USE_QTDEBUG=1", } - + local MOC = "" if (os.is("windows")) then MOC = "moc" @@ -185,9 +195,9 @@ function qtdebuggerbuild() if (QMAKETST=='') then print("Qt's Meta Object Compiler (moc) wasn't found!") os.exit(1) - end + end MOC = _OPTIONS["QT_HOME"] .. "/bin/moc" - else + else MOCTST = backtick("which moc-qt5 2>/dev/null") if (MOCTST=='') then MOCTST = backtick("which moc 2>/dev/null") @@ -195,12 +205,12 @@ function qtdebuggerbuild() if (MOCTST=='') then print("Qt's Meta Object Compiler (moc) wasn't found!") os.exit(1) - end + end MOC = MOCTST end end - - + + custombuildtask { { MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.h", GEN_DIR .. "osd/modules/debugger/qt/debuggerview.moc.cpp", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, { MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.h", GEN_DIR .. "osd/modules/debugger/qt/windowqt.moc.cpp", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, @@ -211,9 +221,9 @@ function qtdebuggerbuild() { MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.h", GEN_DIR .. "osd/modules/debugger/qt/breakpointswindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, { MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.h", GEN_DIR .. "osd/modules/debugger/qt/deviceswindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, { MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.h", GEN_DIR .. "osd/modules/debugger/qt/deviceinformationwindow.moc.cpp", { },{ MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, - + } - + if _OPTIONS["targetos"]=="windows" then configuration { "mingw*" } buildoptions { @@ -283,9 +293,9 @@ function osdmodulestargetconf() } links { "qtmain", - "Qt5Core", - "Qt5Gui", - "Qt5Widgets", + "Qt5Core.dll", + "Qt5Gui.dll", + "Qt5Widgets.dll", } elseif _OPTIONS["targetos"]=="macosx" then linkoptions { @@ -389,6 +399,38 @@ if not _OPTIONS["NO_USE_MIDI"] then 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_XAUDIO2", + description = "Use XAudio2 API for audio", + allowed = { + { "0", "Disable XAudio2" }, + { "1", "Enable XAudio2" }, + }, +} + +if _OPTIONS["USE_XAUDIO2"]=="1" then + _OPTIONS["MODERN_WIN_API"] = "1", + defines { + "USE_XAUDIO2=1", + }, + includedirs { + MAME_DIR .. "3rdparty/win81sdk/Include/um", + } +else + defines { + "USE_XAUDIO2=0", + } +end + +newoption { trigger = "USE_QTDEBUG", description = "Use QT debugger", allowed = { |