diff options
Diffstat (limited to 'docs/release/scripts/src/osd')
-rw-r--r-- | docs/release/scripts/src/osd/modules.lua | 462 | ||||
-rw-r--r-- | docs/release/scripts/src/osd/newui.lua | 232 | ||||
-rw-r--r-- | docs/release/scripts/src/osd/osdmini.lua | 130 | ||||
-rw-r--r-- | docs/release/scripts/src/osd/osdmini_cfg.lua | 12 | ||||
-rw-r--r-- | docs/release/scripts/src/osd/sdl.lua | 588 | ||||
-rw-r--r-- | docs/release/scripts/src/osd/sdl_cfg.lua | 165 | ||||
-rw-r--r-- | docs/release/scripts/src/osd/windows.lua | 304 | ||||
-rw-r--r-- | docs/release/scripts/src/osd/windows_cfg.lua | 62 | ||||
-rw-r--r-- | docs/release/scripts/src/osd/winui.lua | 273 | ||||
-rw-r--r-- | docs/release/scripts/src/osd/winui_cfg.lua | 25 |
10 files changed, 2253 insertions, 0 deletions
diff --git a/docs/release/scripts/src/osd/modules.lua b/docs/release/scripts/src/osd/modules.lua new file mode 100644 index 00000000000..1dfa4317a48 --- /dev/null +++ b/docs/release/scripts/src/osd/modules.lua @@ -0,0 +1,462 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +--------------------------------------------------------------------------- +-- +-- modules.lua +-- +-- Rules for the building of modules +-- +--------------------------------------------------------------------------- + +function string.starts(String,Start) + return string.sub(String,1,string.len(Start))==Start +end + +function addlibfromstring(str) + if (str==nil) then return end + for w in str:gmatch("%S+") do + if string.starts(w,"-l")==true then + links { + string.sub(w,3) + } + end + end +end + +function addoptionsfromstring(str) + if (str==nil) then return end + for w in str:gmatch("%S+") do + if string.starts(w,"-l")==false then + linkoptions { + w + } + end + end +end + +function osdmodulesbuild() + + removeflags { + "SingleOutputDir", + } + + files { + MAME_DIR .. "src/osd/osdnet.cpp", + MAME_DIR .. "src/osd/osdnet.h", + MAME_DIR .. "src/osd/modules/debugger/debug_module.h", + MAME_DIR .. "src/osd/modules/font/font_module.h", + MAME_DIR .. "src/osd/modules/midi/midi_module.h", + MAME_DIR .. "src/osd/modules/netdev/netdev_module.h", + MAME_DIR .. "src/osd/modules/sound/sound_module.h", + MAME_DIR .. "src/osd/modules/lib/osdobj_common.cpp", + MAME_DIR .. "src/osd/modules/lib/osdobj_common.h", + 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/font/font_sdl.cpp", + MAME_DIR .. "src/osd/modules/font/font_windows.cpp", + MAME_DIR .. "src/osd/modules/font/font_osx.cpp", + MAME_DIR .. "src/osd/modules/font/font_none.cpp", + MAME_DIR .. "src/osd/modules/netdev/taptun.cpp", + MAME_DIR .. "src/osd/modules/netdev/pcap.cpp", + MAME_DIR .. "src/osd/modules/netdev/none.cpp", + MAME_DIR .. "src/osd/modules/midi/portmidi.cpp", + MAME_DIR .. "src/osd/modules/midi/none.cpp", + MAME_DIR .. "src/osd/modules/sound/js_sound.cpp", + 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", + } + + if _OPTIONS["targetos"]=="windows" then + includedirs { + MAME_DIR .. "3rdparty/winpcap/Include", + } + end + + if _OPTIONS["NO_OPENGL"]=="1" then + defines { + "USE_OPENGL=0", + } + else + files { + MAME_DIR .. "src/osd/modules/render/drawogl.cpp", + MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.cpp", + MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.cpp", + MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.h", + MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.h", + MAME_DIR .. "src/osd/modules/opengl/osd_opengl.h", + } + defines { + "USE_OPENGL=1", + } + if _OPTIONS["USE_DISPATCH_GL"]=="1" then + defines { + "USE_DISPATCH_GL=1", + } + end + end + + files { + MAME_DIR .. "src/osd/modules/render/drawbgfx.cpp", + MAME_DIR .. "src/osd/modules/render/binpacker.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/blendreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/cullreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/depthreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/effect.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/effectmanager.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/effectreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/chain.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/chainreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/chainentry.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/chainentryreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/inputpair.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/shadermanager.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/statereader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/slider.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/sliderreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/parameter.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/paramreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/target.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/targetmanager.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/texture.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/texturemanager.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/uniform.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/uniformreader.cpp", + MAME_DIR .. "src/osd/modules/render/bgfx/writereader.cpp", + } + includedirs { + MAME_DIR .. "3rdparty/bgfx/include", + MAME_DIR .. "3rdparty/bx/include", + MAME_DIR .. "3rdparty/rapidjson/include", + } + + if _OPTIONS["NO_USE_MIDI"]=="1" then + defines { + "NO_USE_MIDI", + } + 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", + MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.h", + MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.h", + MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.h", + MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.h", + MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.h", + MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.h", + MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.cpp", + MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.h", + MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.h", + GEN_DIR .. "osd/modules/debugger/qt/debuggerview.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/windowqt.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/logwindow.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/dasmwindow.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/mainwindow.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/memorywindow.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/breakpointswindow.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/deviceswindow.moc.cpp", + GEN_DIR .. "osd/modules/debugger/qt/deviceinformationwindow.moc.cpp", + } + defines { + "USE_QTDEBUG=1", + } + + local MOC = "" + if (os.is("windows")) then + MOC = "moc" + else + if _OPTIONS["QT_HOME"]~=nil then + QMAKETST = backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake --version 2>/dev/null") + if (QMAKETST=='') then + print("Qt's Meta Object Compiler (moc) wasn't found!") + os.exit(1) + end + MOC = _OPTIONS["QT_HOME"] .. "/bin/moc" + 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 + 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 $(@)" }}, + { MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.h", GEN_DIR .. "osd/modules/debugger/qt/logwindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, + { MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.h", GEN_DIR .. "osd/modules/debugger/qt/dasmwindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, + { MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.h", GEN_DIR .. "osd/modules/debugger/qt/mainwindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, + { MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.h", GEN_DIR .. "osd/modules/debugger/qt/memorywindow.moc.cpp", { }, { MOC .. "$(MOCINCPATH) $(<) -o $(@)" }}, + { 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 { + "-I$(shell qmake -query QT_INSTALL_HEADERS)", + } + configuration { } + elseif _OPTIONS["targetos"]=="macosx" then + buildoptions { + "-F" .. backtick("qmake -query QT_INSTALL_LIBS"), + } + else + if _OPTIONS["QT_HOME"]~=nil then + buildoptions { + "-I" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_HEADERS"), + } + else + buildoptions { + backtick("pkg-config --cflags Qt5Widgets"), + } + end + end + else + defines { + "USE_QTDEBUG=0", + } + end + +end + + +function osdmodulestargetconf() + + if _OPTIONS["NO_OPENGL"]~="1" then + if _OPTIONS["targetos"]=="macosx" then + links { + "OpenGL.framework", + } + elseif _OPTIONS["USE_DISPATCH_GL"]~="1" then + if _OPTIONS["targetos"]=="windows" then + links { + "opengl32", + } + else + links { + "GL", + } + end + end + end + + if _OPTIONS["NO_USE_MIDI"]~="1" then + if _OPTIONS["targetos"]=="linux" then + local str = backtick("pkg-config --libs alsa") + addlibfromstring(str) + addoptionsfromstring(str) + elseif _OPTIONS["targetos"]=="macosx" then + links { + "CoreMIDI.framework", + } + end + end + + if _OPTIONS["USE_QTDEBUG"]=="1" then + if _OPTIONS["targetos"]=="windows" then + linkoptions { + "-L$(shell qmake -query QT_INSTALL_LIBS)", + } + links { + "qtmain", + "Qt5Core.dll", + "Qt5Gui.dll", + "Qt5Widgets.dll", + } + elseif _OPTIONS["targetos"]=="macosx" then + linkoptions { + "-F" .. backtick("qmake -query QT_INSTALL_LIBS"), + } + links { + "Qt5Core.framework", + "Qt5Gui.framework", + "Qt5Widgets.framework", + } + else + if _OPTIONS["QT_HOME"]~=nil then + linkoptions { + "-L" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_LIBS"), + } + links { + "Qt5Core", + "Qt5Gui", + "Qt5Widgets", + } + else + local str = backtick("pkg-config --libs Qt5Widgets") + addlibfromstring(str) + addoptionsfromstring(str) + end + end + end + + if _OPTIONS["targetos"]=="windows" then + links { + "gdi32", + "dsound", + "dxguid", + } + elseif _OPTIONS["targetos"]=="macosx" then + links { + "AudioUnit.framework", + "AudioToolbox.framework", + "CoreAudio.framework", + "CoreServices.framework", + } + end + +end + + +newoption { + trigger = "DONT_USE_NETWORK", + description = "Disable network access", +} + +newoption { + trigger = "NO_OPENGL", + description = "Disable use of OpenGL", + allowed = { + { "0", "Enable OpenGL" }, + { "1", "Disable OpenGL" }, + }, +} + +newoption { + trigger = "USE_DISPATCH_GL", + description = "Use GL-dispatching", + allowed = { + { "0", "Link to OpenGL library" }, + { "1", "Use GL-dispatching" }, + }, +} + +if not _OPTIONS["USE_DISPATCH_GL"] then + _OPTIONS["USE_DISPATCH_GL"] = "0" +end + +newoption { + trigger = "NO_USE_MIDI", + description = "Disable MIDI I/O", + allowed = { + { "0", "Enable MIDI" }, + { "1", "Disable MIDI" }, + }, +} + +if not _OPTIONS["NO_USE_MIDI"] then + if _OPTIONS["targetos"]=="freebsd" or _OPTIONS["targetos"]=="openbsd" or _OPTIONS["targetos"]=="netbsd" or _OPTIONS["targetos"]=="solaris" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"] == "asmjs" or _OPTIONS["targetos"] == "os2" then + _OPTIONS["NO_USE_MIDI"] = "1" + else + _OPTIONS["NO_USE_MIDI"] = "0" + end +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 = { + { "0", "Don't use Qt debugger" }, + { "1", "Use Qt debugger" }, + }, +} + +newoption { + trigger = "QT_HOME", + description = "QT lib location", +} + + +if not _OPTIONS["USE_QTDEBUG"] then + if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="solaris" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"] == "asmjs" or _OPTIONS["targetos"] == "os2" then + _OPTIONS["USE_QTDEBUG"] = "0" + else + _OPTIONS["USE_QTDEBUG"] = "1" + end +end diff --git a/docs/release/scripts/src/osd/newui.lua b/docs/release/scripts/src/osd/newui.lua new file mode 100644 index 00000000000..c8451ed90a9 --- /dev/null +++ b/docs/release/scripts/src/osd/newui.lua @@ -0,0 +1,232 @@ +dofile("modules.lua") + +premake.make.linkoptions_after = false; + +function maintargetosdoptions(_target,_subtarget) + osdmodulestargetconf() + + configuration { "mingw*-gcc" } + linkoptions { + "-municode", + } + + configuration { } + + if _OPTIONS["DIRECTINPUT"] == "8" then + links { + "dinput8", + } + else + links { + "dinput", + } + end + + links { + "comctl32", + "comdlg32", + "psapi", + } + +-- needs same resources as messui, because dropdown menus are in mameui.rc + override_resources = true; + local rcfile = MAME_DIR .. "src/osd/winui/" .. _subtarget .. ".rc" + local uifile = MAME_DIR .. "src/osd/winui/" .. _subtarget .. "ui.rc" + + if not os.isfile(rcfile) then + print(string.format("***** %s not found *****",rcfile)) + os.exit(); + end + + if not os.isfile(uifile) then + print(string.format("***** %s not found *****",uifile)) + os.exit(); + end + + files { + rcfile, + } + dependency { + { "$(OBJDIR)/".._subtarget..".res" , GEN_DIR .. "/resource/".._subtarget.."vers.rc", true }, + } +end + + +newoption { + trigger = "DIRECTINPUT", + description = "Minimum DirectInput version to support", + allowed = { + { "7", "Support DirectInput 7 or later" }, + { "8", "Support DirectInput 8 or later" }, + }, +} + +if not _OPTIONS["DIRECTINPUT"] then + _OPTIONS["DIRECTINPUT"] = "8" +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 "StaticLib" + + dofile("winui_cfg.lua") + osdmodulesbuild() + + defines { + "DIRECT3D_VERSION=0x0900", + } + + if _OPTIONS["DIRECTINPUT"] == "8" then + defines { + "DIRECTINPUT_VERSION=0x0800", + } + else + defines { + "DIRECTINPUT_VERSION=0x0700", + } + end + + includedirs { + MAME_DIR .. "src/emu", + MAME_DIR .. "src/devices", + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + MAME_DIR .. "src/osd/modules/render", + MAME_DIR .. "3rdparty", + } + + includedirs { + MAME_DIR .. "src/osd/windows", + } + + files { + MAME_DIR .. "src/osd/modules/render/drawd3d.cpp", + MAME_DIR .. "src/osd/modules/render/d3d/d3d9intf.cpp", + MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.cpp", + MAME_DIR .. "src/osd/modules/render/drawgdi.cpp", + MAME_DIR .. "src/osd/modules/render/drawnone.cpp", + MAME_DIR .. "src/osd/windows/input.cpp", + MAME_DIR .. "src/osd/windows/output.cpp", + MAME_DIR .. "src/osd/windows/video.cpp", + MAME_DIR .. "src/osd/windows/window.cpp", + MAME_DIR .. "src/osd/modules/osdwindow.cpp", + MAME_DIR .. "src/osd/modules/osdwindow.h", + MAME_DIR .. "src/osd/winui/newui.cpp", + MAME_DIR .. "src/osd/windows/winmain.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/debugbaseinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/debugviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/debugwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/disasmbasewininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/disasmviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/disasmwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/editwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/logwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/memoryviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/memorywininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/pointswininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/uimetrics.cpp", + } + + +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", + } + + BASE_TARGETOS = "win32" + SDLOS_TARGETOS = "win32" + SYNC_IMPLEMENTATION = "windows" + + includedirs { + MAME_DIR .. "src/osd/windows", + MAME_DIR .. "src/lib/winpcap", + } + + files { + MAME_DIR .. "src/osd/osdcore.cpp", + MAME_DIR .. "src/osd/strconv.cpp", + MAME_DIR .. "src/osd/windows/main.cpp", + MAME_DIR .. "src/osd/windows/windir.cpp", + MAME_DIR .. "src/osd/windows/winfile.cpp", + MAME_DIR .. "src/osd/modules/sync/sync_windows.cpp", + MAME_DIR .. "src/osd/windows/winutf8.cpp", + MAME_DIR .. "src/osd/windows/winutil.cpp", + MAME_DIR .. "src/osd/windows/winclip.cpp", + MAME_DIR .. "src/osd/windows/winsocket.cpp", + MAME_DIR .. "src/osd/windows/winptty.cpp", + MAME_DIR .. "src/osd/modules/osdmodule.cpp", + MAME_DIR .. "src/osd/modules/lib/osdlib_win32.cpp", + } + + if _OPTIONS["NOASM"]=="1" then + files { + MAME_DIR .. "src/osd/modules/sync/work_mini.cpp", + } + else + files { + MAME_DIR .. "src/osd/modules/sync/work_osd.cpp", + } + end + + +-------------------------------------------------- +-- ledutil +-------------------------------------------------- + +if _OPTIONS["with-tools"] then + project("ledutil") + uuid ("061293ca-7290-44ac-b2b5-5913ae8dc9c0") + kind "ConsoleApp" + + options { + "ForceCPP", + } + + targetdir(MAME_DIR) + + links { + "ocore_" .. _OPTIONS["osd"], + } + + includedirs { + MAME_DIR .. "src/osd", + } + + files { + MAME_DIR .. "src/osd/windows/ledutil.cpp", + } +end diff --git a/docs/release/scripts/src/osd/osdmini.lua b/docs/release/scripts/src/osd/osdmini.lua new file mode 100644 index 00000000000..b05839e7873 --- /dev/null +++ b/docs/release/scripts/src/osd/osdmini.lua @@ -0,0 +1,130 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +--------------------------------------------------------------------------- +-- +-- osdmini.lua +-- +-- Rules for the building of osdmini +-- +--------------------------------------------------------------------------- + +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"])) + kind (LIBTYPE) + + removeflags { + "SingleOutputDir", + } + + 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/osdnet.cpp", + MAME_DIR .. "src/osd/osdnet.h", + MAME_DIR .. "src/osd/osdmini/minimain.cpp", + MAME_DIR .. "src/osd/osdmini/osdmini.h", + MAME_DIR .. "src/osd/osdepend.h", + MAME_DIR .. "src/osd/modules/lib/osdobj_common.cpp", + MAME_DIR .. "src/osd/modules/lib/osdobj_common.h", + 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", + MAME_DIR .. "src/osd/modules/font/font_none.cpp", + MAME_DIR .. "src/osd/modules/netdev/taptun.cpp", + MAME_DIR .. "src/osd/modules/netdev/pcap.cpp", + MAME_DIR .. "src/osd/modules/netdev/none.cpp", + MAME_DIR .. "src/osd/modules/midi/portmidi.cpp", + MAME_DIR .. "src/osd/modules/midi/none.cpp", + MAME_DIR .. "src/osd/modules/sound/js_sound.cpp", + 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/none.cpp", + MAME_DIR .. "src/osd/modules/sound/xaudio2_sound.cpp", + } + +project ("ocore_" .. _OPTIONS["osd"]) + uuid (os.uuid("ocore_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + 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/osdcore.cpp", + MAME_DIR .. "src/osd/osdcore.h", + MAME_DIR .. "src/osd/modules/osdmodule.cpp", + MAME_DIR .. "src/osd/modules/osdmodule.h", + 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/minitime.cpp", + MAME_DIR .. "src/osd/modules/sync/work_mini.cpp", + } diff --git a/docs/release/scripts/src/osd/osdmini_cfg.lua b/docs/release/scripts/src/osd/osdmini_cfg.lua new file mode 100644 index 00000000000..586075d3cac --- /dev/null +++ b/docs/release/scripts/src/osd/osdmini_cfg.lua @@ -0,0 +1,12 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +defines { + "OSD_MINI", + "USE_QTDEBUG=0", + "USE_SDL", + "SDLMAME_NOASM=1", + "USE_OPENGL=0", + "NO_USE_MIDI=1", + "USE_XAUDIO2=0", +} diff --git a/docs/release/scripts/src/osd/sdl.lua b/docs/release/scripts/src/osd/sdl.lua new file mode 100644 index 00000000000..76947ad777a --- /dev/null +++ b/docs/release/scripts/src/osd/sdl.lua @@ -0,0 +1,588 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +--------------------------------------------------------------------------- +-- +-- sdl.lua +-- +-- Rules for the building with SDL +-- +--------------------------------------------------------------------------- + +dofile("modules.lua") + + +function maintargetosdoptions(_target,_subtarget) + osdmodulestargetconf() + + if _OPTIONS["USE_DISPATCH_GL"]~="1" and _OPTIONS["MESA_INSTALL_ROOT"] then + libdirs { + path.join(_OPTIONS["MESA_INSTALL_ROOT"],"lib"), + } + linkoptions { + "-Wl,-rpath=" .. path.join(_OPTIONS["MESA_INSTALL_ROOT"],"lib"), + } + end + + if _OPTIONS["NO_X11"]~="1" then + links { + "X11", + "Xinerama", + } + end + + if _OPTIONS["NO_USE_XINPUT"]~="1" then + links { + "Xext", + "Xi", + } + end + + if BASE_TARGETOS=="unix" and _OPTIONS["targetos"]~="macosx" then + links { + "SDL2_ttf", + } + local str = backtick("pkg-config --libs fontconfig") + addlibfromstring(str) + addoptionsfromstring(str) + end + + if _OPTIONS["targetos"]=="windows" then + if _OPTIONS["USE_LIBSDL"]~="1" then + configuration { "mingw*"} + links { + "SDL2.dll", + } + configuration { "x64","vs*" } + libdirs { + MAME_DIR .. "3rdparty/sdl2/lib/x64", + } + configuration { "x32","vs*" } + libdirs { + MAME_DIR .. "3rdparty/sdl2/lib/x86", + } + + configuration { "vs*"} + links { + "SDL2", + } + configuration { } + else + local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'") + addlibfromstring(str) + addoptionsfromstring(str) + end + links { + "psapi", + } + + configuration { "mingw*-gcc" } + linkoptions{ + "-municode", + } + configuration { "vs*" } + flags { + "Unicode", + } + configuration { "x32", "vs*" } + libdirs { + path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x86") + } + configuration { "x64", "vs*" } + libdirs { + path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64") + } + configuration {} + elseif _OPTIONS["targetos"]=="haiku" then + links { + "network", + "bsd", + } + end + + configuration { "mingw*" or "vs*" } + targetprefix "sdl" + links { + "psapi" + } + + configuration { } +end + + +function sdlconfigcmd() + if _OPTIONS["targetos"]=="asmjs" then + return "sdl2-config" + elseif not _OPTIONS["SDL_INSTALL_ROOT"] then + return _OPTIONS['TOOLCHAIN'] .. "pkg-config sdl2" + else + return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin","sdl2") .. "-config" + end +end + + +newoption { + trigger = "MESA_INSTALL_ROOT", + description = "link against specific GL-Library - also adds rpath to executable (overridden by USE_DISPATCH_GL)", +} + +newoption { + trigger = "SDL_INI_PATH", + description = "Default search path for .ini files", +} + +newoption { + trigger = "NO_X11", + description = "Disable use of X11", + allowed = { + { "0", "Enable X11" }, + { "1", "Disable X11" }, + }, +} + +if not _OPTIONS["NO_X11"] then + if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" or _OPTIONS["targetos"]=="os2" then + _OPTIONS["NO_X11"] = "1" + else + _OPTIONS["NO_X11"] = "0" + end +end + +newoption { + trigger = "NO_USE_XINPUT", + description = "Disable use of Xinput", + allowed = { + { "0", "Enable Xinput" }, + { "1", "Disable Xinput" }, + }, +} + +if not _OPTIONS["NO_USE_XINPUT"] then + _OPTIONS["NO_USE_XINPUT"] = "1" +end + +newoption { + trigger = "SDL2_MULTIAPI", + description = "Use couriersud's multi-keyboard patch for SDL 2.1? (this API was removed prior to the 2.0 release)", + allowed = { + { "0", "Use single-keyboard API" }, + { "1", "Use multi-keyboard API" }, + }, +} + +if not _OPTIONS["SDL2_MULTIAPI"] then + _OPTIONS["SDL2_MULTIAPI"] = "0" +end + +newoption { + trigger = "SDL_INSTALL_ROOT", + description = "Equivalent to the ./configure --prefix=<path>", +} + +newoption { + trigger = "SDL_FRAMEWORK_PATH", + description = "Location of SDL framework for custom OS X installations", +} + +if not _OPTIONS["SDL_FRAMEWORK_PATH"] then + _OPTIONS["SDL_FRAMEWORK_PATH"] = "/Library/Frameworks/" +end + +newoption { + trigger = "USE_LIBSDL", + description = "Use SDL library on OS (rather than framework/dll)", + allowed = { + { "0", "Use framework/dll" }, + { "1", "Use library" }, + }, +} + +if not _OPTIONS["USE_LIBSDL"] then + _OPTIONS["USE_LIBSDL"] = "0" +end + + +BASE_TARGETOS = "unix" +SDLOS_TARGETOS = "unix" +SYNC_IMPLEMENTATION = "tc" +SDL_NETWORK = "" +if _OPTIONS["targetos"]=="linux" then + SDL_NETWORK = "taptun" +elseif _OPTIONS["targetos"]=="openbsd" then + SYNC_IMPLEMENTATION = "ntc" +elseif _OPTIONS["targetos"]=="netbsd" then + SYNC_IMPLEMENTATION = "ntc" + SDL_NETWORK = "pcap" +elseif _OPTIONS["targetos"]=="haiku" then + SYNC_IMPLEMENTATION = "ntc" +elseif _OPTIONS["targetos"]=="asmjs" then + SYNC_IMPLEMENTATION = "mini" +elseif _OPTIONS["targetos"]=="windows" then + BASE_TARGETOS = "win32" + SDLOS_TARGETOS = "win32" + SYNC_IMPLEMENTATION = "windows" + SDL_NETWORK = "pcap" +elseif _OPTIONS["targetos"]=="macosx" then + SDLOS_TARGETOS = "macosx" + SYNC_IMPLEMENTATION = "ntc" + SDL_NETWORK = "pcap" +elseif _OPTIONS["targetos"]=="os2" then + BASE_TARGETOS = "os2" + SDLOS_TARGETOS = "os2" + SYNC_IMPLEMENTATION = "os2" +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["USE_LIBSDL"]~="1" then + linkoptions { + "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"], + } + links { + "SDL2.framework", + } + else + local str = backtick(sdlconfigcmd() .. " --libs --static | sed 's/-lSDLmain//'") + addlibfromstring(str) + addoptionsfromstring(str) + end + else + if _OPTIONS["NO_X11"]=="1" then + _OPTIONS["USE_QTDEBUG"] = "0" + else + libdirs { + "/usr/X11/lib", + "/usr/X11R6/lib", + "/usr/openwin/lib", + } + end + local str = backtick(sdlconfigcmd() .. " --libs") + addlibfromstring(str) + addoptionsfromstring(str) + if _OPTIONS["targetos"]~="haiku" then + links { + "m", + "pthread", + } + if _OPTIONS["targetos"]=="solaris" then + links { + "socket", + "nsl", + } + else + links { + "util", + } + end + end + end +elseif BASE_TARGETOS=="os2" then + local str = backtick(sdlconfigcmd() .. " --libs") + addlibfromstring(str) + addoptionsfromstring(str) + links { + "pthread" + } +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"]) + uuid (os.uuid("osd_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + dofile("sdl_cfg.lua") + osdmodulesbuild() + + 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", + MAME_DIR .. "src/osd/sdl", + } + + if _OPTIONS["targetos"]=="windows" then + files { + MAME_DIR .. "src/osd/sdl/main.cpp", + } + end + + if _OPTIONS["targetos"]=="macosx" then + files { + MAME_DIR .. "src/osd/modules/debugger/debugosx.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/breakpointsview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/breakpointsview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/consoleview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/consoleview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugcommandhistory.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/debugcommandhistory.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugconsole.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/debugconsole.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/debugview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/debugwindowhandler.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/debugwindowhandler.h", + MAME_DIR .. "src/osd/modules/debugger/osx/deviceinfoviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/deviceinfoviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/devicesviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/devicesviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/errorlogview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/errorlogview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/errorlogviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/errorlogviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/memoryview.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/memoryview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/memoryviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/memoryviewer.h", + MAME_DIR .. "src/osd/modules/debugger/osx/pointsviewer.mm", + MAME_DIR .. "src/osd/modules/debugger/osx/pointsviewer.h", + 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/debugosx.h", + } + end + + files { + MAME_DIR .. "src/osd/sdl/osdsdl.h", + MAME_DIR .. "src/osd/sdl/sdlinc.h", + MAME_DIR .. "src/osd/sdl/sdlprefix.h", + MAME_DIR .. "src/osd/sdl/sdlmain.cpp", + MAME_DIR .. "src/osd/osdepend.h", + MAME_DIR .. "src/osd/sdl/input.cpp", + MAME_DIR .. "src/osd/sdl/input.h", + MAME_DIR .. "src/osd/sdl/video.cpp", + MAME_DIR .. "src/osd/sdl/video.h", + MAME_DIR .. "src/osd/sdl/window.cpp", + MAME_DIR .. "src/osd/sdl/window.h", + MAME_DIR .. "src/osd/modules/osdwindow.cpp", + MAME_DIR .. "src/osd/modules/osdwindow.h", + MAME_DIR .. "src/osd/sdl/output.cpp", + MAME_DIR .. "src/osd/sdl/watchdog.cpp", + MAME_DIR .. "src/osd/sdl/watchdog.h", + MAME_DIR .. "src/osd/modules/render/drawsdl.cpp", + } + files { + MAME_DIR .. "src/osd/modules/render/draw13.cpp", + MAME_DIR .. "src/osd/modules/render/blit13.h", + } + + +project ("ocore_" .. _OPTIONS["osd"]) + targetsubdir(_OPTIONS["target"] .."_" .. _OPTIONS["subtarget"]) + uuid (os.uuid("ocore_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + 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", + } + + files { + MAME_DIR .. "src/osd/osdcore.cpp", + MAME_DIR .. "src/osd/osdcore.h", + MAME_DIR .. "src/osd/strconv.cpp", + MAME_DIR .. "src/osd/strconv.h", + MAME_DIR .. "src/osd/sdl/sdldir.cpp", + MAME_DIR .. "src/osd/sdl/sdlfile.cpp", + MAME_DIR .. "src/osd/sdl/sdlfile.h", + MAME_DIR .. "src/osd/sdl/sdlptty_" .. BASE_TARGETOS ..".cpp", + 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/lib/osdlib_" .. SDLOS_TARGETOS .. ".cpp", + MAME_DIR .. "src/osd/modules/lib/osdlib.h", + MAME_DIR .. "src/osd/modules/sync/sync_" .. SYNC_IMPLEMENTATION .. ".cpp", + MAME_DIR .. "src/osd/modules/sync/osdsync.h", + } + + if _OPTIONS["NOASM"]=="1" then + files { + MAME_DIR .. "src/osd/modules/sync/work_mini.cpp", + } + else + files { + MAME_DIR .. "src/osd/modules/sync/work_osd.cpp", + } + end + + if _OPTIONS["targetos"]=="macosx" then + files { + MAME_DIR .. "src/osd/sdl/osxutils.h", + MAME_DIR .. "src/osd/sdl/osxutils.mm", + } + end + + +-------------------------------------------------- +-- testkeys +-------------------------------------------------- + +if _OPTIONS["with-tools"] then + project("testkeys") + uuid ("744cec21-c3b6-4d69-93cb-6811fed0ffe3") + kind "ConsoleApp" + + flags { + "Symbols", -- always include minimum symbols for executables + } + + dofile("sdl_cfg.lua") + + includedirs { + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib/util", + } + + if _OPTIONS["SEPARATE_BIN"]~="1" then + targetdir(MAME_DIR) + end + + links { + "utils", + "ocore_" .. _OPTIONS["osd"], + } + + files { + MAME_DIR .. "src/osd/sdl/testkeys.cpp", + } + + if _OPTIONS["targetos"] == "windows" then + if _OPTIONS["USE_LIBSDL"]~="1" then + configuration { "mingw*"} + links { + "SDL2.dll", + } + configuration { "x64","vs*" } + libdirs { + MAME_DIR .. "3rdparty/sdl2/lib/x64", + } + configuration { "x32","vs*" } + libdirs { + MAME_DIR .. "3rdparty/sdl2/lib/x86", + } + configuration { "vs*"} + links { + "SDL2", + } + configuration { } + else + local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'") + addlibfromstring(str) + addoptionsfromstring(str) + end + links { + "psapi", + } + linkoptions{ + "-municode", + } + files { + MAME_DIR .. "src/osd/sdl/main.cpp", + } + end + + configuration { "mingw*" or "vs*" } + targetextension ".exe" + + configuration { } + + strip() +end + + +-------------------------------------------------- +-- aueffectutil +-------------------------------------------------- + +if _OPTIONS["targetos"] == "macosx" and _OPTIONS["with-tools"] then + project("aueffectutil") + uuid ("3db8316d-fad7-4f5b-b46a-99373c91550e") + kind "ConsoleApp" + + flags { + "Symbols", -- always include minimum symbols for executables + } + + dofile("sdl_cfg.lua") + + if _OPTIONS["SEPARATE_BIN"]~="1" then + targetdir(MAME_DIR) + end + + linkoptions { + "-sectcreate __TEXT __info_plist " .. MAME_DIR .. "src/osd/sdl/aueffectutil-Info.plist", + } + + dependency { + { "aueffectutil", MAME_DIR .. "src/osd/sdl/aueffectutil-Info.plist", true }, + } + + links { + "AudioUnit.framework", + "AudioToolbox.framework", + "CoreAudio.framework", + "CoreAudioKit.framework", + "CoreServices.framework", + } + + files { + MAME_DIR .. "src/osd/sdl/aueffectutil.mm", + } + + strip() +end diff --git a/docs/release/scripts/src/osd/sdl_cfg.lua b/docs/release/scripts/src/osd/sdl_cfg.lua new file mode 100644 index 00000000000..e3a6f913e75 --- /dev/null +++ b/docs/release/scripts/src/osd/sdl_cfg.lua @@ -0,0 +1,165 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +forcedincludes { + MAME_DIR .. "src/osd/sdl/sdlprefix.h" +} + +if SDL_NETWORK~="" and not _OPTIONS["DONT_USE_NETWORK"] then + defines { + "USE_NETWORK", + "OSD_NET_USE_" .. string.upper(SDL_NETWORK), + } +end + +if _OPTIONS["NO_OPENGL"]~="1" and _OPTIONS["USE_DISPATCH_GL"]~="1" and _OPTIONS["MESA_INSTALL_ROOT"] then + includedirs { + path.join(_OPTIONS["MESA_INSTALL_ROOT"],"include"), + } +end + +if _OPTIONS["SDL_INI_PATH"]~=nil then + defines { + "'INI_PATH=\"" .. _OPTIONS["SDL_INI_PATH"] .. "\"'", + } +end + +if _OPTIONS["NO_X11"]=="1" then + defines { + "SDLMAME_NO_X11", + } +else + defines { + "SDLMAME_X11", + } + includedirs { + "/usr/X11/include", + "/usr/X11R6/include", + "/usr/openwin/include", + } +end + +if _OPTIONS["NO_USE_XINPUT"]=="1" then + defines { + "USE_XINPUT=0", + } +else + defines { + "USE_XINPUT=1", + "USE_XINPUT_DEBUG=0", + } +end + +if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then + buildoptions { + backtick("pkg-config --cflags alsa"), + } +end + +defines { + "SDLMAME_SDL2=1", +} +if _OPTIONS["SDL2_MULTIAPI"]=="1" then + defines { + "SDL2_MULTIAPI", + } +end + +defines { + "OSD_SDL", + "SYNC_IMPLEMENTATION=" .. SYNC_IMPLEMENTATION, +} + +if BASE_TARGETOS=="unix" then + defines { + "SDLMAME_UNIX", + } + if _OPTIONS["targetos"]=="macosx" then + if _OPTIONS["USE_LIBSDL"]~="1" then + buildoptions { + "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"], + } + else + defines { + "MACOSX_USE_LIBSDL", + } + buildoptions { + backtick(sdlconfigcmd() .. " --cflags | sed 's:/SDL::'"), + } + end + else + buildoptions { + backtick(sdlconfigcmd() .. " --cflags"), + } + if _OPTIONS["targetos"]~="asmjs" then + buildoptions { + backtick("pkg-config --cflags fontconfig"), + } + end + end +end + +if _OPTIONS["targetos"]=="windows" then + configuration { "mingw*-gcc or vs*" } + defines { + "UNICODE", + "_UNICODE", + "main=utf8_main", + } + + configuration { "Debug" } + defines { + "MALLOC_DEBUG", + } + configuration { "vs*" } + includedirs { + MAME_DIR .. "3rdparty/sdl2/include", + } + configuration { } + +elseif _OPTIONS["targetos"]=="linux" then + if _OPTIONS["QT_HOME"]~=nil then + buildoptions { + "-I" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_HEADERS"), + } + else + buildoptions { + backtick("pkg-config --cflags Qt5Widgets"), + } + end +elseif _OPTIONS["targetos"]=="macosx" then + defines { + "SDLMAME_MACOSX", + "SDLMAME_DARWIN", + } +elseif _OPTIONS["targetos"]=="freebsd" then + buildoptions { + -- /usr/local/include is not considered a system include director on FreeBSD. GL.h resides there and throws warnings + "-isystem /usr/local/include", + } +elseif _OPTIONS["targetos"]=="os2" then + defines { + "SDLMAME_OS2", + } + buildoptions { + backtick(sdlconfigcmd() .. " --cflags"), + } +end + +configuration { "osx*" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/osx", + } + +configuration { "freebsd" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/freebsd", + } + +configuration { "netbsd" } + includedirs { + MAME_DIR .. "3rdparty/bx/include/compat/freebsd", + } + +configuration { } + diff --git a/docs/release/scripts/src/osd/windows.lua b/docs/release/scripts/src/osd/windows.lua new file mode 100644 index 00000000000..154d4732bc1 --- /dev/null +++ b/docs/release/scripts/src/osd/windows.lua @@ -0,0 +1,304 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +--------------------------------------------------------------------------- +-- +-- windows.lua +-- +-- Rules for the building for Windows +-- +--------------------------------------------------------------------------- + +dofile("modules.lua") + + +function maintargetosdoptions(_target,_subtarget) + osdmodulestargetconf() + + configuration { "mingw*-gcc" } + linkoptions { + "-municode", + } + links { + "mingw32", + } + + configuration { } + + if _OPTIONS["DIRECTINPUT"] == "8" then + links { + "dinput8", + } + else + links { + "dinput", + } + end + + + if _OPTIONS["USE_SDL"] == "1" then + links { + "SDL.dll", + } + end + + links { + "comctl32", + "comdlg32", + "psapi", + } +end + + +newoption { + trigger = "DIRECTINPUT", + description = "Minimum DirectInput version to support", + allowed = { + { "7", "Support DirectInput 7 or later" }, + { "8", "Support DirectInput 8 or later" }, + }, +} + +if not _OPTIONS["DIRECTINPUT"] then + _OPTIONS["DIRECTINPUT"] = "8" +end + +newoption { + trigger = "USE_SDL", + description = "Enable SDL sound output", + allowed = { + { "0", "Disable SDL sound output" }, + { "1", "Enable SDL sound output" }, + }, +} + +if not _OPTIONS["USE_SDL"] then + _OPTIONS["USE_SDL"] = "0" +end + +newoption { + trigger = "CYGWIN_BUILD", + description = "Build with Cygwin tools", + allowed = { + { "0", "Build with MinGW tools" }, + { "1", "Build with Cygwin tools" }, + }, +} + +if not _OPTIONS["CYGWIN_BUILD"] then + _OPTIONS["CYGWIN_BUILD"] = "0" +end + + +if _OPTIONS["CYGWIN_BUILD"] == "1" then + buildoptions { + "-mmo-cygwin", + } + linkoptions { + "-mno-cygwin", + } +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) + + dofile("windows_cfg.lua") + osdmodulesbuild() + + defines { + "DIRECT3D_VERSION=0x0900", + } + + if _OPTIONS["DIRECTINPUT"] == "8" then + defines { + "DIRECTINPUT_VERSION=0x0800", + } + else + defines { + "DIRECTINPUT_VERSION=0x0700", + } + end + + 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", + } + + includedirs { + MAME_DIR .. "src/osd/windows", + } + + files { + MAME_DIR .. "src/osd/modules/render/d3d/d3d9intf.cpp", + MAME_DIR .. "src/osd/modules/render/d3d/d3dintf.h", + MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.cpp", + MAME_DIR .. "src/osd/modules/render/d3d/d3dcomm.h", + MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.h", + MAME_DIR .. "src/osd/modules/render/drawd3d.cpp", + MAME_DIR .. "src/osd/modules/render/drawd3d.h", + MAME_DIR .. "src/osd/modules/render/drawgdi.cpp", + MAME_DIR .. "src/osd/modules/render/drawgdi.h", + MAME_DIR .. "src/osd/modules/render/drawnone.cpp", + MAME_DIR .. "src/osd/modules/render/drawnone.h", + MAME_DIR .. "src/osd/windows/input.cpp", + MAME_DIR .. "src/osd/windows/input.h", + MAME_DIR .. "src/osd/windows/output.cpp", + MAME_DIR .. "src/osd/windows/output.h", + MAME_DIR .. "src/osd/windows/video.cpp", + MAME_DIR .. "src/osd/windows/video.h", + MAME_DIR .. "src/osd/windows/window.cpp", + MAME_DIR .. "src/osd/windows/window.h", + MAME_DIR .. "src/osd/modules/osdwindow.cpp", + MAME_DIR .. "src/osd/modules/osdwindow.h", + MAME_DIR .. "src/osd/windows/winmenu.cpp", + MAME_DIR .. "src/osd/windows/winmain.cpp", + MAME_DIR .. "src/osd/windows/winmain.h", + MAME_DIR .. "src/osd/osdepend.h", + MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/debugbaseinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/debugbaseinfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/debugviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/debugviewinfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/debugwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/debugwininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/disasmbasewininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/disasmbasewininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/disasmviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/disasmviewinfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/disasmwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/disasmwininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/editwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/editwininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/logwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/logwininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/memoryviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/memoryviewinfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/memorywininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/memorywininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/pointswininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/pointswininfo.h", + MAME_DIR .. "src/osd/modules/debugger/win/uimetrics.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/uimetrics.h", + MAME_DIR .. "src/osd/modules/debugger/win/debugwin.h", + } + + +project ("ocore_" .. _OPTIONS["osd"]) + uuid (os.uuid("ocore_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + removeflags { + "SingleOutputDir", + } + + dofile("windows_cfg.lua") + + includedirs { + MAME_DIR .. "src/emu", + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + } + + BASE_TARGETOS = "win32" + SDLOS_TARGETOS = "win32" + SYNC_IMPLEMENTATION = "windows" + + includedirs { + MAME_DIR .. "src/osd/windows", + MAME_DIR .. "src/lib/winpcap", + } + + files { + MAME_DIR .. "src/osd/eigccppc.h", + MAME_DIR .. "src/osd/eigccx86.h", + MAME_DIR .. "src/osd/eivc.h", + MAME_DIR .. "src/osd/eivcx86.h", + MAME_DIR .. "src/osd/eminline.h", + MAME_DIR .. "src/osd/osdcomm.h", + MAME_DIR .. "src/osd/osdcore.cpp", + MAME_DIR .. "src/osd/osdcore.h", + MAME_DIR .. "src/osd/strconv.cpp", + MAME_DIR .. "src/osd/strconv.h", + MAME_DIR .. "src/osd/windows/main.cpp", + MAME_DIR .. "src/osd/windows/windir.cpp", + MAME_DIR .. "src/osd/windows/winfile.cpp", + MAME_DIR .. "src/osd/modules/sync/sync_windows.cpp", + MAME_DIR .. "src/osd/modules/sync/osdsync.h", + MAME_DIR .. "src/osd/windows/winutf8.cpp", + MAME_DIR .. "src/osd/windows/winutf8.h", + MAME_DIR .. "src/osd/windows/winutil.cpp", + MAME_DIR .. "src/osd/windows/winutil.h", + MAME_DIR .. "src/osd/windows/winfile.h", + MAME_DIR .. "src/osd/windows/winclip.cpp", + MAME_DIR .. "src/osd/windows/winsocket.cpp", + MAME_DIR .. "src/osd/windows/winptty.cpp", + MAME_DIR .. "src/osd/modules/osdmodule.cpp", + MAME_DIR .. "src/osd/modules/osdmodule.h", + MAME_DIR .. "src/osd/modules/lib/osdlib_win32.cpp", + } + + if _OPTIONS["NOASM"] == "1" then + files { + MAME_DIR .. "src/osd/modules/sync/work_mini.cpp", + } + else + files { + MAME_DIR .. "src/osd/modules/sync/work_osd.cpp", + } + end + + +-------------------------------------------------- +-- ledutil +-------------------------------------------------- + +if _OPTIONS["with-tools"] then + project("ledutil") + uuid ("061293ca-7290-44ac-b2b5-5913ae8dc9c0") + kind "ConsoleApp" + + flags { + "Symbols", -- always include minimum symbols for executables + } + + if _OPTIONS["SEPARATE_BIN"]~="1" then + targetdir(MAME_DIR) + end + + links { + "ocore_" .. _OPTIONS["osd"], + } + + includedirs { + MAME_DIR .. "src/osd", + } + + files { + MAME_DIR .. "src/osd/windows/ledutil.cpp", + } +end diff --git a/docs/release/scripts/src/osd/windows_cfg.lua b/docs/release/scripts/src/osd/windows_cfg.lua new file mode 100644 index 00000000000..3e656017816 --- /dev/null +++ b/docs/release/scripts/src/osd/windows_cfg.lua @@ -0,0 +1,62 @@ +-- license:BSD-3-Clause +-- copyright-holders:MAMEdev Team + +defines { + "OSD_WINDOWS", +} + +configuration { "mingw*-gcc or vs*" } + defines { + "UNICODE", + "_UNICODE", + "main=utf8_main", + } + +configuration { "Debug" } + defines { + "MALLOC_DEBUG", + } + +configuration { "vs*" } + flags { + "Unicode", + } + +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", + "OSD_NET_USE_PCAP", + } +end + +if _OPTIONS["USE_SDL"]=="1" then + defines { + "SDLMAME_SDL2=1", + "USE_XINPUT=0", + "USE_SDL=1", + "USE_SDL_SOUND", + } +else + defines { + "USE_SDL=0", + } +end diff --git a/docs/release/scripts/src/osd/winui.lua b/docs/release/scripts/src/osd/winui.lua new file mode 100644 index 00000000000..cff0beea684 --- /dev/null +++ b/docs/release/scripts/src/osd/winui.lua @@ -0,0 +1,273 @@ +dofile("modules.lua") + +premake.make.linkoptions_after = false; + +function maintargetosdoptions(_target,_subtarget) + kind "WindowedApp" + + osdmodulestargetconf() + + configuration { "mingw*-gcc" } + linkoptions { + "-municode", + "-lmingw32", + "-Wl,--allow-multiple-definition", + } + + configuration { "x64", "Release" } + targetsuffix "ui64" + + configuration { "x64", "Debug" } + targetsuffix "ui64d" + + configuration { "x32", "Release" } + targetsuffix "ui" + + configuration { "x32", "Debug" } + targetsuffix "uid" + + configuration { "Native", "Release" } + targetsuffix "ui" + + configuration { "Native", "Debug" } + targetsuffix "uid" + + configuration { } + + if _OPTIONS["DIRECTINPUT"] == "8" then + links { + "dinput8", + } + else + links { + "dinput", + } + end + + links { + "comctl32", + "comdlg32", + "psapi", + } + +-- Local file gives correct icon in mame instance inside of mameui +-- Local file must #include mameui.rc + override_resources = true; + local rcfile = MAME_DIR .. "src/osd/winui/" .. _target .. ".rc" + local uifile = MAME_DIR .. "src/osd/winui/" .. _target .. "ui.rc" + + if not os.isfile(rcfile) then + print(string.format("***** %s not found *****",rcfile)) + os.exit(); + end + + if not os.isfile(uifile) then + print(string.format("***** %s not found *****",uifile)) + os.exit(); + end + + files { + rcfile, + } + dependency { + { "$(OBJDIR)/".._target ..".res" , GEN_DIR .. "/resource/" .. _target .. "vers.rc", true }, + } +end + + +newoption { + trigger = "DIRECTINPUT", + description = "Minimum DirectInput version to support", + allowed = { + { "7", "Support DirectInput 7 or later" }, + { "8", "Support DirectInput 8 or later" }, + }, +} + +if not _OPTIONS["DIRECTINPUT"] then + _OPTIONS["DIRECTINPUT"] = "8" +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 "StaticLib" + + dofile("winui_cfg.lua") + osdmodulesbuild() + + defines { + "DIRECT3D_VERSION=0x0900", + } + + if _OPTIONS["DIRECTINPUT"] == "8" then + defines { + "DIRECTINPUT_VERSION=0x0800", + } + else + defines { + "DIRECTINPUT_VERSION=0x0700", + } + end + + includedirs { + MAME_DIR .. "src/emu", + MAME_DIR .. "src/devices", + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + MAME_DIR .. "src/osd/modules/render", + MAME_DIR .. "3rdparty", + } + + includedirs { + MAME_DIR .. "src/osd/windows", + } + + files { + MAME_DIR .. "src/osd/modules/render/drawd3d.cpp", + MAME_DIR .. "src/osd/modules/render/d3d/d3d9intf.cpp", + MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.cpp", + MAME_DIR .. "src/osd/modules/render/drawgdi.cpp", + MAME_DIR .. "src/osd/modules/render/drawnone.cpp", + MAME_DIR .. "src/osd/windows/input.cpp", + MAME_DIR .. "src/osd/windows/output.cpp", + MAME_DIR .. "src/osd/windows/video.cpp", + MAME_DIR .. "src/osd/windows/window.cpp", + MAME_DIR .. "src/osd/modules/osdwindow.cpp", + MAME_DIR .. "src/osd/modules/osdwindow.h", +-- MAME_DIR .. "src/osd/windows/winmenu.cpp", + MAME_DIR .. "src/osd/winui/newui.cpp", + MAME_DIR .. "src/osd/windows/winmain.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/debugbaseinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/debugviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/debugwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/disasmbasewininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/disasmviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/disasmwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/editwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/logwininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/memoryviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/memorywininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/pointswininfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/uimetrics.cpp", + MAME_DIR .. "src/osd/winui/win_options.cpp", + MAME_DIR .. "src/osd/winui/mui_util.cpp", + MAME_DIR .. "src/osd/winui/directinput.cpp", + MAME_DIR .. "src/osd/winui/dijoystick.cpp", + MAME_DIR .. "src/osd/winui/directdraw.cpp", + MAME_DIR .. "src/osd/winui/directories.cpp", + MAME_DIR .. "src/osd/winui/mui_audit.cpp", + MAME_DIR .. "src/osd/winui/columnedit.cpp", + MAME_DIR .. "src/osd/winui/screenshot.cpp", + MAME_DIR .. "src/osd/winui/treeview.cpp", + MAME_DIR .. "src/osd/winui/splitters.cpp", + MAME_DIR .. "src/osd/winui/bitmask.cpp", + MAME_DIR .. "src/osd/winui/datamap.cpp", + MAME_DIR .. "src/osd/winui/dxdecode.cpp", + MAME_DIR .. "src/osd/winui/picker.cpp", + MAME_DIR .. "src/osd/winui/properties.cpp", + MAME_DIR .. "src/osd/winui/tabview.cpp", + MAME_DIR .. "src/osd/winui/help.cpp", + MAME_DIR .. "src/osd/winui/history.cpp", + MAME_DIR .. "src/osd/winui/dialogs.cpp", + MAME_DIR .. "src/osd/winui/mui_opts.cpp", + MAME_DIR .. "src/osd/winui/layout.cpp", + MAME_DIR .. "src/osd/winui/datafile.cpp", + MAME_DIR .. "src/osd/winui/dirwatch.cpp", + MAME_DIR .. "src/osd/winui/winui.cpp", + MAME_DIR .. "src/osd/winui/helpids.cpp", + MAME_DIR .. "src/osd/winui/mui_main.cpp", + } + +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", + } + + BASE_TARGETOS = "win32" + SDLOS_TARGETOS = "win32" + SYNC_IMPLEMENTATION = "windows" + + includedirs { + MAME_DIR .. "src/osd/windows", + MAME_DIR .. "src/lib/winpcap", + } + + files { + MAME_DIR .. "src/osd/osdcore.cpp", + MAME_DIR .. "src/osd/strconv.cpp", + MAME_DIR .. "src/osd/windows/windir.cpp", + MAME_DIR .. "src/osd/windows/winfile.cpp", + MAME_DIR .. "src/osd/modules/sync/sync_windows.cpp", + MAME_DIR .. "src/osd/windows/winutf8.cpp", + MAME_DIR .. "src/osd/windows/winutil.cpp", + MAME_DIR .. "src/osd/windows/winclip.cpp", + MAME_DIR .. "src/osd/windows/winsocket.cpp", + MAME_DIR .. "src/osd/windows/winptty.cpp", + MAME_DIR .. "src/osd/modules/osdmodule.cpp", + MAME_DIR .. "src/osd/modules/sync/work_osd.cpp", + MAME_DIR .. "src/osd/modules/lib/osdlib_win32.cpp", + } + + +-------------------------------------------------- +-- ledutil +-------------------------------------------------- + +if _OPTIONS["with-tools"] then + project("ledutil") + uuid ("061293ca-7290-44ac-b2b5-5913ae8dc9c0") + kind "ConsoleApp" + + options { + "ForceCPP", + } + + targetdir(MAME_DIR) + + links { + "ocore_" .. _OPTIONS["osd"], + } + + includedirs { + MAME_DIR .. "src/osd", + } + + files { + MAME_DIR .. "src/osd/windows/ledutil.cpp", + } +end + diff --git a/docs/release/scripts/src/osd/winui_cfg.lua b/docs/release/scripts/src/osd/winui_cfg.lua new file mode 100644 index 00000000000..5dcaaaf0348 --- /dev/null +++ b/docs/release/scripts/src/osd/winui_cfg.lua @@ -0,0 +1,25 @@ +defines { + "UNICODE", + "_UNICODE", + "OSD_WINDOWS", + "USE_SDL=0", + --"WIN95_MULTIMON" + "main=utf8_main", + "_WIN32_WINNT=0x0501", + "USE_QTDEBUG=0", +} + +configuration { "vs*" } + flags { + "Unicode", + } + +configuration { } + +if not _OPTIONS["DONT_USE_NETWORK"] then + defines { + "USE_NETWORK", + "OSD_NET_USE_PCAP", + } +end + |