Skip to content

MAC: Add Metal backend, native app bundle packaging, rpath dylib resolution, and separate Xcode/Makefiles build scripts - #135

Merged
1SHAMAY1 merged 1 commit into
1SHAMAY1:mainfrom
soum1-d:mac
Aug 9, 2026
Merged

MAC: Add Metal backend, native app bundle packaging, rpath dylib resolution, and separate Xcode/Makefiles build scripts#135
1SHAMAY1 merged 1 commit into
1SHAMAY1:mainfrom
soum1-d:mac

Conversation

@soum1-d

@soum1-d soum1-d commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces comprehensive macOS cross-platform support and adds a native Metal rendering backend to TimeEngine alongside existing graphics APIs.

Key Changes:

  • Metal Rendering Backend:

    • Implemented MetalRendererAPI, MetalVertexBuffer, MetalIndexBuffer, MetalVertexArray, MetalFramebuffer, and MetalShader in Engine/Include/Renderer/Metal/ and Engine/src/Renderer/Metal/.
    • Added GraphicsAPI::Metal to GraphicsAPI enum and integrated factory instantiations across VertexBuffer::Create, IndexBuffer::Create, VertexArray::Create, Framebuffer::Create, and Shader::Create.
    • Enabled TE_SUPPORT_METAL and TE_SUPPORT_OPENGL support detection for macOS in PreRequisites.h.
  • Premake5 & macOS Application Bundling:

    • Configured Premake5.lua to generate native macOS .app bundles (WindowedApp) with embedded Info.plist metadata.
    • Added .mm Objective-C++ file compilation support and linked Metal.framework, QuartzCore.framework, Cocoa.framework, IOKit.framework, CoreFoundation.framework, and CoreVideo.framework.
    • Removed duplicate static glfw3 linkage from TimeEditor target on macOS to prevent duplicate Objective-C class symbol collisions (GLFWHelper, GLFWApplicationDelegate) with libEngine.dylib.
  • Relocatable Dynamic Library Resolution (@rpath):

    • Configured @rpath/libEngine.dylib and @rpath/libVelox.dylib install names and set LD_RUNPATH_SEARCH_PATHS = "@executable_path" for TimeEditor bundle targets.
    • Added post-build script phases to automatically copy libEngine.dylib and libVelox.dylib into TimeEditor.app/Contents/MacOS/.
  • Build Pipeline & Release Packaging:

    • Separated and updated macOS build scripts under Scripts/Mac/Xcode/ and Scripts/Mac/Makefiles/.
    • Updated BuildCommercialRelease.sh to bundle TimeEditor.app with embedded dynamic libraries, automatic install_name_tool fixups, and ad-hoc code signing (codesign --force --deep).
    • Updated llms.md & llms.txt architecture reference documentation to include Metal backend support.

Related Issues

Cross platform portability for Mac.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Style / Refactoring

How Has This Been Tested?

I have built the project and run the app in Mac.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Determinism Check: If adding logic, I have ensured it is deterministic and time-aware.

@1SHAMAY1 1SHAMAY1 self-assigned this Aug 7, 2026
@soum1-d
soum1-d force-pushed the mac branch 2 times, most recently from 0f78b1b to 0e42705 Compare August 7, 2026 22:00
@1SHAMAY1

1SHAMAY1 commented Aug 8, 2026

Copy link
Copy Markdown
Owner

@soum1-d hard reset and make a single proper commit instead of 7 different commits.
I asked you to rebase and commit with no ammend and force push but you haven't done that.
I can see 7 different commits if you have done what i told you it will have 1 commit only.

@1SHAMAY1
1SHAMAY1 merged commit ab4b3bf into 1SHAMAY1:main Aug 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants