diff options
author | 2016-04-27 18:59:40 +1000 | |
---|---|---|
committer | 2016-04-27 18:59:40 +1000 | |
commit | bcd8558b02cb54eab92df98f14bf07221d6d358b (patch) | |
tree | c29211cecf250a791c074dfc3e1fc9a2d9a1a593 /docs/release/scripts/src/osd/sdl.lua | |
parent | 0d70c1f8cdb9e66fd7bc5bcad128e394a2345607 (diff) |
0.173 Release Fileshbmame173
Diffstat (limited to 'docs/release/scripts/src/osd/sdl.lua')
-rw-r--r-- | docs/release/scripts/src/osd/sdl.lua | 305 |
1 files changed, 105 insertions, 200 deletions
diff --git a/docs/release/scripts/src/osd/sdl.lua b/docs/release/scripts/src/osd/sdl.lua index 76947ad777a..d1a83229698 100644 --- a/docs/release/scripts/src/osd/sdl.lua +++ b/docs/release/scripts/src/osd/sdl.lua @@ -38,7 +38,7 @@ function maintargetosdoptions(_target,_subtarget) } end - if BASE_TARGETOS=="unix" and _OPTIONS["targetos"]~="macosx" then + if BASE_TARGETOS=="unix" and _OPTIONS["targetos"]~="macosx" and _OPTIONS["targetos"]~="android" then links { "SDL2_ttf", } @@ -48,35 +48,53 @@ function maintargetosdoptions(_target,_subtarget) end if _OPTIONS["targetos"]=="windows" then - if _OPTIONS["USE_LIBSDL"]~="1" then + if _OPTIONS["with-bundled-sdl2"]~=nil 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", + "SDL2", + "Imm32", + "Version", + "Ole32", + "OleAut32", } - - configuration { "vs*"} + configuration { "vs*" } links { "SDL2", + "Imm32", + "Version", } configuration { } else - local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'") - addlibfromstring(str) - addoptionsfromstring(str) + if _OPTIONS["USE_LIBSDL"]~="1" then + configuration { "mingw*"} + links { + "SDL2.dll", + } + configuration { "vs*" } + links { + "SDL2", + "Imm32", + "Version", + } + configuration { } + else + local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'") + addlibfromstring(str) + addoptionsfromstring(str) + end + configuration { "x32", "vs*" } + libdirs { + path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x86") + } + configuration { "x64", "vs*" } + libdirs { + path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64") + } end links { "psapi", } - - configuration { "mingw*-gcc" } + configuration { "mingw*" } linkoptions{ "-municode", } @@ -84,14 +102,6 @@ function maintargetosdoptions(_target,_subtarget) 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 { @@ -105,8 +115,16 @@ function maintargetosdoptions(_target,_subtarget) links { "psapi" } - configuration { } + + if _OPTIONS["targetos"]=="macosx" then + if _OPTIONS["with-bundled-sdl2"]~=nil then + links { + "SDL2", + } + end + end + end @@ -127,8 +145,8 @@ newoption { } newoption { - trigger = "SDL_INI_PATH", - description = "Default search path for .ini files", + trigger = "SDL_INI_PATH", + description = "Default search path for .ini files", } newoption { @@ -141,7 +159,7 @@ newoption { } 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 + if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" then _OPTIONS["NO_X11"] = "1" else _OPTIONS["NO_X11"] = "0" @@ -204,34 +222,28 @@ 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 _OPTIONS["with-bundled-sdl2"]~=nil or _OPTIONS["targetos"]=="android" then + includedirs { + GEN_DIR .. "includes", + } +end if BASE_TARGETOS=="unix" then if _OPTIONS["targetos"]=="macosx" then local os_version = str_to_version(backtick("sw_vers -productVersion")) @@ -243,22 +255,35 @@ if BASE_TARGETOS=="unix" then "-framework QuartzCore", "-framework OpenGL", } + + if os_version>=101100 then linkoptions { "-weak_framework Metal", } end - if _OPTIONS["USE_LIBSDL"]~="1" then + if _OPTIONS["with-bundled-sdl2"]~=nil then linkoptions { - "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"], - } - links { - "SDL2.framework", + "-framework AudioUnit", + "-framework CoreAudio", + "-framework Carbon", + "-framework ForceFeedback", + "-framework IOKit", + "-framework CoreVideo", } else - local str = backtick(sdlconfigcmd() .. " --libs --static | sed 's/-lSDLmain//'") - addlibfromstring(str) - addoptionsfromstring(str) + 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 end else if _OPTIONS["NO_X11"]=="1" then @@ -270,10 +295,17 @@ if BASE_TARGETOS=="unix" then "/usr/openwin/lib", } end - local str = backtick(sdlconfigcmd() .. " --libs") - addlibfromstring(str) - addoptionsfromstring(str) - if _OPTIONS["targetos"]~="haiku" then + if _OPTIONS["with-bundled-sdl2"]~=nil and _OPTIONS["targetos"]~="android" then + links { + "SDL2", + } + else + local str = backtick(sdlconfigcmd() .. " --libs") + addlibfromstring(str) + addoptionsfromstring(str) + end + + if _OPTIONS["targetos"]~="haiku" and _OPTIONS["targetos"]~="android" then links { "m", "pthread", @@ -290,13 +322,6 @@ if BASE_TARGETOS=="unix" then end end end -elseif BASE_TARGETOS=="os2" then - local str = backtick(sdlconfigcmd() .. " --libs") - addlibfromstring(str) - addoptionsfromstring(str) - links { - "pthread" - } end project ("qtdbg_" .. _OPTIONS["osd"]) @@ -335,6 +360,7 @@ project ("osd_" .. _OPTIONS["osd"]) 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/osd/sdl", @@ -342,7 +368,7 @@ project ("osd_" .. _OPTIONS["osd"]) if _OPTIONS["targetos"]=="windows" then files { - MAME_DIR .. "src/osd/sdl/main.cpp", + MAME_DIR .. "src/osd/windows/main.cpp", } end @@ -393,17 +419,12 @@ project ("osd_" .. _OPTIONS["osd"]) 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 { @@ -436,153 +457,37 @@ project ("ocore_" .. _OPTIONS["osd"]) 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/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 + if BASE_TARGETOS=="unix" then files { - MAME_DIR .. "src/osd/modules/sync/work_osd.cpp", + MAME_DIR .. "src/osd/modules/file/posixfile.cpp", + MAME_DIR .. "src/osd/modules/file/posixfile.h", + MAME_DIR .. "src/osd/modules/file/posixptty.cpp", + MAME_DIR .. "src/osd/modules/file/posixsocket.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") - + elseif BASE_TARGETOS=="win32" then 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"], + MAME_DIR .. "src/osd/windows", } - files { - MAME_DIR .. "src/osd/sdl/testkeys.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/windows/winutil.cpp", -- FIXME put the necessary functions somewhere more appropriate } - - 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", - } - + else files { - MAME_DIR .. "src/osd/sdl/aueffectutil.mm", + MAME_DIR .. "src/osd/modules/file/stdfile.cpp", } + end + - strip() -end |