0.2.0-dev Download ZIP
61 lines ·1.7 KB Raw
| 1 | #!/usr/bin/env python |
| 2 | from misc.utility.scons_hints import * |
| 3 | |
| 4 | import platform_macos_builders |
| 5 | |
| 6 | Import("env") |
| 7 | |
| 8 | files = [ |
| 9 | "os_macos.mm", |
| 10 | "godot_application.mm", |
| 11 | "godot_application_delegate.mm", |
| 12 | "crash_handler_macos.mm", |
| 13 | "display_server_macos_base.mm", |
| 14 | "display_server_macos.mm", |
| 15 | "godot_button_view.mm", |
| 16 | "godot_content_view.mm", |
| 17 | "godot_core_cursor.mm", |
| 18 | "godot_status_item.mm", |
| 19 | "godot_window_delegate.mm", |
| 20 | "godot_window.mm", |
| 21 | "key_mapping_macos.mm", |
| 22 | "godot_menu_delegate.mm", |
| 23 | "godot_menu_item.mm", |
| 24 | "godot_open_save_delegate.mm", |
| 25 | "native_menu_macos.mm", |
| 26 | "dir_access_macos.mm", |
| 27 | "tts_macos.mm", |
| 28 | "rendering_context_driver_vulkan_macos.mm", |
| 29 | "gl_manager_macos_legacy.mm", |
| 30 | "godot_progress_view.mm", |
| 31 | ] |
| 32 | |
| 33 | if env["angle"]: |
| 34 | files += ["gl_manager_macos_angle.mm"] |
| 35 | |
| 36 | if env.editor_build: |
| 37 | files += [ |
| 38 | "display_server_macos_embedded.mm", |
| 39 | "embedded_debugger.mm", |
| 40 | "embedded_gl_manager.mm", |
| 41 | "editor/embedded_game_view_plugin.mm", |
| 42 | "editor/embedded_process_macos.mm", |
| 43 | ] |
| 44 | |
| 45 | if env["library_type"] == "executable": |
| 46 | files += ["godot_main_macos.mm"] |
| 47 | else: |
| 48 | files += ["libgodot_macos.mm"] |
| 49 | |
| 50 | if env["library_type"] == "static_library": |
| 51 | prog = env.add_library("#bin/godot", files) |
| 52 | elif env["library_type"] == "shared_library": |
| 53 | prog = env.add_shared_library("#bin/godot", files) |
| 54 | else: |
| 55 | prog = env.add_program("#bin/godot", files) |
| 56 | |
| 57 | if env["debug_symbols"] and env["separate_debug_symbols"]: |
| 58 | env.AddPostAction(prog, env.Run(platform_macos_builders.make_debug_macos)) |
| 59 | |
| 60 | if env["generate_bundle"]: |
| 61 | env.AlwaysBuild(env.CommandNoCache("generate_bundle", prog, env.Run(platform_macos_builders.generate_bundle))) |