macalimlim / godot-rust-template

A template for godot-rust projects
MIT License
51 stars 22 forks source link

M1 Mac Support #50

Closed RNubla closed 1 year ago

RNubla commented 2 years ago

Hi, I created a new project by following the wiki and when i ran the command cargo make run, I get the following errors:

`OpenGL ES 3.0 Renderer: Apple M1 Pro Async. shader compilation: OFF

UNSUPPORTED (log once): POSSIBLE ISSUE: unit 1 GLD_TEXTURE_INDEX_2D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable Registered camera FaceTime HD Camera with id 1 position 0 at index 0 ERROR: Can't open dynamic library: /Users/user/Developement/godot/godotshop/godot/../lib/x86_64-apple-darwin/libgodotshop.dylib, error: dlopen(/Users/user/Developement/godot/godotshop/godot/../lib/x86_64-apple-darwin/libgodotshop.dylib, 0x0002): tried: '/Users/user/Developement/godot/godotshop/godot/../lib/x86_64-apple-darwin/libgodotshop.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))), '/Users/user/Developement/godot/godotshop/lib/x86_64-apple-darwin/libgodotshop.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))). at: open_dynamic_library (platform/osx/os_osx.mm:1956) ERROR: No valid library handle, can't get symbol from GDNative object at: get_symbol (modules/gdnative/gdnative.cpp:510) ERROR: No nativescript_init in "res://../lib/x86_64-apple-darwin/libgodotshop.dylib" found at: init_library (modules/gdnative/nativescript/nativescript.cpp:1503)`

Is M1 Mac not supported with this template? Thank you

macalimlim commented 2 years ago

Hi @RNubla,

Thank you for filing this issue. Support for M1 macs is not yet implemented in this template (and also on ftw) mainly because I don't have access to an M1 mac at the moment. If you have an M1 you can create a PR, implementing support for M1 (or any other target as long Godot supports it also) is pretty straightforward (please refer to Makefile.toml and export_presets.cfg)

Mike