Skip to content

Commit

Permalink
Merge #238
Browse files Browse the repository at this point in the history
238: Fix osx m1 target path for .gdextension files r=Bromeon a=jrockett6

My dylib path for M1 is different. This may be something specific to my system configuration, but I wanted to open this just in case something has changed since the example was made. Feel free to ignore. 

Co-authored-by: jrockett6 <[email protected]>
  • Loading branch information
bors[bot] and jrockett6 authored May 8, 2023
2 parents 97ec8f1 + f1a7376 commit 1f3e46d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ To register the GDExtension library with Godot, you need to create two files rel
windows.release.x86_64 = "res://../rust/target/release/{my-ext}.dll"
macos.debug = "res://../rust/target/debug/{my-ext}.dylib"
macos.release = "res://../rust/target/release/{my-ext}.dylib"
macos.debug.arm64 = "res://../rust/target/aarch64-apple-darwin/debug/{my-ext}.dylib"
macos.release.arm64 = "res://../rust/target/aarch64-apple-darwin/release/{my-ext}.dylib"
macos.debug.arm64 = "res://../rust/target/debug/{my-ext}.dylib"
macos.release.arm64 = "res://../rust/target/release/{my-ext}.dylib"
```
(Note that for exporting your project, you'll need to use paths inside `res://`).
> **Note**: for exporting your project, you'll need to use paths inside `res://`
> **Note**: If you specify your cargo compilation target via the `--target` flag or a `.cargo/config.toml` file, the rust library will be placed in a path name that includes target architecture, and the `.gdextension` library paths will need to match. E.g. for M1 Macs (`macos.debug.arm64` and `macos.release.arm64`) the path would be `"res://../rust/target/aarch64-apple-darwin/debug/{my-ext}.dylib"`
2. A second file `res://.godot/extension_list.cfg` should be generated once you open the Godot editor for the first time.
If not, you can also manually create it, simply containing the Godot path to your `.gdextension` file:
Expand Down
4 changes: 2 additions & 2 deletions examples/dodge-the-creeps/godot/DodgeTheCreeps.gdextension
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ windows.debug.x86_64 = "res://../../../target/debug/dodge_the_creeps.dll"
windows.release.x86_64 = "res://../../../target/release/dodge_the_creeps.dll"
macos.debug = "res://../../../target/debug/libdodge_the_creeps.dylib"
macos.release = "res://../../../target/release/libdodge_the_creeps.dylib"
macos.debug.arm64 = "res://../../../target/aarch64-apple-darwin/debug/libdodge_the_creeps.dylib"
macos.release.arm64 = "res://../../../target/aarch64-apple-darwin/release/libdodge_the_creeps.dylib"
macos.debug.arm64 = "res://../../../target/debug/libdodge_the_creeps.dylib"
macos.release.arm64 = "res://../../../target/release/libdodge_the_creeps.dylib"
4 changes: 2 additions & 2 deletions itest/godot/itest.gdextension
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ windows.debug.x86_64 = "res://../../target/debug/itest.dll"
windows.release.x86_64 = "res://../../target/release/itest.dll"
macos.debug = "res://../../target/debug/libitest.dylib"
macos.release = "res://../../target/release/libitest.dylib"
macos.debug.arm64 = "res://../../target/aarch64-apple-darwin/debug/libitest.dylib"
macos.release.arm64 = "res://../../target/aarch64-apple-darwin/release/libitest.dylib"
macos.debug.arm64 = "res://../../target/debug/libitest.dylib"
macos.release.arm64 = "res://../../target/release/libitest.dylib"

0 comments on commit 1f3e46d

Please sign in to comment.