mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
Split OSD per file [qmc2]
This commit is contained in:
parent
52efc8a693
commit
e14a06de87
@ -47,11 +47,6 @@ newoption {
|
||||
newoption {
|
||||
trigger = "osd",
|
||||
description = "Choose target OSD",
|
||||
allowed = {
|
||||
{ "osdmini", "mini dummy OSD" },
|
||||
{ "sdl", "SDL" },
|
||||
{ "windows", "Windows" },
|
||||
},
|
||||
}
|
||||
|
||||
newoption {
|
||||
@ -817,7 +812,11 @@ dofile(path.join("src", "lib.lua"))
|
||||
|
||||
group "core"
|
||||
|
||||
dofile(path.join("src", "osd.lua"))
|
||||
if (not os.isfile(path.join("src", "osd", _OPTIONS["osd"] .. ".lua"))) then
|
||||
error("Unsupported value '" .. _OPTIONS["osd"] .. "' for OSD")
|
||||
end
|
||||
|
||||
dofile(path.join("src", "osd", _OPTIONS["osd"] .. ".lua"))
|
||||
dofile(path.join("src", "emu.lua"))
|
||||
emuProject(_OPTIONS["target"],_OPTIONS["subtarget"])
|
||||
|
||||
|
@ -75,7 +75,7 @@ function mainProject(_target, _subtarget)
|
||||
links{
|
||||
"ocore_" .. _OPTIONS["osd"],
|
||||
}
|
||||
dofile("src/osd_cfg.lua")
|
||||
dofile("src/osd/" .. _OPTIONS["osd"] .. "_cfg.lua")
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/emu",
|
||||
|
@ -1,231 +0,0 @@
|
||||
project ("osd_" .. _OPTIONS["osd"])
|
||||
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
|
||||
kind "StaticLib"
|
||||
|
||||
removeflags {
|
||||
"SingleOutputDir",
|
||||
}
|
||||
|
||||
options {
|
||||
"ForceCPP",
|
||||
}
|
||||
|
||||
dofile("osd_cfg.lua")
|
||||
|
||||
if _OPTIONS["osd"]=="windows" then
|
||||
defines {
|
||||
"DIRECTINPUT_VERSION=0x0800",
|
||||
"DIRECT3D_VERSION=0x0900",
|
||||
}
|
||||
end
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "src/osd/modules/render",
|
||||
MAME_DIR .. "3rdparty",
|
||||
MAME_DIR .. "3rdparty/winpcap/Include",
|
||||
MAME_DIR .. "3rdparty/bgfx/include",
|
||||
MAME_DIR .. "3rdparty/bx/include",
|
||||
}
|
||||
if _OPTIONS["osd"]=="osdmini" then
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd/sdl",
|
||||
}
|
||||
files {
|
||||
MAME_DIR .. "src/osd/osdmini/minimain.c",
|
||||
}
|
||||
end
|
||||
if _OPTIONS["osd"]=="sdl" then
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd/sdl",
|
||||
}
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
files {
|
||||
MAME_DIR .. "src/osd/sdl/main.c",
|
||||
}
|
||||
end
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
files {
|
||||
--MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.m",
|
||||
MAME_DIR .. "src/osd/modules/debugger/*.m",
|
||||
MAME_DIR .. "src/osd/modules/debugger/osx/*.m",
|
||||
MAME_DIR .. "src/osd/modules/debugger/osx/*.h",
|
||||
}
|
||||
end
|
||||
files {
|
||||
MAME_DIR .. "src/osd/sdl/sdlmain.*",
|
||||
MAME_DIR .. "src/osd/sdl/input.*",
|
||||
MAME_DIR .. "src/osd/sdl/video.*",
|
||||
MAME_DIR .. "src/osd/sdl/window.*",
|
||||
MAME_DIR .. "src/osd/sdl/output.*",
|
||||
MAME_DIR .. "src/osd/sdl/watchdog.*",
|
||||
MAME_DIR .. "src/osd/modules/render/drawsdl.*",
|
||||
--ifeq ($(SDL_LIBVER),sdl2)
|
||||
MAME_DIR .. "src/osd/modules/render/draw13.*",
|
||||
--endif
|
||||
MAME_DIR .. "src/osd/modules/debugger/none.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/debugint.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/debugwin.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/debugqt.*",
|
||||
|
||||
MAME_DIR .. "src/osd/modules/render/drawogl.*",
|
||||
MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.*",
|
||||
MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.*",
|
||||
}
|
||||
if not (_OPTIONS["targetos"]=="macosx") then
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/debugger/qt/*.*",
|
||||
GEN_DIR .. "osd/modules/debugger/qt/*.*",
|
||||
}
|
||||
end
|
||||
|
||||
if (USE_BGFX == 1) then
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/render/drawbgfx.c",
|
||||
}
|
||||
end
|
||||
end
|
||||
if _OPTIONS["osd"]=="windows" then
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd/windows",
|
||||
}
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/render/drawd3d.c",
|
||||
MAME_DIR .. "src/osd/modules/render/d3d/d3d9intf.c",
|
||||
MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.c",
|
||||
MAME_DIR .. "src/osd/modules/render/drawdd.c",
|
||||
MAME_DIR .. "src/osd/modules/render/drawgdi.c",
|
||||
MAME_DIR .. "src/osd/modules/render/drawbgfx.c",
|
||||
MAME_DIR .. "src/osd/modules/render/drawnone.c",
|
||||
MAME_DIR .. "src/osd/windows/input.c",
|
||||
MAME_DIR .. "src/osd/windows/output.c",
|
||||
MAME_DIR .. "src/osd/windows/video.c",
|
||||
MAME_DIR .. "src/osd/windows/window.c",
|
||||
MAME_DIR .. "src/osd/windows/winmenu.c",
|
||||
MAME_DIR .. "src/osd/windows/winmain.c",
|
||||
MAME_DIR .. "src/osd/modules/debugger/none.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/debugint.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/debugwin.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/debugqt.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/win/*.*",
|
||||
MAME_DIR .. "src/osd/modules/render/drawogl.*",
|
||||
MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.*",
|
||||
MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.*",
|
||||
}
|
||||
end
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/lib/osdobj_common.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_sdl.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_windows.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_osx.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_none.*",
|
||||
MAME_DIR .. "src/osd/modules/netdev/taptun.*",
|
||||
MAME_DIR .. "src/osd/modules/netdev/pcap.*",
|
||||
MAME_DIR .. "src/osd/modules/netdev/none.*",
|
||||
MAME_DIR .. "src/osd/modules/midi/portmidi.*",
|
||||
MAME_DIR .. "src/osd/modules/midi/none.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/js_sound.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/direct_sound.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/sdl_sound.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/none.*",
|
||||
}
|
||||
|
||||
project ("ocore_" .. _OPTIONS["osd"])
|
||||
uuid (os.uuid("ocore_" .. _OPTIONS["osd"]))
|
||||
kind "StaticLib"
|
||||
|
||||
options {
|
||||
"ForceCPP",
|
||||
}
|
||||
removeflags {
|
||||
"SingleOutputDir",
|
||||
}
|
||||
|
||||
dofile("osd_cfg.lua")
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
if _OPTIONS["targetos"]=="linux" then
|
||||
BASE_TARGETOS = "unix"
|
||||
SDLOS_TARGETOS = "unix"
|
||||
SYNC_IMPLEMENTATION = "tc"
|
||||
end
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
BASE_TARGETOS = "win32"
|
||||
SDLOS_TARGETOS = "win32"
|
||||
SYNC_IMPLEMENTATION = "windows"
|
||||
end
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
BASE_TARGETOS = "unix"
|
||||
SDLOS_TARGETOS = "macosx"
|
||||
SYNC_IMPLEMENTATION = "ntc"
|
||||
end
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/osdmodule.*",
|
||||
}
|
||||
if _OPTIONS["osd"]=="sdl" then
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd/sdl",
|
||||
}
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
files {
|
||||
MAME_DIR .. "src/osd/sdl/osxutils.m",
|
||||
}
|
||||
end
|
||||
files {
|
||||
MAME_DIR .. "src/osd/sdl/strconv.*",
|
||||
MAME_DIR .. "src/osd/sdl/sdldir.*",
|
||||
MAME_DIR .. "src/osd/sdl/sdlfile.*",
|
||||
MAME_DIR .. "src/osd/sdl/sdlptty_" .. BASE_TARGETOS ..".*",
|
||||
MAME_DIR .. "src/osd/sdl/sdlsocket.*",
|
||||
MAME_DIR .. "src/osd/sdl/sdlos_" .. SDLOS_TARGETOS .. ".*",
|
||||
MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".*",
|
||||
MAME_DIR .. "src/osd/modules/sync/sync_" .. SYNC_IMPLEMENTATION .. ".*",
|
||||
--ifdef NOASM
|
||||
--MAME_DIR .. "src/osd/modules/sync/work_mini.*",
|
||||
--else
|
||||
MAME_DIR .. "src/osd/modules/sync/work_osd.*",
|
||||
}
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
files {
|
||||
MAME_DIR .. "src/osd/sdl/osxutils.m",
|
||||
}
|
||||
end
|
||||
end
|
||||
if _OPTIONS["osd"]=="windows" then
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd/windows",
|
||||
MAME_DIR .. "src/lib/winpcap",
|
||||
}
|
||||
files {
|
||||
MAME_DIR .. "src/osd/windows/main.c",
|
||||
MAME_DIR .. "src/osd/windows/strconv.c",
|
||||
MAME_DIR .. "src/osd/windows/windir.c",
|
||||
MAME_DIR .. "src/osd/windows/winfile.c",
|
||||
MAME_DIR .. "src/osd/modules/sync/sync_windows.c",
|
||||
MAME_DIR .. "src/osd/windows/winutf8.c",
|
||||
MAME_DIR .. "src/osd/windows/winutil.c",
|
||||
MAME_DIR .. "src/osd/windows/winclip.c",
|
||||
MAME_DIR .. "src/osd/windows/winsocket.c",
|
||||
MAME_DIR .. "src/osd/modules/sync/work_osd.c",
|
||||
MAME_DIR .. "src/osd/modules/lib/osdlib_win32.c",
|
||||
MAME_DIR .. "src/osd/windows/winptty.c",
|
||||
}
|
||||
end
|
||||
if _OPTIONS["osd"]=="osdmini" then
|
||||
files {
|
||||
MAME_DIR .. "src/osd/osdmini/minidir.*",
|
||||
MAME_DIR .. "src/osd/osdmini/minifile.*",
|
||||
MAME_DIR .. "src/osd/osdmini/minimisc.*",
|
||||
MAME_DIR .. "src/osd/osdmini/minisync.*",
|
||||
MAME_DIR .. "src/osd/osdmini/minitime.*",
|
||||
MAME_DIR .. "src/osd/modules/sync/work_mini.*",
|
||||
}
|
||||
end
|
93
scripts/src/osd/osdmini.lua
Normal file
93
scripts/src/osd/osdmini.lua
Normal file
@ -0,0 +1,93 @@
|
||||
project ("osd_" .. _OPTIONS["osd"])
|
||||
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
|
||||
kind "StaticLib"
|
||||
|
||||
removeflags {
|
||||
"SingleOutputDir",
|
||||
}
|
||||
|
||||
options {
|
||||
"ForceCPP",
|
||||
}
|
||||
|
||||
dofile("osdmini_cfg.lua")
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "src/osd/sdl",
|
||||
MAME_DIR .. "src/osd/modules/render",
|
||||
MAME_DIR .. "3rdparty",
|
||||
MAME_DIR .. "3rdparty/winpcap/Include",
|
||||
MAME_DIR .. "3rdparty/bgfx/include",
|
||||
MAME_DIR .. "3rdparty/bx/include",
|
||||
}
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/osd/osdmini/minimain.c",
|
||||
MAME_DIR .. "src/osd/modules/lib/osdobj_common.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_sdl.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_windows.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_osx.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_none.*",
|
||||
MAME_DIR .. "src/osd/modules/netdev/taptun.*",
|
||||
MAME_DIR .. "src/osd/modules/netdev/pcap.*",
|
||||
MAME_DIR .. "src/osd/modules/netdev/none.*",
|
||||
MAME_DIR .. "src/osd/modules/midi/portmidi.*",
|
||||
MAME_DIR .. "src/osd/modules/midi/none.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/js_sound.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/direct_sound.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/sdl_sound.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/none.*",
|
||||
}
|
||||
|
||||
project ("ocore_" .. _OPTIONS["osd"])
|
||||
uuid (os.uuid("ocore_" .. _OPTIONS["osd"]))
|
||||
kind "StaticLib"
|
||||
|
||||
options {
|
||||
"ForceCPP",
|
||||
}
|
||||
|
||||
removeflags {
|
||||
"SingleOutputDir",
|
||||
}
|
||||
|
||||
dofile("osdmini_cfg.lua")
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
|
||||
if _OPTIONS["targetos"]=="linux" then
|
||||
BASE_TARGETOS = "unix"
|
||||
SDLOS_TARGETOS = "unix"
|
||||
SYNC_IMPLEMENTATION = "tc"
|
||||
end
|
||||
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
BASE_TARGETOS = "win32"
|
||||
SDLOS_TARGETOS = "win32"
|
||||
SYNC_IMPLEMENTATION = "windows"
|
||||
end
|
||||
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
BASE_TARGETOS = "unix"
|
||||
SDLOS_TARGETOS = "macosx"
|
||||
SYNC_IMPLEMENTATION = "ntc"
|
||||
end
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/osdmodule.*",
|
||||
MAME_DIR .. "src/osd/osdmini/minidir.*",
|
||||
MAME_DIR .. "src/osd/osdmini/minifile.*",
|
||||
MAME_DIR .. "src/osd/osdmini/minimisc.*",
|
||||
MAME_DIR .. "src/osd/osdmini/minisync.*",
|
||||
MAME_DIR .. "src/osd/osdmini/minitime.*",
|
||||
MAME_DIR .. "src/osd/modules/sync/work_mini.*",
|
||||
}
|
7
scripts/src/osd/osdmini_cfg.lua
Normal file
7
scripts/src/osd/osdmini_cfg.lua
Normal file
@ -0,0 +1,7 @@
|
||||
defines {
|
||||
"OSD_MINI",
|
||||
"USE_QTDEBUG",
|
||||
"USE_SDL",
|
||||
"SDLMAME_NOASM=1",
|
||||
"USE_OPENGL=0",
|
||||
}
|
162
scripts/src/osd/sdl.lua
Normal file
162
scripts/src/osd/sdl.lua
Normal file
@ -0,0 +1,162 @@
|
||||
project ("osd_" .. _OPTIONS["osd"])
|
||||
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
|
||||
kind "StaticLib"
|
||||
|
||||
removeflags {
|
||||
"SingleOutputDir",
|
||||
}
|
||||
|
||||
options {
|
||||
"ForceCPP",
|
||||
}
|
||||
|
||||
dofile("sdl_cfg.lua")
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "src/osd/modules/render",
|
||||
MAME_DIR .. "3rdparty",
|
||||
MAME_DIR .. "3rdparty/winpcap/Include",
|
||||
MAME_DIR .. "3rdparty/bgfx/include",
|
||||
MAME_DIR .. "3rdparty/bx/include",
|
||||
MAME_DIR .. "src/osd/sdl",
|
||||
}
|
||||
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
files {
|
||||
MAME_DIR .. "src/osd/sdl/main.c",
|
||||
}
|
||||
end
|
||||
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
files {
|
||||
--MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.m",
|
||||
MAME_DIR .. "src/osd/modules/debugger/*.m",
|
||||
MAME_DIR .. "src/osd/modules/debugger/osx/*.m",
|
||||
MAME_DIR .. "src/osd/modules/debugger/osx/*.h",
|
||||
}
|
||||
end
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/osd/sdl/sdlmain.*",
|
||||
MAME_DIR .. "src/osd/sdl/input.*",
|
||||
MAME_DIR .. "src/osd/sdl/video.*",
|
||||
MAME_DIR .. "src/osd/sdl/window.*",
|
||||
MAME_DIR .. "src/osd/sdl/output.*",
|
||||
MAME_DIR .. "src/osd/sdl/watchdog.*",
|
||||
MAME_DIR .. "src/osd/modules/render/drawsdl.*",
|
||||
--ifeq ($(SDL_LIBVER),sdl2)
|
||||
MAME_DIR .. "src/osd/modules/render/draw13.*",
|
||||
--endif
|
||||
MAME_DIR .. "src/osd/modules/debugger/none.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/debugint.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/debugwin.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/debugqt.*",
|
||||
MAME_DIR .. "src/osd/modules/render/drawogl.*",
|
||||
MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.*",
|
||||
MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.*",
|
||||
}
|
||||
|
||||
if not (_OPTIONS["targetos"]=="macosx") then
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/debugger/qt/*.*",
|
||||
GEN_DIR .. "osd/modules/debugger/qt/*.*",
|
||||
}
|
||||
end
|
||||
|
||||
if (USE_BGFX == 1) then
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/render/drawbgfx.c",
|
||||
}
|
||||
end
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/lib/osdobj_common.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_sdl.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_windows.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_osx.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_none.*",
|
||||
MAME_DIR .. "src/osd/modules/netdev/taptun.*",
|
||||
MAME_DIR .. "src/osd/modules/netdev/pcap.*",
|
||||
MAME_DIR .. "src/osd/modules/netdev/none.*",
|
||||
MAME_DIR .. "src/osd/modules/midi/portmidi.*",
|
||||
MAME_DIR .. "src/osd/modules/midi/none.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/js_sound.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/direct_sound.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/sdl_sound.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/none.*",
|
||||
}
|
||||
|
||||
project ("ocore_" .. _OPTIONS["osd"])
|
||||
uuid (os.uuid("ocore_" .. _OPTIONS["osd"]))
|
||||
kind "StaticLib"
|
||||
|
||||
options {
|
||||
"ForceCPP",
|
||||
}
|
||||
|
||||
removeflags {
|
||||
"SingleOutputDir",
|
||||
}
|
||||
|
||||
dofile("sdl_cfg.lua")
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "src/osd/sdl",
|
||||
}
|
||||
|
||||
if _OPTIONS["targetos"]=="linux" then
|
||||
BASE_TARGETOS = "unix"
|
||||
SDLOS_TARGETOS = "unix"
|
||||
SYNC_IMPLEMENTATION = "tc"
|
||||
end
|
||||
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
BASE_TARGETOS = "win32"
|
||||
SDLOS_TARGETOS = "win32"
|
||||
SYNC_IMPLEMENTATION = "windows"
|
||||
end
|
||||
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
BASE_TARGETOS = "unix"
|
||||
SDLOS_TARGETOS = "macosx"
|
||||
SYNC_IMPLEMENTATION = "ntc"
|
||||
end
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/osdmodule.*",
|
||||
}
|
||||
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
files {
|
||||
MAME_DIR .. "src/osd/sdl/osxutils.m",
|
||||
}
|
||||
end
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/osd/sdl/strconv.*",
|
||||
MAME_DIR .. "src/osd/sdl/sdldir.*",
|
||||
MAME_DIR .. "src/osd/sdl/sdlfile.*",
|
||||
MAME_DIR .. "src/osd/sdl/sdlptty_" .. BASE_TARGETOS ..".*",
|
||||
MAME_DIR .. "src/osd/sdl/sdlsocket.*",
|
||||
MAME_DIR .. "src/osd/sdl/sdlos_" .. SDLOS_TARGETOS .. ".*",
|
||||
MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".*",
|
||||
MAME_DIR .. "src/osd/modules/sync/sync_" .. SYNC_IMPLEMENTATION .. ".*",
|
||||
--ifdef NOASM
|
||||
--MAME_DIR .. "src/osd/modules/sync/work_mini.*",
|
||||
--else
|
||||
MAME_DIR .. "src/osd/modules/sync/work_osd.*",
|
||||
}
|
||||
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
files {
|
||||
MAME_DIR .. "src/osd/sdl/osxutils.m",
|
||||
}
|
||||
end
|
83
scripts/src/osd/sdl_cfg.lua
Normal file
83
scripts/src/osd/sdl_cfg.lua
Normal file
@ -0,0 +1,83 @@
|
||||
--forcedincludes {
|
||||
-- MAME_DIR .. "src/osd/sdl/sdlprefix.h"
|
||||
--}
|
||||
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
defines {
|
||||
"OSD_SDL",
|
||||
"SDLMAME_WIN32",
|
||||
"X64_WINDOWS_ABI",
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"SDLMAME_SDL2=1",
|
||||
"USE_XINPUT=0",
|
||||
"USE_OPENGL=1",
|
||||
"USE_QTDEBUG=1",
|
||||
}
|
||||
|
||||
buildoptions {
|
||||
"-I$(shell qmake -query QT_INSTALL_HEADERS)/QtCore",
|
||||
"-I$(shell qmake -query QT_INSTALL_HEADERS)/QtGui",
|
||||
"-I$(shell qmake -query QT_INSTALL_HEADERS)",
|
||||
}
|
||||
|
||||
linkoptions{
|
||||
"-L$(shell qmake -query QT_INSTALL_LIBS)",
|
||||
}
|
||||
|
||||
links {
|
||||
"qtmain",
|
||||
"QtGui4",
|
||||
"QtCore4",
|
||||
}
|
||||
end
|
||||
|
||||
if _OPTIONS["targetos"]=="linux" then
|
||||
defines {
|
||||
"OSD_SDL",
|
||||
"SDLMAME_UNIX",
|
||||
"SDLMAME_X11",
|
||||
"SDLMAME_SDL2=1",
|
||||
"USE_XINPUT=0",
|
||||
"USE_OPENGL=1",
|
||||
"USE_QTDEBUG=1",
|
||||
}
|
||||
|
||||
if (USE_BGFX == 1) then
|
||||
defines {
|
||||
"USE_BGFX"
|
||||
}
|
||||
end
|
||||
|
||||
buildoptions {
|
||||
'$(shell pkg-config --cflags QtGui)',
|
||||
}
|
||||
|
||||
links {
|
||||
'QtGui',
|
||||
'QtCore',
|
||||
}
|
||||
|
||||
--linkoptions {
|
||||
-- '$(shell pkg-config --libs QtGui)',
|
||||
--}
|
||||
end
|
||||
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
defines {
|
||||
"OSD_SDL",
|
||||
"SDLMAME_UNIX",
|
||||
"SDLMAME_MACOSX",
|
||||
"SDLMAME_DARWIN",
|
||||
"SDLMAME_SDL2=1",
|
||||
"USE_XINPUT=0",
|
||||
"USE_OPENGL=1",
|
||||
"USE_QTDEBUG=0",
|
||||
}
|
||||
|
||||
if (USE_BGFX == 1) then
|
||||
defines {
|
||||
"USE_BGFX"
|
||||
}
|
||||
end
|
||||
end
|
131
scripts/src/osd/windows.lua
Normal file
131
scripts/src/osd/windows.lua
Normal file
@ -0,0 +1,131 @@
|
||||
project ("osd_" .. _OPTIONS["osd"])
|
||||
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
|
||||
kind "StaticLib"
|
||||
|
||||
removeflags {
|
||||
"SingleOutputDir",
|
||||
}
|
||||
|
||||
options {
|
||||
"ForceCPP",
|
||||
}
|
||||
|
||||
dofile("windows_cfg.lua")
|
||||
|
||||
defines {
|
||||
"DIRECTINPUT_VERSION=0x0800",
|
||||
"DIRECT3D_VERSION=0x0900",
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
MAME_DIR .. "src/osd/modules/render",
|
||||
MAME_DIR .. "3rdparty",
|
||||
MAME_DIR .. "3rdparty/winpcap/Include",
|
||||
MAME_DIR .. "3rdparty/bgfx/include",
|
||||
MAME_DIR .. "3rdparty/bx/include",
|
||||
}
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd/windows",
|
||||
}
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/render/drawd3d.c",
|
||||
MAME_DIR .. "src/osd/modules/render/d3d/d3d9intf.c",
|
||||
MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.c",
|
||||
MAME_DIR .. "src/osd/modules/render/drawdd.c",
|
||||
MAME_DIR .. "src/osd/modules/render/drawgdi.c",
|
||||
MAME_DIR .. "src/osd/modules/render/drawbgfx.c",
|
||||
MAME_DIR .. "src/osd/modules/render/drawnone.c",
|
||||
MAME_DIR .. "src/osd/windows/input.c",
|
||||
MAME_DIR .. "src/osd/windows/output.c",
|
||||
MAME_DIR .. "src/osd/windows/video.c",
|
||||
MAME_DIR .. "src/osd/windows/window.c",
|
||||
MAME_DIR .. "src/osd/windows/winmenu.c",
|
||||
MAME_DIR .. "src/osd/windows/winmain.c",
|
||||
MAME_DIR .. "src/osd/modules/debugger/none.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/debugint.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/debugwin.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/debugqt.*",
|
||||
MAME_DIR .. "src/osd/modules/debugger/win/*.*",
|
||||
MAME_DIR .. "src/osd/modules/render/drawogl.*",
|
||||
MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.*",
|
||||
MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.*",
|
||||
MAME_DIR .. "src/osd/modules/lib/osdobj_common.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_sdl.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_windows.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_osx.*",
|
||||
MAME_DIR .. "src/osd/modules/font/font_none.*",
|
||||
MAME_DIR .. "src/osd/modules/netdev/taptun.*",
|
||||
MAME_DIR .. "src/osd/modules/netdev/pcap.*",
|
||||
MAME_DIR .. "src/osd/modules/netdev/none.*",
|
||||
MAME_DIR .. "src/osd/modules/midi/portmidi.*",
|
||||
MAME_DIR .. "src/osd/modules/midi/none.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/js_sound.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/direct_sound.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/sdl_sound.*",
|
||||
MAME_DIR .. "src/osd/modules/sound/none.*",
|
||||
}
|
||||
|
||||
project ("ocore_" .. _OPTIONS["osd"])
|
||||
uuid (os.uuid("ocore_" .. _OPTIONS["osd"]))
|
||||
kind "StaticLib"
|
||||
|
||||
options {
|
||||
"ForceCPP",
|
||||
}
|
||||
removeflags {
|
||||
"SingleOutputDir",
|
||||
}
|
||||
|
||||
dofile("windows_cfg.lua")
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/emu",
|
||||
MAME_DIR .. "src/osd",
|
||||
MAME_DIR .. "src/lib",
|
||||
MAME_DIR .. "src/lib/util",
|
||||
}
|
||||
|
||||
--if _OPTIONS["targetos"]=="linux" then
|
||||
-- BASE_TARGETOS = "unix"
|
||||
-- SDLOS_TARGETOS = "unix"
|
||||
-- SYNC_IMPLEMENTATION = "tc"
|
||||
--end
|
||||
|
||||
--if _OPTIONS["targetos"]=="windows" then
|
||||
BASE_TARGETOS = "win32"
|
||||
SDLOS_TARGETOS = "win32"
|
||||
SYNC_IMPLEMENTATION = "windows"
|
||||
--end
|
||||
|
||||
--if _OPTIONS["targetos"]=="macosx" then
|
||||
-- BASE_TARGETOS = "unix"
|
||||
-- SDLOS_TARGETOS = "macosx"
|
||||
-- SYNC_IMPLEMENTATION = "ntc"
|
||||
--end
|
||||
|
||||
includedirs {
|
||||
MAME_DIR .. "src/osd/windows",
|
||||
MAME_DIR .. "src/lib/winpcap",
|
||||
}
|
||||
|
||||
files {
|
||||
MAME_DIR .. "src/osd/modules/osdmodule.*",
|
||||
MAME_DIR .. "src/osd/windows/main.c",
|
||||
MAME_DIR .. "src/osd/windows/strconv.c",
|
||||
MAME_DIR .. "src/osd/windows/windir.c",
|
||||
MAME_DIR .. "src/osd/windows/winfile.c",
|
||||
MAME_DIR .. "src/osd/modules/sync/sync_windows.c",
|
||||
MAME_DIR .. "src/osd/windows/winutf8.c",
|
||||
MAME_DIR .. "src/osd/windows/winutil.c",
|
||||
MAME_DIR .. "src/osd/windows/winclip.c",
|
||||
MAME_DIR .. "src/osd/windows/winsocket.c",
|
||||
MAME_DIR .. "src/osd/modules/sync/work_osd.c",
|
||||
MAME_DIR .. "src/osd/modules/lib/osdlib_win32.c",
|
||||
MAME_DIR .. "src/osd/windows/winptty.c",
|
||||
}
|
14
scripts/src/osd/windows_cfg.lua
Normal file
14
scripts/src/osd/windows_cfg.lua
Normal file
@ -0,0 +1,14 @@
|
||||
defines {
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"X64_WINDOWS_ABI",
|
||||
"OSD_WINDOWS",
|
||||
"USE_SDL=0",
|
||||
"USE_QTDEBUG=0",
|
||||
"USE_OPENGL=1",
|
||||
"USE_DISPATCH_GL=1",
|
||||
"DIRECTINPUT_VERSION=0x0800"
|
||||
}
|
||||
--forcedincludes {
|
||||
-- MAME_DIR .. "src/osd/windows/winprefix.h"
|
||||
--}
|
@ -1,99 +0,0 @@
|
||||
if _OPTIONS["osd"]=="windows" then
|
||||
defines {
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"X64_WINDOWS_ABI",
|
||||
"OSD_WINDOWS",
|
||||
"USE_SDL=0",
|
||||
"USE_QTDEBUG=0",
|
||||
"USE_OPENGL=1",
|
||||
"USE_DISPATCH_GL=1",
|
||||
"DIRECTINPUT_VERSION=0x0800"
|
||||
}
|
||||
--forcedincludes {
|
||||
-- MAME_DIR .. "src/osd/windows/winprefix.h"
|
||||
--}
|
||||
elseif _OPTIONS["osd"]=="sdl" then
|
||||
--forcedincludes {
|
||||
-- MAME_DIR .. "src/osd/sdl/sdlprefix.h"
|
||||
--}
|
||||
if _OPTIONS["targetos"]=="windows" then
|
||||
defines {
|
||||
"OSD_SDL",
|
||||
"SDLMAME_WIN32",
|
||||
"X64_WINDOWS_ABI",
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"SDLMAME_SDL2=1",
|
||||
"USE_XINPUT=0",
|
||||
"USE_OPENGL=1",
|
||||
"USE_QTDEBUG=1",
|
||||
}
|
||||
buildoptions {
|
||||
"-I$(shell qmake -query QT_INSTALL_HEADERS)/QtCore",
|
||||
"-I$(shell qmake -query QT_INSTALL_HEADERS)/QtGui",
|
||||
"-I$(shell qmake -query QT_INSTALL_HEADERS)",
|
||||
}
|
||||
|
||||
linkoptions{
|
||||
"-L$(shell qmake -query QT_INSTALL_LIBS)",
|
||||
}
|
||||
|
||||
links {
|
||||
"qtmain",
|
||||
"QtGui4",
|
||||
"QtCore4",
|
||||
}
|
||||
end
|
||||
if _OPTIONS["targetos"]=="linux" then
|
||||
defines {
|
||||
"OSD_SDL",
|
||||
"SDLMAME_UNIX",
|
||||
"SDLMAME_X11",
|
||||
"SDLMAME_SDL2=1",
|
||||
"USE_XINPUT=0",
|
||||
"USE_OPENGL=1",
|
||||
"USE_QTDEBUG=1",
|
||||
}
|
||||
if (USE_BGFX == 1) then
|
||||
defines {
|
||||
"USE_BGFX"
|
||||
}
|
||||
end
|
||||
buildoptions {
|
||||
'$(shell pkg-config --cflags QtGui)',
|
||||
}
|
||||
links {
|
||||
'QtGui',
|
||||
'QtCore',
|
||||
}
|
||||
--linkoptions {
|
||||
-- '$(shell pkg-config --libs QtGui)',
|
||||
--}
|
||||
end
|
||||
if _OPTIONS["targetos"]=="macosx" then
|
||||
defines {
|
||||
"OSD_SDL",
|
||||
"SDLMAME_UNIX",
|
||||
"SDLMAME_MACOSX",
|
||||
"SDLMAME_DARWIN",
|
||||
"SDLMAME_SDL2=1",
|
||||
"USE_XINPUT=0",
|
||||
"USE_OPENGL=1",
|
||||
"USE_QTDEBUG=0",
|
||||
}
|
||||
if (USE_BGFX == 1) then
|
||||
defines {
|
||||
"USE_BGFX"
|
||||
}
|
||||
end
|
||||
end
|
||||
elseif _OPTIONS["osd"]=="osdmini" then
|
||||
defines {
|
||||
"OSD_MINI",
|
||||
"USE_QTDEBUG",
|
||||
"USE_SDL",
|
||||
"SDLMAME_NOASM=1",
|
||||
"USE_OPENGL=0",
|
||||
}
|
||||
end
|
@ -170,10 +170,12 @@ void osd_common_t::register_options()
|
||||
#ifdef SDLMAME_MACOSX
|
||||
REGISTER_MODULE(m_mod_man, DEBUG_OSX);
|
||||
#endif
|
||||
#ifndef OSD_MINI
|
||||
REGISTER_MODULE(m_mod_man, DEBUG_WINDOWS);
|
||||
REGISTER_MODULE(m_mod_man, DEBUG_QT);
|
||||
REGISTER_MODULE(m_mod_man, DEBUG_INTERNAL);
|
||||
REGISTER_MODULE(m_mod_man, DEBUG_NONE);
|
||||
#endif
|
||||
|
||||
REGISTER_MODULE(m_mod_man, NETDEV_TAPTUN);
|
||||
REGISTER_MODULE(m_mod_man, NETDEV_PCAP);
|
||||
|
@ -81,3 +81,21 @@ char *osd_get_clipboard_text(void)
|
||||
// can't support clipboards generically
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//============================================================
|
||||
// osd_getenv
|
||||
//============================================================
|
||||
|
||||
const char *osd_getenv(const char *name)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//============================================================
|
||||
// osd_setenv
|
||||
//============================================================
|
||||
|
||||
int osd_setenv(const char *name, const char *value, int overwrite)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user