diff options
Diffstat (limited to 'scripts/src')
-rw-r--r-- | scripts/src/machine.lua | 82 | ||||
-rw-r--r-- | scripts/src/main.lua | 193 | ||||
-rw-r--r-- | scripts/src/osd/newui.lua | 273 | ||||
-rw-r--r-- | scripts/src/osd/winui.lua | 324 | ||||
-rw-r--r-- | scripts/src/osd/winui_cfg.lua | 36 |
5 files changed, 746 insertions, 162 deletions
diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua index 60fd77428dd..62199b0c620 100644 --- a/scripts/src/machine.lua +++ b/scripts/src/machine.lua @@ -11,14 +11,14 @@ files { MAME_DIR .. "src/devices/machine/bcreader.cpp", - MAME_DIR .. "src/devices/machine/bcreader.h", - MAME_DIR .. "src/devices/machine/buffer.cpp", - MAME_DIR .. "src/devices/machine/buffer.h", +-- MAME_DIR .. "src/devices/machine/bcreader.h", +-- MAME_DIR .. "src/devices/machine/buffer.cpp", +-- MAME_DIR .. "src/devices/machine/buffer.h", MAME_DIR .. "src/devices/machine/clock.cpp", MAME_DIR .. "src/devices/machine/clock.h", - MAME_DIR .. "src/devices/machine/keyboard.cpp", - MAME_DIR .. "src/devices/machine/keyboard.h", - MAME_DIR .. "src/devices/machine/keyboard.ipp", +-- MAME_DIR .. "src/devices/machine/keyboard.cpp", +-- MAME_DIR .. "src/devices/machine/keyboard.h", +-- MAME_DIR .. "src/devices/machine/keyboard.ipp", MAME_DIR .. "src/devices/machine/laserdsc.cpp", MAME_DIR .. "src/devices/machine/laserdsc.h", MAME_DIR .. "src/devices/machine/nvram.cpp", @@ -26,55 +26,55 @@ files { MAME_DIR .. "src/devices/machine/ram.cpp", MAME_DIR .. "src/devices/machine/ram.h", MAME_DIR .. "src/devices/machine/legscsi.cpp", - MAME_DIR .. "src/devices/machine/legscsi.h", - MAME_DIR .. "src/devices/machine/sdlc.cpp", - MAME_DIR .. "src/devices/machine/sdlc.h", - MAME_DIR .. "src/devices/machine/terminal.cpp", - MAME_DIR .. "src/devices/machine/terminal.h", +-- MAME_DIR .. "src/devices/machine/legscsi.h", +-- MAME_DIR .. "src/devices/machine/sdlc.cpp", +-- MAME_DIR .. "src/devices/machine/sdlc.h", +-- MAME_DIR .. "src/devices/machine/terminal.cpp", +-- MAME_DIR .. "src/devices/machine/terminal.h", MAME_DIR .. "src/devices/machine/timer.cpp", MAME_DIR .. "src/devices/machine/timer.h", } files { - MAME_DIR .. "src/devices/imagedev/bitbngr.cpp", - MAME_DIR .. "src/devices/imagedev/bitbngr.h", +-- MAME_DIR .. "src/devices/imagedev/bitbngr.cpp", +-- MAME_DIR .. "src/devices/imagedev/bitbngr.h", MAME_DIR .. "src/devices/imagedev/cartrom.cpp", - MAME_DIR .. "src/devices/imagedev/cartrom.h", +-- MAME_DIR .. "src/devices/imagedev/cartrom.h", MAME_DIR .. "src/devices/imagedev/cassette.cpp", - MAME_DIR .. "src/devices/imagedev/cassette.h", +-- MAME_DIR .. "src/devices/imagedev/cassette.h", MAME_DIR .. "src/devices/imagedev/chd_cd.cpp", - MAME_DIR .. "src/devices/imagedev/chd_cd.h", - MAME_DIR .. "src/devices/imagedev/diablo.cpp", - MAME_DIR .. "src/devices/imagedev/diablo.h", +-- MAME_DIR .. "src/devices/imagedev/chd_cd.h", +-- MAME_DIR .. "src/devices/imagedev/diablo.cpp", +-- MAME_DIR .. "src/devices/imagedev/diablo.h", MAME_DIR .. "src/devices/imagedev/flopdrv.cpp", MAME_DIR .. "src/devices/imagedev/flopdrv.h", MAME_DIR .. "src/devices/imagedev/floppy.cpp", MAME_DIR .. "src/devices/imagedev/floppy.h", MAME_DIR .. "src/devices/imagedev/harddriv.cpp", - MAME_DIR .. "src/devices/imagedev/harddriv.h", - MAME_DIR .. "src/devices/imagedev/magtape.cpp", - MAME_DIR .. "src/devices/imagedev/magtape.h", +-- MAME_DIR .. "src/devices/imagedev/harddriv.h", +-- MAME_DIR .. "src/devices/imagedev/magtape.cpp", +-- MAME_DIR .. "src/devices/imagedev/magtape.h", MAME_DIR .. "src/devices/imagedev/memcard.cpp", MAME_DIR .. "src/devices/imagedev/memcard.h", - MAME_DIR .. "src/devices/imagedev/mfmhd.cpp", - MAME_DIR .. "src/devices/imagedev/mfmhd.h", - MAME_DIR .. "src/devices/imagedev/microdrv.cpp", - MAME_DIR .. "src/devices/imagedev/microdrv.h", - MAME_DIR .. "src/devices/imagedev/midiin.cpp", - MAME_DIR .. "src/devices/imagedev/midiin.h", - MAME_DIR .. "src/devices/imagedev/midiout.cpp", - MAME_DIR .. "src/devices/imagedev/midiout.h", - MAME_DIR .. "src/devices/imagedev/papertape.cpp", - MAME_DIR .. "src/devices/imagedev/papertape.h", - MAME_DIR .. "src/devices/imagedev/picture.cpp", - MAME_DIR .. "src/devices/imagedev/picture.h", - MAME_DIR .. "src/devices/imagedev/printer.cpp", - MAME_DIR .. "src/devices/imagedev/printer.h", - MAME_DIR .. "src/devices/imagedev/snapquik.cpp", - MAME_DIR .. "src/devices/imagedev/snapquik.h", - MAME_DIR .. "src/devices/imagedev/wafadrive.cpp", - MAME_DIR .. "src/devices/imagedev/wafadrive.h", - MAME_DIR .. "src/devices/imagedev/avivideo.cpp", - MAME_DIR .. "src/devices/imagedev/avivideo.h", +-- MAME_DIR .. "src/devices/imagedev/mfmhd.cpp", +-- MAME_DIR .. "src/devices/imagedev/mfmhd.h", +-- MAME_DIR .. "src/devices/imagedev/microdrv.cpp", +-- MAME_DIR .. "src/devices/imagedev/microdrv.h", +-- MAME_DIR .. "src/devices/imagedev/midiin.cpp", +-- MAME_DIR .. "src/devices/imagedev/midiin.h", +-- MAME_DIR .. "src/devices/imagedev/midiout.cpp", +-- MAME_DIR .. "src/devices/imagedev/midiout.h", +-- MAME_DIR .. "src/devices/imagedev/papertape.cpp", +-- MAME_DIR .. "src/devices/imagedev/papertape.h", +-- MAME_DIR .. "src/devices/imagedev/picture.cpp", +-- MAME_DIR .. "src/devices/imagedev/picture.h", +-- MAME_DIR .. "src/devices/imagedev/printer.cpp", +-- MAME_DIR .. "src/devices/imagedev/printer.h", +-- MAME_DIR .. "src/devices/imagedev/snapquik.cpp", +-- MAME_DIR .. "src/devices/imagedev/snapquik.h", +-- MAME_DIR .. "src/devices/imagedev/wafadrive.cpp", +-- MAME_DIR .. "src/devices/imagedev/wafadrive.h", +-- MAME_DIR .. "src/devices/imagedev/avivideo.cpp", +-- MAME_DIR .. "src/devices/imagedev/avivideo.h", } diff --git a/scripts/src/main.lua b/scripts/src/main.lua index ce31dd7f5c4..a5d6cc4f915 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -10,18 +10,20 @@ --------------------------------------------------------------------------- function mainProject(_target, _subtarget) -local projname if (_OPTIONS["SOURCES"] == nil) then if (_target == _subtarget) then - projname = _target + project (_target) else - projname = _target .. _subtarget + if (_subtarget=="mess") then + project (_subtarget) + else + project (_target .. _subtarget) + end end else - projname = _subtarget + project (_subtarget) end - project (projname) - uuid (os.uuid(_target .. "_" .. _subtarget)) + uuid (os.uuid(_target .."_" .. _subtarget)) kind "ConsoleApp" configuration { "android*" } @@ -55,18 +57,30 @@ end } end - configuration { "Release" } + configuration { "x64", "Release" } targetsuffix "" if _OPTIONS["PROFILE"] then targetsuffix "p" end - configuration { "Debug" } + configuration { "x64", "Debug" } targetsuffix "d" if _OPTIONS["PROFILE"] then targetsuffix "dp" end + configuration { "x32", "Release" } + targetsuffix "32" + if _OPTIONS["PROFILE"] then + targetsuffix "32p" + end + + configuration { "x32", "Debug" } + targetsuffix "32d" + if _OPTIONS["PROFILE"] then + targetsuffix "32dp" + end + configuration { "mingw*" or "vs20*" } targetextension ".exe" @@ -194,8 +208,7 @@ end override_resources = false; - maintargetosdoptions(_target, _subtarget) - local exename = projname -- FIXME: should include the OSD prefix if any + maintargetosdoptions(_target,_subtarget) includedirs { MAME_DIR .. "src/osd", @@ -206,23 +219,11 @@ end MAME_DIR .. "src/lib/util", MAME_DIR .. "3rdparty", GEN_DIR .. _target .. "/layout", + GEN_DIR .. "resource", ext_includedir("zlib"), ext_includedir("flac"), } - resincludedirs { - MAME_DIR .. "scripts/resources/windows/" .. _target, - GEN_DIR .. "resource", - } - - configuration { "vs20*"} - -- See https://github.com/bkaradzic/GENie/issues/544 - includedirs { - MAME_DIR .. "scripts/resources/windows/" .. _target, - GEN_DIR .. "resource", - } - configuration { } - if (STANDALONE==true) then standalone(); @@ -230,147 +231,97 @@ end if (STANDALONE~=true) then if _OPTIONS["targetos"]=="macosx" and (not override_resources) then - local plistname = _target .. "_" .. _subtarget .. "-Info.plist" linkoptions { - "-sectcreate __TEXT __info_plist " .. _MAKE.esc(GEN_DIR) .. "resource/" .. plistname + "-sectcreate __TEXT __info_plist " .. _MAKE.esc(GEN_DIR) .. "resource/" .. _subtarget .. "-Info.plist" } custombuildtask { - { - GEN_DIR .. "version.cpp", - GEN_DIR .. "resource/" .. plistname, - { MAME_DIR .. "scripts/build/verinfo.py" }, - { - "@echo Emitting " .. plistname .. "...", - PYTHON .. " $(1) -f plist -t " .. _target .. " -s " .. _subtarget .. " -e " .. exename .. " -o $(@) $(<)" - } - }, + { GEN_DIR .. "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/" .. plistname, true }, + { "$(TARGET)" , GEN_DIR .. "resource/" .. _subtarget .. "-Info.plist", true }, } end + local rctarget = _subtarget - local rcversfile = GEN_DIR .. "resource/" .. _target .. "_" .. _subtarget .. "_vers.rc" if _OPTIONS["targetos"]=="windows" and (not override_resources) then - files { - rcversfile - } - end - - local rcincfile = MAME_DIR .. "scripts/resources/windows/" .. _target .. "/" .. _subtarget ..".rc" - if not os.isfile(rcincfile) then - rcincfile = MAME_DIR .. "scripts/resources/windows/mame/mame.rc" - resincludedirs { - MAME_DIR .. "scripts/resources/windows/mame", - } - configuration { "vs20*"} - -- See https://github.com/bkaradzic/GENie/issues/544 - includedirs { - MAME_DIR .. "scripts/resources/windows/mame", + rcfile = MAME_DIR .. "scripts/resources/windows/" .. _subtarget .. "/" .. rctarget ..".rc" + if os.isfile(rcfile) then + files { + rcfile, } - configuration { } + dependency { + { "$(OBJDIR)/".._subtarget ..".res" , GEN_DIR .. "resource/" .. rctarget .. "vers.rc", true }, + } + else + rctarget = "mame" + files { + MAME_DIR .. "scripts/resources/windows/mame/mame.rc", + } + dependency { + { "$(OBJDIR)/mame.res" , GEN_DIR .. "resource/" .. rctarget .. "vers.rc", true }, + } + end end - local mainfile = MAME_DIR .. "src/" .. _target .. "/" .. _subtarget .. ".cpp" + local mainfile = MAME_DIR .. "src/".._target .."/" .. _subtarget ..".cpp" if not os.isfile(mainfile) then - mainfile = MAME_DIR .. "src/" .. _target .. "/" .. _target .. ".cpp" + mainfile = MAME_DIR .. "src/".._target .."/" .. _target ..".cpp" end files { mainfile, - GEN_DIR .. "version.cpp", - GEN_DIR .. _target .. "/" .. _subtarget .. "/drivlist.cpp", + MAME_DIR .. "src/version.cpp", + GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.cpp", } if (_OPTIONS["SOURCES"] == nil) then - if os.isfile(MAME_DIR .. "src/" .. _target .."/" .. _subtarget ..".flt") then + if os.isfile(MAME_DIR .. "src/".._target .."/" .. _subtarget ..".flt") then dependency { - { GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.cpp", MAME_DIR .. "src/".._target .."/" .. _target ..".lst", true }, - } - custombuildtask { - { - MAME_DIR .. "src/" .. _target .. "/" .. _subtarget .. ".flt", - GEN_DIR .. _target .. "/" .. _subtarget .. "/drivlist.cpp", - { MAME_DIR .. "scripts/build/makedep.py", MAME_DIR .. "src/" .. _target .."/" .. _target .. ".lst" }, - { - "@echo Building driver list...", - PYTHON .. " $(1) driverlist $(2) -f $(<) > $(@)" - } - }, + { + GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.cpp", MAME_DIR .. "src/".._target .."/" .. _target ..".lst", true }, } - elseif os.isfile(MAME_DIR .. "src/" .._target .. "/" .. _subtarget ..".lst") then custombuildtask { - { - MAME_DIR .. "src/" .. _target .. "/" .. _subtarget .. ".lst", - GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.cpp", - { MAME_DIR .. "scripts/build/makedep.py" }, - { - "@echo Building driver list...", - PYTHON .. " $(1) driverlist $(<) > $(@)" - } - }, + { MAME_DIR .. "src/".._target .."/" .. _subtarget ..".flt" , GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.cpp", { MAME_DIR .. "scripts/build/makedep.py", MAME_DIR .. "src/".._target .."/" .. _target ..".lst" }, {"@echo Building driver list...", PYTHON .. " $(1) driverlist $(2) -f $(<) > $(@)" }}, } else - dependency { - { GEN_DIR .. _target .. "/" .. _target .."/drivlist.cpp", MAME_DIR .. "src/".._target .."/" .. _target ..".lst", true }, - } - custombuildtask { + if os.isfile(MAME_DIR .. "src/".._target .."/" .. _subtarget ..".lst") then + custombuildtask { + { MAME_DIR .. "src/".._target .."/" .. _subtarget ..".lst" , GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.cpp", { MAME_DIR .. "scripts/build/makedep.py" }, {"@echo Building driver list...", PYTHON .. " $(1) driverlist $(<) > $(@)" }}, + } + else + dependency { { - MAME_DIR .. "src/" .. _target .. "/" .. _target .. ".lst", - GEN_DIR .. _target .. "/" .. _target .. "/drivlist.cpp", - { MAME_DIR .. "scripts/build/makedep.py" }, - { - "@echo Building driver list...", - PYTHON .. " $(1) driverlist $(<) > $(@)" - } - }, - } + GEN_DIR .. _target .. "/" .. _target .."/drivlist.cpp", MAME_DIR .. "src/".._target .."/" .. _target ..".lst", true }, + } + custombuildtask { + { MAME_DIR .. "src/".._target .."/" .. _target ..".lst" , GEN_DIR .. _target .. "/" .. _target .."/drivlist.cpp", { MAME_DIR .. "scripts/build/makedep.py" }, {"@echo Building driver list...", PYTHON .. " $(1) driverlist $(<) > $(@)" }}, + } + end end end if (_OPTIONS["SOURCES"] ~= nil) then dependency { - { GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.cpp", MAME_DIR .. "src/".._target .."/" .. _target ..".lst", true }, + { + GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.cpp", MAME_DIR .. "src/".._target .."/" .. _target ..".lst", true }, } custombuildtask { - { - GEN_DIR .. _target .."/" .. _subtarget ..".flt" , - GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.cpp", - { MAME_DIR .. "scripts/build/makedep.py", MAME_DIR .. "src/".._target .."/" .. _target ..".lst" }, - { - "@echo Building driver list...", - PYTHON .. " $(1) driverlist $(2) -f $(<) > $(@)" - } - }, + { GEN_DIR .. _target .."/" .. _subtarget ..".flt" , GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.cpp", { MAME_DIR .. "scripts/build/makedep.py", MAME_DIR .. "src/".._target .."/" .. _target ..".lst" }, {"@echo Building driver list...", PYTHON .. " $(1) driverlist $(2) -f $(<) > $(@)" }}, } end configuration { "mingw*" } - dependency { - { "$(OBJDIR)/" .. _target .. "_" .. _subtarget .. "_vers.res", rcincfile, true }, - } custombuildtask { - { - GEN_DIR .. "version.cpp" , - rcversfile, - { MAME_DIR .. "scripts/build/verinfo.py" }, - { - "@echo Emitting " .. _target .. "_" .. _subtarget .. "_vers.rc" .. "...", - PYTHON .. " $(1) -f rc -t " .. _target .. " -s " .. _subtarget .. " -e " .. exename .. " -r " .. rcincfile .. " -o $(@) $(<)" - } - }, +-- { GEN_DIR .. "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 { "vs20*" } - dependency { - { "$(OBJDIR)/" .. _target .. "_" .. _subtarget .. "_vers.res", rcincfile, true }, - } prebuildcommands { - "mkdir \"" .. path.translate(GEN_DIR .. "resource/", "\\") .. "\" 2>NUL", - "mkdir \"" .. path.translate(GEN_DIR .. _target .. "/" .. _subtarget .. "/", "\\") .. "\" 2>NUL", - "@echo Emitting " .. _target .. "_" .. _subtarget .. "_vers.rc" .. "...", - PYTHON .. " \"" .. path.translate(MAME_DIR .. "scripts/build/verinfo.py", "\\") .. "\" -f rc -t " .. _target .. " -s " .. _subtarget .. " -e " .. exename .. " -o \"" .. path.translate(rcversfile) .. "\" -r \"" .. path.translate(rcincfile, "\\") .. "\" \"" .. path.translate(GEN_DIR .. "version.cpp", "\\") .. "\"", + "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(GEN_DIR .. "version.cpp","\\") .. "\" > \"" .. path.translate(GEN_DIR .. "resource/" .. rctarget .. "vers.rc", "\\") .. "\"" , } end diff --git a/scripts/src/osd/newui.lua b/scripts/src/osd/newui.lua new file mode 100644 index 00000000000..425eb50ba12 --- /dev/null +++ b/scripts/src/osd/newui.lua @@ -0,0 +1,273 @@ +-- license:BSD-3-Clause +-- copyright-holders:Robbbert + +--------------------------------------------------------------------------- +-- +-- newui.lua +-- +-- Rules for the building for Windows +-- +--------------------------------------------------------------------------- + +dofile("modules.lua") + +premake.make.linkoptions_after = false; + +function maintargetosdoptions(_target,_subtarget) + osdmodulestargetconf() + + configuration { "mingw*" } + links { + "mingw32", + } + + configuration { } + + if _OPTIONS["DIRECTINPUT"] == "8" then + links { + "dinput8", + } + else + links { + "dinput", + } + end + + links { + "comctl32", + "comdlg32", + "psapi", + "ole32", + } + +-- needs same resources as messui, because dropdown menus are in mameui.rc + override_resources = true; + rctarget = _subtarget; + local rcfile = MAME_DIR .. "src/osd/winui/" .. _subtarget .. ".rc" + local uifile = MAME_DIR .. "src/osd/winui/mameui.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/file", + MAME_DIR .. "src/osd/modules/render", + MAME_DIR .. "3rdparty", + MAME_DIR .. "src/frontend/mame", + MAME_DIR .. "src/osd/windows", + } + + files { + 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/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/winmain.cpp", + MAME_DIR .. "src/osd/windows/winmain.h", + MAME_DIR .. "src/osd/osdepend.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/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/logviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/logviewinfo.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 "StaticLib" + + options { + "ForceCPP", + } + removeflags { + "SingleOutputDir", + } + + dofile("windows_cfg.lua") + + includedirs { + MAME_DIR .. "3rdparty", + MAME_DIR .. "src/emu", + MAME_DIR .. "src/osd", + MAME_DIR .. "src/osd/modules/file", + 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/osdsync.cpp", + MAME_DIR .. "src/osd/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/modules/osdmodule.cpp", + MAME_DIR .. "src/osd/modules/osdmodule.h", + MAME_DIR .. "src/osd/modules/file/windir.cpp", + MAME_DIR .. "src/osd/modules/file/winfile.cpp", + MAME_DIR .. "src/osd/modules/file/winfile.h", + MAME_DIR .. "src/osd/modules/file/winptty.cpp", + MAME_DIR .. "src/osd/modules/file/winsocket.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/scripts/src/osd/winui.lua b/scripts/src/osd/winui.lua new file mode 100644 index 00000000000..bee908ed9e9 --- /dev/null +++ b/scripts/src/osd/winui.lua @@ -0,0 +1,324 @@ +-- license:BSD-3-Clause +-- copyright-holders:Robbbert + +--------------------------------------------------------------------------- +-- +-- winui.lua +-- +-- Rules for the building for Windows +-- +--------------------------------------------------------------------------- + +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 "ui" + + configuration { "x64", "Debug" } + targetsuffix "uid" + + configuration { "x32", "Release" } + targetsuffix "ui32" + + configuration { "x32", "Debug" } + targetsuffix "ui32d" + + 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", + "ole32", +-- "shell32", + "uxtheme", + "uuid", + "shlwapi", + } + +-- Local file gives correct icon in mame instance inside of mameui +-- Local file must #include mameui.rc + override_resources = true; + rctarget = _target; + local rcfile = MAME_DIR .. "src/osd/winui/" .. _target .. ".rc" + local uifile = MAME_DIR .. "src/osd/winui/hbmameui.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("winui_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/file", + MAME_DIR .. "src/osd/modules/render", + MAME_DIR .. "3rdparty", + MAME_DIR .. "src/frontend/mame", + MAME_DIR .. "src/osd/windows", + } + + files { + 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/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/winmain.cpp", + MAME_DIR .. "src/osd/windows/winmain.h", + MAME_DIR .. "src/osd/osdepend.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/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/logviewinfo.cpp", + MAME_DIR .. "src/osd/modules/debugger/win/logviewinfo.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", + MAME_DIR .. "src/osd/winui/bitmask.cpp", + MAME_DIR .. "src/osd/winui/columnedit.cpp", + MAME_DIR .. "src/osd/winui/datamap.cpp", + MAME_DIR .. "src/osd/winui/dialogs.cpp", + MAME_DIR .. "src/osd/winui/dijoystick.cpp", +-- MAME_DIR .. "src/osd/winui/directdraw.cpp", + MAME_DIR .. "src/osd/winui/directinput.cpp", + MAME_DIR .. "src/osd/winui/directories.cpp", + MAME_DIR .. "src/osd/winui/dirwatch.cpp", +-- MAME_DIR .. "src/osd/winui/dxdecode.cpp", + MAME_DIR .. "src/osd/winui/emu_opts.cpp", + MAME_DIR .. "src/osd/winui/help.cpp", + MAME_DIR .. "src/osd/winui/helpids.cpp", + MAME_DIR .. "src/osd/winui/history.cpp", + MAME_DIR .. "src/osd/winui/layout.cpp", + MAME_DIR .. "src/osd/winui/main.cpp", + MAME_DIR .. "src/osd/winui/mui_audit.cpp", + MAME_DIR .. "src/osd/winui/mui_main.cpp", + MAME_DIR .. "src/osd/winui/mui_opts.cpp", + MAME_DIR .. "src/osd/winui/mui_util.cpp", + MAME_DIR .. "src/osd/winui/picker.cpp", + MAME_DIR .. "src/osd/winui/properties.cpp", + MAME_DIR .. "src/osd/winui/resource.h", + MAME_DIR .. "src/osd/winui/screenshot.cpp", + MAME_DIR .. "src/osd/winui/splitters.cpp", + MAME_DIR .. "src/osd/winui/tabview.cpp", + MAME_DIR .. "src/osd/winui/treeview.cpp", + MAME_DIR .. "src/osd/winui/winui.cpp", + } + +project ("ocore_" .. _OPTIONS["osd"]) + uuid (os.uuid("ocore_" .. _OPTIONS["osd"])) + kind "StaticLib" + + options { + "ForceCPP", + } + removeflags { + "SingleOutputDir", + } + + dofile("windows_cfg.lua") + + includedirs { + MAME_DIR .. "3rdparty", + MAME_DIR .. "src/emu", + MAME_DIR .. "src/osd", + MAME_DIR .. "src/osd/modules/file", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + } + + BASE_TARGETOS = "win32" + SDLOS_TARGETOS = "win32" + SYNC_IMPLEMENTATION = "windows" + + includedirs { + MAME_DIR .. "src/osd/windows", + } + + 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/osdsync.cpp", + MAME_DIR .. "src/osd/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/modules/osdmodule.cpp", + MAME_DIR .. "src/osd/modules/osdmodule.h", + MAME_DIR .. "src/osd/modules/file/windir.cpp", + MAME_DIR .. "src/osd/modules/file/winfile.cpp", + MAME_DIR .. "src/osd/modules/file/winfile.h", + MAME_DIR .. "src/osd/modules/file/winptty.cpp", + MAME_DIR .. "src/osd/modules/file/winsocket.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" + + 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/scripts/src/osd/winui_cfg.lua b/scripts/src/osd/winui_cfg.lua new file mode 100644 index 00000000000..11ad81cc75b --- /dev/null +++ b/scripts/src/osd/winui_cfg.lua @@ -0,0 +1,36 @@ +defines { + "UNICODE", + "_UNICODE", + "OSD_WINDOWS", + "USE_SDL=0", + "WINVER=0x600", + "_WIN32_WINNT=0x0600", + "NTDDI_VERSION=0x06000000", + "USE_QTDEBUG=0", + "WIN32_LEAN_AND_MEAN", + "NOMINMAX", +} + +configuration { "vs*" } + flags { + "Unicode", + } + +configuration { } + +if _OPTIONS["USE_TAPTUN"]=="1" or _OPTIONS["USE_PCAP"]==1 then + defines { + "USE_NETWORK", + } + if _OPTIONS["USE_TAPTUN"]=="1" then + defines { + "OSD_NET_USE_TAPTUN", + } + end + if _OPTIONS["USE_PCAP"]=="1" then + defines { + "OSD_NET_USE_PCAP", + } + end +end + |