summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/src')
-rw-r--r--scripts/src/3rdparty.lua133
-rw-r--r--scripts/src/devices.lua3
-rw-r--r--scripts/src/emu.lua32
-rw-r--r--scripts/src/lib.lua1
-rw-r--r--scripts/src/machine.lua11
-rw-r--r--scripts/src/main.lua26
-rw-r--r--scripts/src/osd/modules.lua111
-rw-r--r--scripts/src/osd/osdmini.lua21
-rw-r--r--scripts/src/osd/osdmini_cfg.lua2
-rw-r--r--scripts/src/osd/sdl.lua46
-rw-r--r--scripts/src/osd/sdl_cfg.lua2
-rw-r--r--scripts/src/osd/windows.lua16
-rw-r--r--scripts/src/osd/windows_cfg.lua18
-rw-r--r--scripts/src/sound.lua1
-rw-r--r--scripts/src/video.lua12
15 files changed, 319 insertions, 116 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 761257dc930..2bee6477f01 100644
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -37,7 +37,7 @@ end
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
}
configuration { }
-
+
files {
MAME_DIR .. "3rdparty/expat/lib/xmlparse.c",
MAME_DIR .. "3rdparty/expat/lib/xmlrole.c",
@@ -59,13 +59,13 @@ project "zlib"
kind "StaticLib"
local version = str_to_version(_OPTIONS["gcc_version"])
- if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") then
+ if _OPTIONS["gcc"]~=nil and (string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs")) then
configuration { "gmake" }
if (version >= 30700) then
buildoptions {
"-Wno-shift-negative-value",
}
- end
+ end
end
configuration { "vs*" }
@@ -117,7 +117,7 @@ end
--------------------------------------------------
-- SoftFloat library objects
--------------------------------------------------
-
+
project "softfloat"
uuid "04fbf89e-4761-4cf2-8a12-64500cf0c5c5"
kind "StaticLib"
@@ -139,7 +139,7 @@ if _OPTIONS["vs"]=="intel-15" then
buildoptions {
"/Qwd2557", -- remark #2557: comparison between signed and unsigned operands
}
-end
+end
configuration { }
files {
@@ -159,7 +159,7 @@ project "jpeg"
configuration { "vs*" }
buildoptions {
- "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter
+ "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter
"/wd4127", -- warning C4127: conditional expression is constant
"/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
}
@@ -167,7 +167,7 @@ if _OPTIONS["vs"]=="intel-15" then
buildoptions {
"/Qwd869", -- remark #869: parameter "xxx" was never referenced
}
-end
+end
configuration { }
@@ -238,7 +238,7 @@ project "flac"
buildoptions {
"/wd4127", -- warning C4127: conditional expression is constant
"/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
- "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter
+ "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter
"/wd4702", -- warning C4702: unreachable code
}
if _OPTIONS["vs"]=="intel-15" then
@@ -249,7 +249,12 @@ if _OPTIONS["vs"]=="intel-15" then
"/Qwd188", -- error #188: enumerated type mixed with another type
"/Qwd869", -- remark #869: parameter "xxx" was never referenced
}
-end
+end
+
+ configuration { "mingw-clang" }
+ buildoptions {
+ "-include stdint.h"
+ }
configuration { "vs2015" }
buildoptions {
@@ -328,7 +333,7 @@ end
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
"/wd4457", -- warning C4457: declaration of 'xxx' hides function parameter
}
-
+
configuration { }
defines {
"_7ZIP_PPMD_SUPPPORT",
@@ -366,7 +371,7 @@ project "lua"
kind "StaticLib"
-- uncomment the options below to
- -- compile using c++. Do the same
+ -- compile using c++. Do the same
-- in lsqlite3.
-- In addition comment out the "extern "C""
-- in lua.hpp and do the same in luaengine.c line 47
@@ -378,6 +383,7 @@ project "lua"
buildoptions_c {
"-Wno-bad-function-cast"
}
+
configuration { "vs*" }
buildoptions {
"/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
@@ -403,7 +409,7 @@ end
"LUA_32BITS",
}
end
-
+
configuration { }
includedirs {
@@ -454,7 +460,7 @@ end
--------------------------------------------------
-- sqlite3 lua library objects
--------------------------------------------------
-
+
project "lsqlite3"
uuid "1d84edab-94cf-48fb-83ee-b75bc697660e"
kind "StaticLib"
@@ -487,32 +493,6 @@ project "lsqlite3"
}
--------------------------------------------------
--- jsoncpp library objects
---------------------------------------------------
-
-project "jsoncpp"
- uuid "ae023ff3-d712-4e54-adc5-3b56a148650f"
- kind "StaticLib"
-
- configuration { "vs2015" }
- buildoptions {
- "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
- }
-
- configuration { }
-
- includedirs {
- MAME_DIR .. "3rdparty/jsoncpp/include",
- }
-
- files {
- MAME_DIR .. "3rdparty/jsoncpp/src/lib_json/json_reader.cpp",
- MAME_DIR .. "3rdparty/jsoncpp/src/lib_json/json_value.cpp",
- MAME_DIR .. "3rdparty/jsoncpp/src/lib_json/json_writer.cpp",
-
- }
-
---------------------------------------------------
-- SQLite3 library objects
--------------------------------------------------
@@ -540,14 +520,14 @@ end
buildoptions {
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
}
-
-
+
+
configuration { "gmake" }
buildoptions_c {
"-Wno-bad-function-cast",
"-Wno-undef",
}
-
+
local version = str_to_version(_OPTIONS["gcc_version"])
if _OPTIONS["gcc"]~=nil and not string.find(_OPTIONS["gcc"], "clang") then
if (version >= 40800) then
@@ -581,7 +561,7 @@ project "portmidi"
MAME_DIR .. "3rdparty/portmidi/pm_common",
MAME_DIR .. "3rdparty/portmidi/porttime",
}
-
+
configuration { "vs*" }
buildoptions {
"/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter
@@ -602,7 +582,7 @@ end
buildoptions {
"/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
}
-
+
configuration { "linux*" }
defines {
"PMALSA=1",
@@ -654,11 +634,11 @@ links {
"portmidi",
}
end
-end
+end
--------------------------------------------------
-- BGFX library objects
--------------------------------------------------
-
+
if (USE_BGFX == 1) then
project "bgfx"
uuid "d3e7e119-35cf-4f4f-aba0-d3bdcd1b879a"
@@ -669,7 +649,7 @@ project "bgfx"
"/wd4324", -- warning C4324: 'xxx' : structure was padded due to __declspec(align())
"/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
"/wd4611", -- warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable
- "/wd4310", -- warning C4310: cast truncates constant value
+ "/wd4310", -- warning C4310: cast truncates constant value
}
if _OPTIONS["vs"]=="intel-15" then
buildoptions {
@@ -680,7 +660,7 @@ if _OPTIONS["vs"]=="intel-15" then
end
configuration { }
- includedirs {
+ includedirs {
MAME_DIR .. "3rdparty/bgfx/include",
MAME_DIR .. "3rdparty/bgfx/3rdparty",
MAME_DIR .. "3rdparty/bx/include",
@@ -701,7 +681,7 @@ end
includedirs {
MAME_DIR .. "3rdparty/bx/include/compat/osx",
}
-
+
configuration { "freebsd" }
includedirs {
MAME_DIR .. "3rdparty/bx/include/compat/freebsd",
@@ -713,11 +693,11 @@ end
}
configuration { "gmake" }
- buildoptions {
+ buildoptions {
"-Wno-uninitialized",
"-Wno-unused-function",
}
-
+
configuration { }
if _OPTIONS["targetos"]=="windows" then
@@ -726,10 +706,20 @@ end
buildoptions {
"-Wno-unknown-attributes",
"-Wno-missing-braces",
+ "-Wno-int-to-pointer-cast",
}
end
end
-
+
+ if _OPTIONS["targetos"]=="macosx" then
+ local version = str_to_version(_OPTIONS["gcc_version"])
+ if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") then
+ buildoptions {
+ "-Wno-switch",
+ }
+ end
+ end
+
defines {
"__STDC_LIMIT_MACROS",
"__STDC_FORMAT_MACROS",
@@ -786,7 +776,7 @@ project "portaudio"
configuration { "vs*" }
buildoptions {
- "/wd4245", -- warning C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
+ "/wd4245", -- warning C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
"/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
"/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter
"/wd4389", -- warning C4389: 'operator' : signed/unsigned mismatch
@@ -818,7 +808,7 @@ end
"-Wno-unknown-pragmas",
}
- local version = str_to_version(_OPTIONS["gcc_version"])
+ local version = str_to_version(_OPTIONS["gcc_version"])
if (_OPTIONS["gcc"]~=nil) then
if string.find(_OPTIONS["gcc"], "clang") then
buildoptions_c {
@@ -843,7 +833,7 @@ end
"/wd4204", -- warning C4204: nonstandard extension used : non-constant aggregate initializer
"/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used
}
-
+
configuration { }
includedirs {
@@ -869,13 +859,13 @@ end
"PA_USE_DS=1",
"PA_USE_WDMKS=1",
"PA_USE_WMME=1",
- }
+ }
includedirs {
MAME_DIR .. "3rdparty/portaudio/src/os/win",
}
- configuration { }
- files {
+ configuration { }
+ files {
MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_util.c",
MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_waveformat.c",
MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_hostapis.c",
@@ -887,47 +877,47 @@ end
MAME_DIR .. "3rdparty/portaudio/src/common/pa_ringbuffer.c",
MAME_DIR .. "3rdparty/portaudio/src/hostapi/wmme/pa_win_wmme.c",
}
-
+
end
if _OPTIONS["targetos"]=="linux" then
defines {
"PA_USE_ALSA=1",
"PA_USE_OSS=1",
"HAVE_LINUX_SOUNDCARD_H",
- }
+ }
includedirs {
MAME_DIR .. "3rdparty/portaudio/src/os/unix",
}
- files {
+ files {
MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_hostapis.c",
MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_util.c",
MAME_DIR .. "3rdparty/portaudio/src/hostapi/alsa/pa_linux_alsa.c",
MAME_DIR .. "3rdparty/portaudio/src/hostapi/oss/pa_unix_oss.c",
- }
+ }
end
if _OPTIONS["targetos"]=="macosx" then
defines {
"PA_USE_COREAUDIO=1",
- }
+ }
includedirs {
MAME_DIR .. "3rdparty/portaudio/src/os/unix",
}
- files {
+ files {
MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_hostapis.c",
MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_util.c",
MAME_DIR .. "3rdparty/portaudio/src/hostapi/coreaudio/pa_mac_core.c",
MAME_DIR .. "3rdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.c",
MAME_DIR .. "3rdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_blocking.c",
MAME_DIR .. "3rdparty/portaudio/src/common/pa_ringbuffer.c",
- }
+ }
end
-
+
else
links {
"portaudio",
}
end
-
+
--------------------------------------------------
-- GoogleTest library objects
--------------------------------------------------
@@ -942,6 +932,11 @@ project "gtest"
"-Wno-unused-variable",
}
+ configuration { "mingw-clang" }
+ buildoptions {
+ "-O0", -- crash of compiler when doing optimization
+ }
+
configuration { "vs*" }
if _OPTIONS["vs"]=="intel-15" then
buildoptions {
@@ -954,7 +949,7 @@ end
includedirs {
MAME_DIR .. "3rdparty/googletest/googletest/include",
MAME_DIR .. "3rdparty/googletest/googletest",
- }
- files {
+ }
+ files {
MAME_DIR .. "3rdparty/googletest/googletest/src/gtest-all.cc",
}
diff --git a/scripts/src/devices.lua b/scripts/src/devices.lua
index 05e8810f2df..15e53a17cfb 100644
--- a/scripts/src/devices.lua
+++ b/scripts/src/devices.lua
@@ -24,6 +24,7 @@ function devicesProject(_target, _subtarget)
}
addprojectflags()
+ precompiledheaders()
includedirs {
MAME_DIR .. "src/osd",
@@ -62,6 +63,7 @@ if (_OPTIONS["SOURCES"] == nil) then
kind (LIBTYPE)
targetsubdir(_target .."_" .. _subtarget)
addprojectflags()
+ precompiledheaders()
options {
"ArchiveSplit",
}
@@ -100,6 +102,7 @@ if #disasm_files > 0 then
kind (LIBTYPE)
targetsubdir(_target .."_" .. _subtarget)
addprojectflags()
+ precompiledheaders()
includedirs {
MAME_DIR .. "src/osd",
diff --git a/scripts/src/emu.lua b/scripts/src/emu.lua
index 7b19e397c93..01e61852d60 100644
--- a/scripts/src/emu.lua
+++ b/scripts/src/emu.lua
@@ -15,6 +15,7 @@ uuid ("e6fa15e4-a354-4526-acef-13c8e80fcacf")
kind (LIBTYPE)
addprojectflags()
+precompiledheaders()
includedirs {
MAME_DIR .. "src/osd",
@@ -48,6 +49,8 @@ files {
MAME_DIR .. "src/emu/attotime.h",
MAME_DIR .. "src/emu/audit.cpp",
MAME_DIR .. "src/emu/audit.h",
+ MAME_DIR .. "src/emu/bookkeeping.cpp",
+ MAME_DIR .. "src/emu/bookkeeping.h",
MAME_DIR .. "src/emu/cheat.cpp",
MAME_DIR .. "src/emu/cheat.h",
MAME_DIR .. "src/emu/clifront.cpp",
@@ -271,8 +274,6 @@ files {
MAME_DIR .. "src/devices/machine/buffer.h",
MAME_DIR .. "src/devices/machine/clock.cpp",
MAME_DIR .. "src/devices/machine/clock.h",
- MAME_DIR .. "src/emu/machine/generic.cpp",
- MAME_DIR .. "src/emu/machine/generic.h",
MAME_DIR .. "src/devices/machine/keyboard.cpp",
MAME_DIR .. "src/devices/machine/keyboard.h",
MAME_DIR .. "src/devices/machine/laserdsc.cpp",
@@ -365,3 +366,30 @@ custombuildtask {
layoutbuildtask("emu/layout", "noscreens"),
layoutbuildtask("emu/layout", "snap"),
}
+
+project ("precompile")
+targetsubdir(_OPTIONS["target"] .."_" .. _OPTIONS["subtarget"])
+uuid ("a6fb15d4-b123-4445-acef-13c8e80fcacf")
+kind (LIBTYPE)
+
+addprojectflags()
+precompiledheaders()
+
+includedirs {
+ MAME_DIR .. "src/osd",
+ MAME_DIR .. "src/emu",
+ MAME_DIR .. "src/devices", -- till deps are fixed
+ MAME_DIR .. "src/lib",
+ MAME_DIR .. "src/lib/util",
+ MAME_DIR .. "3rdparty",
+ GEN_DIR .. "emu",
+ GEN_DIR .. "emu/layout",
+}
+files {
+ MAME_DIR .. "src/emu/drivers/empty.cpp",
+}
+dependency {
+ { "$(OBJDIR)/src/emu/drivers/empty.o", "$(GCH)", true },
+}
+
+
diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua
index 833504a92f7..7620389f5dc 100644
--- a/scripts/src/lib.lua
+++ b/scripts/src/lib.lua
@@ -48,7 +48,6 @@ project "utils"
MAME_DIR .. "src/lib/util/chdcd.h",
MAME_DIR .. "src/lib/util/chdcodec.cpp",
MAME_DIR .. "src/lib/util/chdcodec.h",
- MAME_DIR .. "src/lib/util/corealloc.cpp",
MAME_DIR .. "src/lib/util/corealloc.h",
MAME_DIR .. "src/lib/util/corefile.cpp",
MAME_DIR .. "src/lib/util/corefile.h",
diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua
index c048884cf4f..5a97d22d015 100644
--- a/scripts/src/machine.lua
+++ b/scripts/src/machine.lua
@@ -2701,3 +2701,14 @@ if (MACHINES["VT82C496"]~=null) then
}
end
+---------------------------------------------------
+--
+--@src/emu/machine/pdc.h,MACHINES["PDC"] = true
+---------------------------------------------------
+
+if (MACHINES["PDC"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/machine/pdc.cpp",
+ MAME_DIR .. "src/devices/machine/pdc.h",
+ }
+end
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index 619833ccf57..da633c55212 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 " .. MAME_DIR .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".js --post-js " .. 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 --post-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/sdl/emscripten_post.js",
}
end
@@ -102,6 +102,9 @@ end
links {
"osd_" .. _OPTIONS["osd"],
}
+ links {
+ "qtdbg_" .. _OPTIONS["osd"],
+ }
if (_OPTIONS["SOURCES"] == nil) then
links {
"bus",
@@ -126,7 +129,6 @@ end
"7z",
"lua",
"lsqlite3",
- "jsoncpp",
}
if _OPTIONS["with-bundled-zlib"] then
@@ -197,13 +199,13 @@ end
if _OPTIONS["targetos"]=="macosx" and (not override_resources) then
linkoptions {
- "-sectcreate __TEXT __info_plist " .. GEN_DIR .. "/resource/" .. _subtarget .. "-Info.plist"
+ "-sectcreate __TEXT __info_plist " .. _MAKE.esc(GEN_DIR) .. "resource/" .. _subtarget .. "-Info.plist"
}
custombuildtask {
- { MAME_DIR .. "src/version.cpp" , GEN_DIR .. "/resource/" .. _subtarget .. "-Info.plist", { MAME_DIR .. "scripts/build/verinfo.py" }, {"@echo Emitting " .. _subtarget .. "-Info.plist" .. "...", PYTHON .. " $(1) -p -b " .. _subtarget .. " $(<) > $(@)" }},
+ { MAME_DIR .. "src/version.cpp" , GEN_DIR .. "resource/" .. _subtarget .. "-Info.plist", { MAME_DIR .. "scripts/build/verinfo.py" }, {"@echo Emitting " .. _subtarget .. "-Info.plist" .. "...", PYTHON .. " $(1) -p -b " .. _subtarget .. " $(<) > $(@)" }},
}
dependency {
- { "$(TARGET)" , GEN_DIR .. "/resource/" .. _subtarget .. "-Info.plist", true },
+ { "$(TARGET)" , GEN_DIR .. "resource/" .. _subtarget .. "-Info.plist", true },
}
end
@@ -219,7 +221,7 @@ end
rcfile,
}
dependency {
- { "$(OBJDIR)/".._subtarget ..".res" , GEN_DIR .. "/resource/" .. rctarget .. "vers.rc", true },
+ { "$(OBJDIR)/".._subtarget ..".res" , GEN_DIR .. "resource/" .. rctarget .. "vers.rc", true },
}
else
rctarget = "mame"
@@ -227,7 +229,7 @@ end
MAME_DIR .. "src/mame/osd/windows/mame/mame.rc",
}
dependency {
- { "$(OBJDIR)/mame.res" , GEN_DIR .. "/resource/" .. rctarget .. "vers.rc", true },
+ { "$(OBJDIR)/mame.res" , GEN_DIR .. "resource/" .. rctarget .. "vers.rc", true },
}
end
end
@@ -261,14 +263,14 @@ if _OPTIONS["FORCE_VERSION_COMPILE"]=="1" then
end
configuration { "mingw*" }
custombuildtask {
- { MAME_DIR .. "src/version.cpp" , GEN_DIR .. "/resource/" .. rctarget .. "vers.rc", { MAME_DIR .. "scripts/build/verinfo.py" }, {"@echo Emitting " .. rctarget .. "vers.rc" .. "...", PYTHON .. " $(1) -r -b " .. rctarget .. " $(<) > $(@)" }},
+ { MAME_DIR .. "src/version.cpp" , GEN_DIR .. "resource/" .. rctarget .. "vers.rc", { MAME_DIR .. "scripts/build/verinfo.py" }, {"@echo Emitting " .. rctarget .. "vers.rc" .. "...", PYTHON .. " $(1) -r -b " .. rctarget .. " $(<) > $(@)" }},
}
configuration { "vs*" }
prebuildcommands {
- "mkdir " .. path.translate(GEN_DIR .. "/resource/","\\") .. " 2>NUL",
+ "mkdir " .. path.translate(GEN_DIR .. "resource/","\\") .. " 2>NUL",
"@echo Emitting ".. rctarget .. "vers.rc...",
- PYTHON .. " " .. path.translate(MAME_DIR .. "scripts/build/verinfo.py","\\") .. " -r -b " .. rctarget .. " " .. path.translate(MAME_DIR .. "src/version.cpp","\\") .. " > " .. path.translate(GEN_DIR .. "/resource/" .. rctarget .. "vers.rc", "\\") ,
+ PYTHON .. " " .. path.translate(MAME_DIR .. "scripts/build/verinfo.py","\\") .. " -r -b " .. rctarget .. " " .. path.translate(MAME_DIR .. "src/version.cpp","\\") .. " > " .. path.translate(GEN_DIR .. "resource/" .. rctarget .. "vers.rc", "\\") ,
}
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua
index cdb376c9c92..87e684a50f6 100644
--- a/scripts/src/osd/modules.lua
+++ b/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
}
@@ -54,7 +54,6 @@ function osdmodulesbuild()
MAME_DIR .. "src/osd/modules/debugger/none.cpp",
MAME_DIR .. "src/osd/modules/debugger/debugint.cpp",
MAME_DIR .. "src/osd/modules/debugger/debugwin.cpp",
- MAME_DIR .. "src/osd/modules/debugger/debugqt.cpp",
MAME_DIR .. "src/osd/modules/font/font_sdl.cpp",
MAME_DIR .. "src/osd/modules/font/font_windows.cpp",
MAME_DIR .. "src/osd/modules/font/font_osx.cpp",
@@ -68,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",
}
@@ -121,6 +121,38 @@ function osdmodulesbuild()
end
if _OPTIONS["USE_QTDEBUG"]=="1" then
+ defines {
+ "USE_QTDEBUG=1",
+ }
+ else
+ defines {
+ "USE_QTDEBUG=0",
+ }
+ end
+
+end
+
+
+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",
+ }
+
+ if _OPTIONS["USE_QTDEBUG"]=="1" then
files {
MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.cpp",
MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.h",
@@ -153,7 +185,7 @@ function osdmodulesbuild()
defines {
"USE_QTDEBUG=1",
}
-
+
local MOC = ""
if (os.is("windows")) then
MOC = "moc"
@@ -163,22 +195,22 @@ function osdmodulesbuild()
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
- MOCTST = backtick("which moc-qt4 2>/dev/null")
+ else
+ MOCTST = backtick("which moc-qt5 2>/dev/null")
if (MOCTST=='') then
MOCTST = backtick("which moc 2>/dev/null")
end
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 $(@)" }},
@@ -189,9 +221,9 @@ function osdmodulesbuild()
{ 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 {
@@ -209,7 +241,7 @@ function osdmodulesbuild()
}
else
buildoptions {
- backtick("pkg-config --cflags QtGui"),
+ backtick("pkg-config --cflags Qt5Widgets"),
}
end
end
@@ -261,16 +293,18 @@ function osdmodulestargetconf()
}
links {
"qtmain",
- "QtGui4",
- "QtCore4",
+ "Qt5Core.dll",
+ "Qt5Gui.dll",
+ "Qt5Widgets.dll",
}
elseif _OPTIONS["targetos"]=="macosx" then
linkoptions {
"-F" .. backtick("qmake -query QT_INSTALL_LIBS"),
}
links {
- "QtCore.framework",
- "QtGui.framework",
+ "Qt5Core.framework",
+ "Qt5Gui.framework",
+ "Qt5Widgets.framework",
}
else
if _OPTIONS["QT_HOME"]~=nil then
@@ -278,11 +312,12 @@ function osdmodulestargetconf()
"-L" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_LIBS"),
}
links {
- "QtGui",
- "QtCore",
+ "Qt5Core",
+ "Qt5Gui",
+ "Qt5Widgets",
}
else
- local str = backtick("pkg-config --libs QtGui")
+ local str = backtick("pkg-config --libs Qt5Widgets")
addlibfromstring(str)
addoptionsfromstring(str)
end
@@ -364,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 43ff9c4c40b..803b7413014 100644
--- a/scripts/src/osd/osdmini.lua
+++ b/scripts/src/osd/osdmini.lua
@@ -12,6 +12,27 @@
function maintargetosdoptions(_target,_subtarget)
end
+project ("qtdbg_" .. _OPTIONS["osd"])
+ uuid (os.uuid("qtdbg_" .. _OPTIONS["osd"]))
+ kind (LIBTYPE)
+
+ dofile("osdmini_cfg.lua")
+ includedirs {
+ MAME_DIR .. "src/emu",
+ MAME_DIR .. "src/devices", -- accessing imagedev from debugger
+ MAME_DIR .. "src/osd",
+ MAME_DIR .. "src/lib",
+ MAME_DIR .. "src/lib/util",
+ MAME_DIR .. "src/osd/modules/render",
+ MAME_DIR .. "3rdparty",
+ }
+ removeflags {
+ "SingleOutputDir",
+ }
+
+ files {
+ MAME_DIR .. "src/osd/modules/debugger/debugqt.cpp",
+ }
project ("osd_" .. _OPTIONS["osd"])
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
diff --git a/scripts/src/osd/osdmini_cfg.lua b/scripts/src/osd/osdmini_cfg.lua
index aa6f64113f2..ff9539066b2 100644
--- a/scripts/src/osd/osdmini_cfg.lua
+++ b/scripts/src/osd/osdmini_cfg.lua
@@ -3,7 +3,7 @@
defines {
"OSD_MINI",
- "USE_QTDEBUG",
+ "USE_QTDEBUG=0",
"USE_SDL",
"SDLMAME_NOASM=1",
"USE_OPENGL=0",
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index 30c776490c5..6acb5a2d262 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -241,9 +241,20 @@ end
if BASE_TARGETOS=="unix" then
if _OPTIONS["targetos"]=="macosx" then
+ local os_version = str_to_version(backtick("sw_vers -productVersion"))
+
links {
"Cocoa.framework",
}
+ linkoptions {
+ "-framework QuartzCore",
+ "-framework OpenGL",
+ }
+ if os_version>=101100 then
+ linkoptions {
+ "-weak_framework Metal",
+ }
+ end
if _OPTIONS["MACOSX_USE_LIBSDL"]~="1" then
linkoptions {
"-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"],
@@ -307,6 +318,27 @@ elseif BASE_TARGETOS=="os2" then
}
end
+project ("qtdbg_" .. _OPTIONS["osd"])
+ uuid (os.uuid("qtdbg_" .. _OPTIONS["osd"]))
+ kind (LIBTYPE)
+
+ dofile("sdl_cfg.lua")
+ includedirs {
+ MAME_DIR .. "src/emu",
+ MAME_DIR .. "src/devices", -- accessing imagedev from debugger
+ MAME_DIR .. "src/osd",
+ MAME_DIR .. "src/lib",
+ MAME_DIR .. "src/lib/util",
+ MAME_DIR .. "src/osd/modules/render",
+ MAME_DIR .. "3rdparty",
+ }
+ configuration { "linux-*" }
+ buildoptions {
+ "-fPIC",
+ }
+ configuration { }
+
+ qtdebuggerbuild()
project ("osd_" .. _OPTIONS["osd"])
targetsubdir(_OPTIONS["target"] .."_" .._OPTIONS["subtarget"])
@@ -369,7 +401,7 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/debugger/osx/registersview.mm",
MAME_DIR .. "src/osd/modules/debugger/osx/registersview.h",
MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.mm",
- MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h",
+ MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h",
MAME_DIR .. "src/osd/modules/debugger/osx/debugosx.h",
}
if _OPTIONS["SDL_LIBVER"]=="sdl" then
@@ -438,7 +470,7 @@ project ("ocore_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/sdl/sdlsocket.cpp",
MAME_DIR .. "src/osd/sdl/sdlos_" .. SDLOS_TARGETOS .. ".cpp",
MAME_DIR .. "src/osd/modules/osdmodule.cpp",
- MAME_DIR .. "src/osd/modules/osdmodule.h",
+ MAME_DIR .. "src/osd/modules/osdmodule.h",
MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".cpp",
MAME_DIR .. "src/osd/modules/lib/osdlib.h",
MAME_DIR .. "src/osd/modules/sync/sync_" .. SYNC_IMPLEMENTATION .. ".cpp",
@@ -473,9 +505,9 @@ if _OPTIONS["with-tools"] then
kind "ConsoleApp"
flags {
- "Symbols", -- always include minimum symbols for executables
+ "Symbols", -- always include minimum symbols for executables
}
-
+
dofile("sdl_cfg.lua")
includedirs {
@@ -483,7 +515,7 @@ if _OPTIONS["with-tools"] then
MAME_DIR .. "src/lib/util",
}
- if _OPTIONS["SEPARATE_BIN"]~="1" then
+ if _OPTIONS["SEPARATE_BIN"]~="1" then
targetdir(MAME_DIR)
end
@@ -534,12 +566,12 @@ if _OPTIONS["targetos"] == "macosx" and _OPTIONS["with-tools"] then
kind "ConsoleApp"
flags {
- "Symbols", -- always include minimum symbols for executables
+ "Symbols", -- always include minimum symbols for executables
}
dofile("sdl_cfg.lua")
- if _OPTIONS["SEPARATE_BIN"]~="1" then
+ if _OPTIONS["SEPARATE_BIN"]~="1" then
targetdir(MAME_DIR)
end
diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
index 878a5a2f945..2dc1a7e465a 100644
--- a/scripts/src/osd/sdl_cfg.lua
+++ b/scripts/src/osd/sdl_cfg.lua
@@ -130,7 +130,7 @@ elseif _OPTIONS["targetos"]=="linux" then
}
else
buildoptions {
- backtick("pkg-config --cflags QtGui"),
+ backtick("pkg-config --cflags Qt5Widgets"),
}
end
elseif _OPTIONS["targetos"]=="macosx" then
diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua
index 32b15ef0431..fd508e645c5 100644
--- a/scripts/src/osd/windows.lua
+++ b/scripts/src/osd/windows.lua
@@ -100,6 +100,22 @@ if _OPTIONS["CYGWIN_BUILD"] == "1" then
end
+project ("qtdbg_" .. _OPTIONS["osd"])
+ uuid (os.uuid("qtdbg_" .. _OPTIONS["osd"]))
+ kind (LIBTYPE)
+
+ dofile("windows_cfg.lua")
+ includedirs {
+ MAME_DIR .. "src/emu",
+ MAME_DIR .. "src/devices", -- accessing imagedev from debugger
+ MAME_DIR .. "src/osd",
+ MAME_DIR .. "src/lib",
+ MAME_DIR .. "src/lib/util",
+ MAME_DIR .. "src/osd/modules/render",
+ MAME_DIR .. "3rdparty",
+ }
+ qtdebuggerbuild()
+
project ("osd_" .. _OPTIONS["osd"])
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
kind (LIBTYPE)
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/video.lua b/scripts/src/video.lua
index ad91ca0f9f8..a09ef123fca 100644
--- a/scripts/src/video.lua
+++ b/scripts/src/video.lua
@@ -524,6 +524,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
--------------------------------------------------