Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add [dependencies] section to .gdextension #56

Closed
Blarfnip opened this issue May 20, 2024 · 1 comment
Closed

Add [dependencies] section to .gdextension #56

Blarfnip opened this issue May 20, 2024 · 1 comment

Comments

@Blarfnip
Copy link

Are you using the provided fork of Godot?
No. I'm using a mono build based on godot/master as of Feb 19, 2024
Godot Engine v4.3.dev.mono.custom_build.4799e7ebe

Godot-steam-audio version
0.1.1 (reproduced with 0.2.0)

Operating System
Windows 11

Describe the bug
Windows project exports would open with errors. The game was completely silent.

Upon exporting my project, only one dll would be present in the export directory (libgodot-steam-audio.windows.template_release.x86_64.dll). This dll seems to have a dependency for phonon.dll but that dll was not exported alongside it.

Running the exported build via PowerShell resulted in the following errors:

ERROR: Can't open dynamic library: addons/godot-steam-audio/bin/libgodot-steam-audio.windows.template_debug.x86_64.dll. Error: Error 126: The specified module could not be found..
   at: (platform\windows\os_windows.cpp:396)
ERROR: Can't open GDExtension dynamic library: addons/godot-steam-audio/bin/libgodot-steam-audio.windows.template_debug.x86_64.dll
   at: (core\extension\gdextension.cpp:727)
ERROR: Failed loading resource: res://addons/godot-steam-audio/bin/libgodot-steam-audio.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
   at: (core\io\resource_loader.cpp:276)
ERROR: Error loading extension: res://addons/godot-steam-audio/bin/libgodot-steam-audio.gdextension
   at: (core\extension\gdextension_manager.cpp:234)

I was able to fix this by adding the phonon.dll into a new [dependencies] section in the libgodot-steam-audio.gdextension:

[dependencies]
windows.x86_64.debug = {
    "res://addons/godot-steam-audio/bin/phonon.dll": ""
}
windows.x86_64.release = {
    "res://addons/godot-steam-audio/bin/phonon.dll": ""
}

Reproduction Steps

  1. Create a new Godot project
  2. Import godot-steam-audio
  3. Create new Node3D scene with SteamAudioListener and SteamAudioPlayer nodes as children
  4. Save scene and set as project Main Scene
  5. Open Export dialog and add a Windows Desktop preset
  6. Point custom templates to Godot forks. Leave all other settings default
  7. Export Project
  8. Open exported project with PowerShell. The above errors should be visible in the console

Expected behavior
No errors should be visible in the console, Spatial audio should play in-game.

Example project, code snippet, or screenshots
See above description

Additional context
The above fix solved the issue for me. I would've submitted a PR but I'm not sure what the other .dlls do and if they should be added to the dependencies section. Same with their relation to the other export platforms.

@stechyo
Copy link
Owner

stechyo commented May 20, 2024

Thanks for this! I've tested the analogous changes on Linux and added them. I also added the other Windows .dlls since they're used in other features of SteamAudio.

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

No branches or pull requests

2 participants