Open tishin opened 1 year ago
Godot runs LoadLibraryExA with LOAD_LIBRARY_SEARCH_DEFAULT_DIRS
, which itself is a combination of
LOAD_LIBRARY_SEARCH_APPLICATION_DIR
- Godot's executable directoryLOAD_LIBRARY_SEARCH_SYSTEM32
- System32 directoryLOAD_LIBRARY_SEARCH_USER_DIRS
- Custom dll directories added with AddDllDirectory
. Godot adds GDExtension's directory using that api, that's why copying runtime into bin
worksI suspect we will have a similar issue with Linux if Swift is not part of the system installation.
Question from someone who doesn't quite understand how much of a blocker this is: If someone were to publish a game with a SwiftGodot extension - could the Swift runtime be copied to the appropriate folder during installation? Or is that folder off limits to be mutated on Windows by an installation wizard/Steam?
You can just copy it to the directory where your extension is (bin
, see the comment from October 7
Oh jeez I misunderstood - I thought the solution was the runtime needed to be in a bin subfolder in the installed computer after distribution to be runnable. Thanks for the clarification!
After building the extension from tutorial on Windows and placing
SimpleRunnerDriver.dll
andSwiftGodot.dll
into/bin
I get the following error from Godot:The dll itself is obviously there. What appears to be missing is dll's dependencies: swiftCore.dll, swift_Concurrency.dll and so on. I managed to work around this issue by copying swift runtime directly into
/bin
. But there has to be a better way of doing this, right? Putting swift runtime in%PATH%
environment variable doesn't seem to have any effect on the issue.