diff options
Diffstat (limited to 'scripts/src')
-rw-r--r-- | scripts/src/3rdparty.lua | 189 | ||||
-rw-r--r-- | scripts/src/benchmarks.lua | 74 | ||||
-rw-r--r-- | scripts/src/cpu.lua | 9 | ||||
-rw-r--r-- | scripts/src/emu.lua | 62 | ||||
-rw-r--r-- | scripts/src/main.lua | 8 | ||||
-rw-r--r-- | scripts/src/osd/modules.lua | 33 | ||||
-rw-r--r-- | scripts/src/osd/osdmini.lua | 2 | ||||
-rw-r--r-- | scripts/src/osd/osdmini_cfg.lua | 2 | ||||
-rw-r--r-- | scripts/src/osd/windows_cfg.lua | 18 | ||||
-rw-r--r-- | scripts/src/sound.lua | 1 | ||||
-rw-r--r-- | scripts/src/tests.lua | 98 | ||||
-rw-r--r-- | scripts/src/video.lua | 24 |
12 files changed, 456 insertions, 64 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 2bee6477f01..16b86dcbe21 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -919,37 +919,194 @@ links { end -------------------------------------------------- --- GoogleTest library objects +-- libuv library objects -------------------------------------------------- - -project "gtest" - uuid "fa306a8d-fb10-4d4a-9d2e-fdb9076407b4" +project "uv" + uuid "cd2afe7f-139d-49c3-9000-fc9119f3cea0" kind "StaticLib" + includedirs { + MAME_DIR .. "3rdparty/libuv/include", + MAME_DIR .. "3rdparty/libuv/src", + MAME_DIR .. "3rdparty/libuv/src/win", + } + configuration { "gmake" } - buildoptions { + buildoptions_c { + "-Wno-strict-prototypes", + "-Wno-bad-function-cast", + "-Wno-write-strings", + "-Wno-missing-braces", "-Wno-undef", "-Wno-unused-variable", } - configuration { "mingw-clang" } - buildoptions { - "-O0", -- crash of compiler when doing optimization - } + + local version = str_to_version(_OPTIONS["gcc_version"]) + if (_OPTIONS["gcc"]~=nil) then + if string.find(_OPTIONS["gcc"], "clang") then + buildoptions_c { + "-Wno-unknown-warning-option", + "-Wno-unknown-attributes", + "-Wno-null-dereference", + "-Wno-unused-but-set-variable", + "-Wno-maybe-uninitialized", + } + else + buildoptions_c { + "-Wno-unused-but-set-variable", + "-Wno-maybe-uninitialized", + } + end + end configuration { "vs*" } -if _OPTIONS["vs"]=="intel-15" then buildoptions { - "/Qwd1195", -- error #1195: conversion from integer to smaller pointer + "/wd4054", -- warning C4054: 'type cast' : from function pointer 'xxx' to data pointer 'void *' + "/wd4204", -- warning C4204: nonstandard extension used : non-constant aggregate initializer + "/wd4210", -- warning C4210: nonstandard extension used : function given file scope + "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used + "/wd4703", -- warning C4703: potentially uninitialized local pointer variable 'xxx' used + "/wd4477", -- warning C4477: '<function>' : format string '<format-string>' requires an argument of type '<type>', but variadic argument <position> has type '<type>' } -end configuration { } - includedirs { - MAME_DIR .. "3rdparty/googletest/googletest/include", - MAME_DIR .. "3rdparty/googletest/googletest", + files { + MAME_DIR .. "3rdparty/libuv/src/fs-poll.c", + MAME_DIR .. "3rdparty/libuv/src/inet.c", + MAME_DIR .. "3rdparty/libuv/src/threadpool.c", + MAME_DIR .. "3rdparty/libuv/src/uv-common.c", + MAME_DIR .. "3rdparty/libuv/src/version.c", } + + if _OPTIONS["targetos"]=="windows" then + defines { + "WIN32_LEAN_AND_MEAN", + "_WIN32_WINNT=0x0502", + } + if _ACTION == "vs2013" then + files { + MAME_DIR .. "3rdparty/libuv/src/win/snprintf.c", + } + end + configuration { } + files { + MAME_DIR .. "3rdparty/libuv/src/win/async.c", + MAME_DIR .. "3rdparty/libuv/src/win/core.c", + MAME_DIR .. "3rdparty/libuv/src/win/dl.c", + MAME_DIR .. "3rdparty/libuv/src/win/error.c", + MAME_DIR .. "3rdparty/libuv/src/win/fs-event.c", + MAME_DIR .. "3rdparty/libuv/src/win/fs.c", + MAME_DIR .. "3rdparty/libuv/src/win/getaddrinfo.c", + MAME_DIR .. "3rdparty/libuv/src/win/getnameinfo.c", + MAME_DIR .. "3rdparty/libuv/src/win/handle.c", + MAME_DIR .. "3rdparty/libuv/src/win/loop-watcher.c", + MAME_DIR .. "3rdparty/libuv/src/win/pipe.c", + MAME_DIR .. "3rdparty/libuv/src/win/poll.c", + MAME_DIR .. "3rdparty/libuv/src/win/process-stdio.c", + MAME_DIR .. "3rdparty/libuv/src/win/process.c", + MAME_DIR .. "3rdparty/libuv/src/win/req.c", + MAME_DIR .. "3rdparty/libuv/src/win/signal.c", + MAME_DIR .. "3rdparty/libuv/src/win/stream.c", + MAME_DIR .. "3rdparty/libuv/src/win/tcp.c", + MAME_DIR .. "3rdparty/libuv/src/win/thread.c", + MAME_DIR .. "3rdparty/libuv/src/win/timer.c", + MAME_DIR .. "3rdparty/libuv/src/win/tty.c", + MAME_DIR .. "3rdparty/libuv/src/win/udp.c", + MAME_DIR .. "3rdparty/libuv/src/win/util.c", + MAME_DIR .. "3rdparty/libuv/src/win/winapi.c", + MAME_DIR .. "3rdparty/libuv/src/win/winsock.c", + } + end + + if _OPTIONS["targetos"]~="windows" then + files { + MAME_DIR .. "3rdparty/libuv/src/unix/async.c", + MAME_DIR .. "3rdparty/libuv/src/unix/atomic-ops.h", + MAME_DIR .. "3rdparty/libuv/src/unix/core.c", + MAME_DIR .. "3rdparty/libuv/src/unix/dl.c", + MAME_DIR .. "3rdparty/libuv/src/unix/fs.c", + MAME_DIR .. "3rdparty/libuv/src/unix/getaddrinfo.c", + MAME_DIR .. "3rdparty/libuv/src/unix/getnameinfo.c", + MAME_DIR .. "3rdparty/libuv/src/unix/internal.h", + MAME_DIR .. "3rdparty/libuv/src/unix/loop-watcher.c", + MAME_DIR .. "3rdparty/libuv/src/unix/loop.c", + MAME_DIR .. "3rdparty/libuv/src/unix/pipe.c", + MAME_DIR .. "3rdparty/libuv/src/unix/poll.c", + MAME_DIR .. "3rdparty/libuv/src/unix/process.c", + MAME_DIR .. "3rdparty/libuv/src/unix/signal.c", + MAME_DIR .. "3rdparty/libuv/src/unix/spinlock.h", + MAME_DIR .. "3rdparty/libuv/src/unix/stream.c", + MAME_DIR .. "3rdparty/libuv/src/unix/tcp.c", + MAME_DIR .. "3rdparty/libuv/src/unix/thread.c", + MAME_DIR .. "3rdparty/libuv/src/unix/timer.c", + MAME_DIR .. "3rdparty/libuv/src/unix/tty.c", + MAME_DIR .. "3rdparty/libuv/src/unix/udp.c", + } + end + if _OPTIONS["targetos"]=="linux" then + defines { + "_GNU_SOURCE", + } + files { + MAME_DIR .. "3rdparty/libuv/src/unix/linux-core.c", + MAME_DIR .. "3rdparty/libuv/src/unix/linux-inotify.c", + MAME_DIR .. "3rdparty/libuv/src/unix/linux-syscalls.c", + MAME_DIR .. "3rdparty/libuv/src/unix/linux-syscalls.h", + MAME_DIR .. "3rdparty/libuv/src/unix/proctitle.c", + } + end + if _OPTIONS["targetos"]=="macosx" then + defines { + "_DARWIN_USE_64_BIT_INODE=1", + "_DARWIN_UNLIMITED_SELECT=1", + } + files { + MAME_DIR .. "3rdparty/libuv/src/unix/darwin.c", + MAME_DIR .. "3rdparty/libuv/src/unix/darwin-proctitle.c", + MAME_DIR .. "3rdparty/libuv/src/unix/fsevents.c", + MAME_DIR .. "3rdparty/libuv/src/unix/kqueue.c", + MAME_DIR .. "3rdparty/libuv/src/unix/proctitle.c", + } + end + if _OPTIONS["targetos"]=="solaris" then + defines { + "__EXTENSIONS__", + "_XOPEN_SOURCE=500", + } + files { + MAME_DIR .. "3rdparty/libuv/src/unix/sunos.c", + } + end + if _OPTIONS["targetos"]=="freebsd" then + files { + MAME_DIR .. "3rdparty/libuv/src/unix/freebsd.c", + MAME_DIR .. "3rdparty/libuv/src/unix/kqueue.c", + } + end + + if (_OPTIONS["SHADOW_CHECK"]=="1") then + removebuildoptions { + "-Wshadow" + } + end + +-------------------------------------------------- +-- HTTP parser library objects +-------------------------------------------------- + +project "http-parser" + uuid "90c6ba59-bdb2-4fee-8b44-57601d690e14" + kind "StaticLib" + + configuration { } + files { - MAME_DIR .. "3rdparty/googletest/googletest/src/gtest-all.cc", + MAME_DIR .. "3rdparty/http-parser/http_parser.c", } + if (_OPTIONS["SHADOW_CHECK"]=="1") then + removebuildoptions { + "-Wshadow" + } + end diff --git a/scripts/src/benchmarks.lua b/scripts/src/benchmarks.lua new file mode 100644 index 00000000000..f774e3f45ca --- /dev/null +++ b/scripts/src/benchmarks.lua @@ -0,0 +1,74 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +--------------------------------------------------------------------------- +-- +-- benchmarks.lua +-- +-- Rules for building benchmarks +-- +--------------------------------------------------------------------------- + +-------------------------------------------------- +-- Google Benchmark library objects +-------------------------------------------------- + +project "benchmark" + uuid "60a7e05c-8b4f-497c-bfda-2949a009ba0d" + kind "StaticLib" + + configuration { } + defines { + "HAVE_STD_REGEX", + } + + includedirs { + MAME_DIR .. "3rdparty/benchmark/include", + } + files { + MAME_DIR .. "3rdparty/benchmark/src/benchmark.cc", + MAME_DIR .. "3rdparty/benchmark/src/colorprint.cc", + MAME_DIR .. "3rdparty/benchmark/src/commandlineflags.cc", + MAME_DIR .. "3rdparty/benchmark/src/console_reporter.cc", + MAME_DIR .. "3rdparty/benchmark/src/csv_reporter.cc", + MAME_DIR .. "3rdparty/benchmark/src/json_reporter.cc", + MAME_DIR .. "3rdparty/benchmark/src/log.cc", + MAME_DIR .. "3rdparty/benchmark/src/reporter.cc", + MAME_DIR .. "3rdparty/benchmark/src/sleep.cc", + MAME_DIR .. "3rdparty/benchmark/src/string_util.cc", + MAME_DIR .. "3rdparty/benchmark/src/sysinfo.cc", + MAME_DIR .. "3rdparty/benchmark/src/walltime.cc", + MAME_DIR .. "3rdparty/benchmark/src/re_std.cc", + } + + + +project("benchmarks") + uuid ("a9750a48-d283-4a6d-b126-31c7ce049af1") + kind "ConsoleApp" + + flags { + "Symbols", -- always include minimum symbols for executables + } + + if _OPTIONS["SEPARATE_BIN"]~="1" then + targetdir(MAME_DIR) + end + + configuration { } + + links { + "benchmark", + } + + includedirs { + MAME_DIR .. "3rdparty/benchmark/include", + MAME_DIR .. "src/osd", + } + + files { + MAME_DIR .. "benchmarks/main.cpp", + MAME_DIR .. "benchmarks/eminline_native.cpp", + MAME_DIR .. "benchmarks/eminline_noasm.cpp", + } + diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua index 0c2882df5e5..ed6378f93f8 100644 --- a/scripts/src/cpu.lua +++ b/scripts/src/cpu.lua @@ -10,14 +10,6 @@ --------------------------------------------------------------------------- -------------------------------------------------- --- Shared code --------------------------------------------------- - -files { - MAME_DIR .. "src/devices/cpu/vtlb.cpp", -} - --------------------------------------------------- -- Dynamic recompiler objects -------------------------------------------------- @@ -43,7 +35,6 @@ if (CPUS["SH2"]~=null or CPUS["MIPS"]~=null or CPUS["POWERPC"]~=null or CPUS["RS MAME_DIR .. "src/devices/cpu/drcbex64.cpp", MAME_DIR .. "src/devices/cpu/drcbex64.h", MAME_DIR .. "src/devices/cpu/drcumlsh.h", - MAME_DIR .. "src/devices/cpu/vtlb.h", MAME_DIR .. "src/devices/cpu/x86emit.h", } end diff --git a/scripts/src/emu.lua b/scripts/src/emu.lua index 01e61852d60..e0358285114 100644 --- a/scripts/src/emu.lua +++ b/scripts/src/emu.lua @@ -38,6 +38,18 @@ if _OPTIONS["with-bundled-lua"] then } end +if (_OPTIONS["targetos"] == "windows") then + defines { + "UI_WINDOWS", + } +end + +if (_OPTIONS["osd"] == "sdl") then + defines { + "UI_SDL", + } +end + files { MAME_DIR .. "src/emu/emu.h", MAME_DIR .. "src/emu/gamedrv.h", @@ -105,6 +117,8 @@ files { MAME_DIR .. "src/emu/distate.h", MAME_DIR .. "src/emu/divideo.cpp", MAME_DIR .. "src/emu/divideo.h", + MAME_DIR .. "src/emu/divtlb.cpp", + MAME_DIR .. "src/emu/divtlb.h", MAME_DIR .. "src/emu/drawgfx.cpp", MAME_DIR .. "src/emu/drawgfx.h", MAME_DIR .. "src/emu/drawgfxm.h", @@ -208,8 +222,6 @@ files { MAME_DIR .. "src/emu/ui/info_pty.h", MAME_DIR .. "src/emu/ui/inputmap.cpp", MAME_DIR .. "src/emu/ui/inputmap.h", - MAME_DIR .. "src/emu/ui/selgame.cpp", - MAME_DIR .. "src/emu/ui/selgame.h", MAME_DIR .. "src/emu/ui/sliders.cpp", MAME_DIR .. "src/emu/ui/sliders.h", MAME_DIR .. "src/emu/ui/slotopt.cpp", @@ -222,6 +234,48 @@ files { MAME_DIR .. "src/emu/ui/videoopt.h", MAME_DIR .. "src/emu/ui/viewgfx.cpp", MAME_DIR .. "src/emu/ui/viewgfx.h", + MAME_DIR .. "src/emu/ui/auditmenu.cpp", + MAME_DIR .. "src/emu/ui/auditmenu.h", + MAME_DIR .. "src/emu/ui/cmddata.h", + MAME_DIR .. "src/emu/ui/cmdrender.h", + MAME_DIR .. "src/emu/ui/ctrlmenu.cpp", + MAME_DIR .. "src/emu/ui/ctrlmenu.h", + MAME_DIR .. "src/emu/ui/custmenu.cpp", + MAME_DIR .. "src/emu/ui/custmenu.h", + MAME_DIR .. "src/emu/ui/custui.cpp", + MAME_DIR .. "src/emu/ui/custui.h", + MAME_DIR .. "src/emu/ui/datfile.cpp", + MAME_DIR .. "src/emu/ui/datfile.h", + MAME_DIR .. "src/emu/ui/datmenu.cpp", + MAME_DIR .. "src/emu/ui/datmenu.h", + MAME_DIR .. "src/emu/ui/defimg.h", + MAME_DIR .. "src/emu/ui/dirmenu.cpp", + MAME_DIR .. "src/emu/ui/dirmenu.h", + MAME_DIR .. "src/emu/ui/dsplmenu.cpp", + MAME_DIR .. "src/emu/ui/dsplmenu.h", + MAME_DIR .. "src/emu/ui/icorender.h", + MAME_DIR .. "src/emu/ui/inifile.cpp", + MAME_DIR .. "src/emu/ui/inifile.h", + MAME_DIR .. "src/emu/ui/miscmenu.cpp", + MAME_DIR .. "src/emu/ui/miscmenu.h", + MAME_DIR .. "src/emu/ui/moptions.cpp", + MAME_DIR .. "src/emu/ui/moptions.h", + MAME_DIR .. "src/emu/ui/optsmenu.cpp", + MAME_DIR .. "src/emu/ui/optsmenu.h", + MAME_DIR .. "src/emu/ui/selector.cpp", + MAME_DIR .. "src/emu/ui/selector.h", + MAME_DIR .. "src/emu/ui/selgame.cpp", + MAME_DIR .. "src/emu/ui/selgame.h", + MAME_DIR .. "src/emu/ui/simpleselgame.cpp", + MAME_DIR .. "src/emu/ui/simpleselgame.h", + MAME_DIR .. "src/emu/ui/selsoft.cpp", + MAME_DIR .. "src/emu/ui/selsoft.h", + MAME_DIR .. "src/emu/ui/sndmenu.cpp", + MAME_DIR .. "src/emu/ui/sndmenu.h", + MAME_DIR .. "src/emu/ui/starimg.h", + MAME_DIR .. "src/emu/ui/toolbar.h", + MAME_DIR .. "src/emu/ui/utils.cpp", + MAME_DIR .. "src/emu/ui/utils.h", MAME_DIR .. "src/emu/validity.cpp", MAME_DIR .. "src/emu/validity.h", MAME_DIR .. "src/emu/video.cpp", @@ -333,6 +387,7 @@ dependency { -- additional dependencies -------------------------------------------------- { MAME_DIR .. "src/emu/rendfont.cpp", GEN_DIR .. "emu/uismall.fh" }, + { MAME_DIR .. "src/emu/rendfont.cpp", GEN_DIR .. "emu/ui/uicmd14.fh" }, ------------------------------------------------- -- core layouts -------------------------------------------------- @@ -352,7 +407,8 @@ dependency { } custombuildtask { - { MAME_DIR .. "src/emu/uismall.png" , GEN_DIR .. "emu/uismall.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uismall.png...", PYTHON .. " $(1) $(<) temp.bdc", PYTHON .. " $(2) temp.bdc $(@) font_uismall UINT8" }}, + { MAME_DIR .. "src/emu/uismall.png" , GEN_DIR .. "emu/uismall.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uismall.png...", PYTHON .. " $(1) $(<) temp.bdc", PYTHON .. " $(2) temp.bdc $(@) font_uismall UINT8" }}, + { MAME_DIR .. "src/emu/ui/uicmd14.png" , GEN_DIR .. "emu/ui/uicmd14.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uicmd14.png...", PYTHON .. " $(1) $(<) temp_cmd.bdc", PYTHON .. " $(2) temp_cmd.bdc $(@) font_uicmd14 UINT8" }}, layoutbuildtask("emu/layout", "dualhovu"), layoutbuildtask("emu/layout", "dualhsxs"), diff --git a/scripts/src/main.lua b/scripts/src/main.lua index df5e77641a3..2397a489e00 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -44,7 +44,7 @@ end flags { "Unicode", } -if (_OPTIONS["SOURCES"] == nil) then + configuration { "x64", "Release" } targetsuffix "64" if _OPTIONS["PROFILE"] then @@ -80,7 +80,7 @@ if (_OPTIONS["SOURCES"] == nil) then if _OPTIONS["PROFILE"] then targetsuffix "dp" end -end + configuration { "mingw*" or "vs*" } targetextension ".exe" @@ -88,7 +88,7 @@ end targetextension ".bc" if os.getenv("EMSCRIPTEN") then postbuildcommands { - os.getenv("EMSCRIPTEN") .. "/emcc -O3 -s DISABLE_EXCEPTION_CATCHING=2 -s USE_SDL=2 --memory-init-file 0 -s ALLOW_MEMORY_GROWTH=0 -s TOTAL_MEMORY=268435456 -s EXCEPTION_CATCHING_WHITELIST='[\"__ZN15running_machine17start_all_devicesEv\"]' -s EXPORTED_FUNCTIONS=\"['_main', '_malloc', '__Z14js_get_machinev', '__Z9js_get_uiv', '__Z12js_get_soundv', '__ZN10ui_manager12set_show_fpsEb', '__ZNK10ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio']\" $(TARGET) -o " .. _MAKE.esc(MAME_DIR) .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".js --post-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/sdl/emscripten_post.js", + os.getenv("EMSCRIPTEN") .. "/emcc -O3 -s DISABLE_EXCEPTION_CATCHING=2 -s USE_SDL=2 --memory-init-file 0 -s ALLOW_MEMORY_GROWTH=0 -s TOTAL_MEMORY=268435456 -s EXCEPTION_CATCHING_WHITELIST='[\"__ZN15running_machine17start_all_devicesEv\"]' -s EXPORTED_FUNCTIONS=\"['_main', '_malloc', '__Z14js_get_machinev', '__Z9js_get_uiv', '__Z12js_get_soundv', '__ZN10ui_manager12set_show_fpsEb', '__ZNK10ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio']\" $(TARGET) -o " .. _MAKE.esc(MAME_DIR) .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".js --pre-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/modules/sound/js_sound.js --post-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/sdl/emscripten_post.js", } end @@ -129,6 +129,8 @@ end "7z", "lua", "lsqlite3", + "uv", + "http-parser", } if _OPTIONS["with-bundled-zlib"] then diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index 56f193c2600..87e684a50f6 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -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", } @@ -398,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 = { diff --git a/scripts/src/osd/osdmini.lua b/scripts/src/osd/osdmini.lua index 803b7413014..b05839e7873 100644 --- a/scripts/src/osd/osdmini.lua +++ b/scripts/src/osd/osdmini.lua @@ -79,6 +79,7 @@ project ("osd_" .. _OPTIONS["osd"]) MAME_DIR .. "src/osd/modules/sound/coreaudio_sound.cpp", MAME_DIR .. "src/osd/modules/sound/sdl_sound.cpp", MAME_DIR .. "src/osd/modules/sound/none.cpp", + MAME_DIR .. "src/osd/modules/sound/xaudio2_sound.cpp", } project ("ocore_" .. _OPTIONS["osd"]) @@ -124,7 +125,6 @@ project ("ocore_" .. _OPTIONS["osd"]) MAME_DIR .. "src/osd/osdmini/minidir.cpp", MAME_DIR .. "src/osd/osdmini/minifile.cpp", MAME_DIR .. "src/osd/osdmini/minimisc.cpp", - MAME_DIR .. "src/osd/osdmini/minisync.cpp", MAME_DIR .. "src/osd/osdmini/minitime.cpp", MAME_DIR .. "src/osd/modules/sync/work_mini.cpp", } diff --git a/scripts/src/osd/osdmini_cfg.lua b/scripts/src/osd/osdmini_cfg.lua index ff9539066b2..586075d3cac 100644 --- a/scripts/src/osd/osdmini_cfg.lua +++ b/scripts/src/osd/osdmini_cfg.lua @@ -7,4 +7,6 @@ defines { "USE_SDL", "SDLMAME_NOASM=1", "USE_OPENGL=0", + "NO_USE_MIDI=1", + "USE_XAUDIO2=0", } diff --git a/scripts/src/osd/windows_cfg.lua b/scripts/src/osd/windows_cfg.lua index bff1d436d3e..19ef05c3ce9 100644 --- a/scripts/src/osd/windows_cfg.lua +++ b/scripts/src/osd/windows_cfg.lua @@ -3,7 +3,6 @@ defines { "OSD_WINDOWS", - "_WIN32_WINNT=0x0501", } configuration { "mingw*-gcc or vs*" } @@ -25,6 +24,23 @@ 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=0x0501", + } +end + if not _OPTIONS["DONT_USE_NETWORK"] then defines { "USE_NETWORK", diff --git a/scripts/src/sound.lua b/scripts/src/sound.lua index 4ba380deefb..6fd7e6398d7 100644 --- a/scripts/src/sound.lua +++ b/scripts/src/sound.lua @@ -925,6 +925,7 @@ if (SOUNDS["SP0250"]~=null) then end + --------------------------------------------------- -- S14001A speech synthesizer --@src/devices/sound/s14001a.h,SOUNDS["S14001A"] = true diff --git a/scripts/src/tests.lua b/scripts/src/tests.lua index 99d82fcb6cb..d30cff64df2 100644 --- a/scripts/src/tests.lua +++ b/scripts/src/tests.lua @@ -8,42 +8,78 @@ -- Rules for building tests -- --------------------------------------------------------------------------- +-------------------------------------------------- +-- GoogleTest library objects +-------------------------------------------------- -project("tests") -uuid ("66d4c639-196b-4065-a411-7ee9266564f5") -kind "ConsoleApp" +project "gtest" + uuid "fa306a8d-fb10-4d4a-9d2e-fdb9076407b4" + kind "StaticLib" + + configuration { "gmake" } + buildoptions { + "-Wno-undef", + "-Wno-unused-variable", + } -flags { - "Symbols", -- always include minimum symbols for executables -} + configuration { "mingw-clang" } + buildoptions { + "-O0", -- crash of compiler when doing optimization + } -if _OPTIONS["SEPARATE_BIN"]~="1" then - targetdir(MAME_DIR) + configuration { "vs*" } +if _OPTIONS["vs"]=="intel-15" then + buildoptions { + "/Qwd1195", -- error #1195: conversion from integer to smaller pointer + } end -configuration { "gmake" } - buildoptions { - "-Wno-undef", + configuration { } + + includedirs { + MAME_DIR .. "3rdparty/googletest/googletest/include", + MAME_DIR .. "3rdparty/googletest/googletest", + } + files { + MAME_DIR .. "3rdparty/googletest/googletest/src/gtest-all.cc", + } + + +project("tests") + uuid ("66d4c639-196b-4065-a411-7ee9266564f5") + kind "ConsoleApp" + + flags { + "Symbols", -- always include minimum symbols for executables } -configuration { } - -links { - "gtest", - "utils", - "expat", - "zlib", - "ocore_" .. _OPTIONS["osd"], -} - -includedirs { - MAME_DIR .. "3rdparty/googletest/googletest/include", - MAME_DIR .. "src/osd", - MAME_DIR .. "src/lib/util", -} - -files { - MAME_DIR .. "tests/main.cpp", - MAME_DIR .. "tests/lib/util/corestr.cpp", -} + if _OPTIONS["SEPARATE_BIN"]~="1" then + targetdir(MAME_DIR) + end + + configuration { "gmake" } + buildoptions { + "-Wno-undef", + } + + configuration { } + + links { + "gtest", + "utils", + "expat", + "zlib", + "ocore_" .. _OPTIONS["osd"], + } + + includedirs { + MAME_DIR .. "3rdparty/googletest/googletest/include", + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib/util", + } + + files { + MAME_DIR .. "tests/main.cpp", + MAME_DIR .. "tests/lib/util/corestr.cpp", + } diff --git a/scripts/src/video.lua b/scripts/src/video.lua index ad91ca0f9f8..fafc07e37f6 100644 --- a/scripts/src/video.lua +++ b/scripts/src/video.lua @@ -156,6 +156,18 @@ end -------------------------------------------------- -- +--@src/devices/video/ef9364.h,VIDEOS["EF9364"] = true +-------------------------------------------------- + +if (VIDEOS["EF9364"]~=null) then + files { + MAME_DIR .. "src/devices/video/ef9364.cpp", + MAME_DIR .. "src/devices/video/ef9364.h", + } +end + +-------------------------------------------------- +-- --@src/devices/video/ef9365.h,VIDEOS["EF9365"] = true -------------------------------------------------- @@ -524,6 +536,18 @@ end -------------------------------------------------- -- +--@src/devices/video/pcd8544.h,VIDEOS["PCD8544"] = true +-------------------------------------------------- + +if (VIDEOS["PCD8544"]~=null) then + files { + MAME_DIR .. "src/devices/video/pcd8544.cpp", + MAME_DIR .. "src/devices/video/pcd8544.h", + } +end + +-------------------------------------------------- +-- --@src/devices/video/polylgcy.h,VIDEOS["POLY"] = true -------------------------------------------------- |