From f79a591ae471c4da6fbb40c1da4bc4220f90aba4 Mon Sep 17 00:00:00 2001 From: der richter Date: Sat, 27 Jun 2020 11:12:46 +0200 Subject: cocoa-cb: generalisation of backend independent parts move all backend independent code parts in their own folder and files, to simplify adding new backends. the goal is to only extend one class and add the backend dependent parts there. usually only the (un)init, config and related parts need to be implemented per backend. furthermore all needed windowing and related events are propagated and can be overwritten. the other backend dependent part is usually the surface for rendering, for example the opengl oder metal layer. in the best case a new backend can be added with only a few hundred lines. --- wscript_build.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'wscript_build.py') diff --git a/wscript_build.py b/wscript_build.py index 41c8e60f27..63eb29a8f6 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -153,7 +153,7 @@ def build(ctx): return task.exec_command(cmd) - if ctx.dependency_satisfied('macos-cocoa-cb'): + if ctx.dependency_satisfied('cocoa') and ctx.dependency_satisfied('swift'): swift_source = [ ( "osdep/macos/log_helper.swift" ), ( "osdep/macos/libmpv_helper.swift" ), @@ -161,11 +161,12 @@ def build(ctx): ( "osdep/macos/swift_extensions.swift" ), ( "osdep/macos/swift_compat.swift" ), ( "osdep/macos/remote_command_center.swift", "macos-media-player" ), - ( "video/out/cocoa-cb/events_view.swift" ), - ( "video/out/cocoa-cb/video_layer.swift" ), - ( "video/out/cocoa-cb/window.swift" ), - ( "video/out/cocoa-cb/title_bar.swift" ), - ( "video/out/cocoa_cb_common.swift" ), + ( "video/out/mac/common.swift" ), + ( "video/out/mac/view.swift" ), + ( "video/out/mac/window.swift" ), + ( "video/out/mac/title_bar.swift" ), + ( "video/out/cocoa_cb_common.swift", "macos-cocoa-cb" ), + ( "video/out/mac/gl_layer.swift", "macos-cocoa-cb" ), ] ctx( -- cgit v1.2.3