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

Downloaded addon binaries get renamed #99

Open
jsantorek opened this issue Feb 14, 2025 · 4 comments
Open

Downloaded addon binaries get renamed #99

jsantorek opened this issue Feb 14, 2025 · 4 comments
Labels
invalid This doesn't seem right

Comments

@jsantorek
Copy link

Describe the bug
No matter what the name of a binary attached to a release is, after downloading it seems to be renamed to addon name with spaces replaced by underscores. This causes duplicate addon issues when trying to run a version build locally, eg: addon dir will contain TrueWorldCompletion.dll built locally and available in github releases and True_World_Completion.dll which is what nexus creates after download.

To Reproduce
Steps to reproduce the behavior:

  1. Ask nexus to get the addon
  2. Manually download an addon from github release page (or build it locally)
  3. Compare names

Expected behavior
I'd expect AddonDefinition::Name name field to be a display name exclusively, with file name handled separately. If there is need to have clear and well defined relation between display name and file name, I'd like the loader (or updater) to issue a warning that downloaded file name mismatches expected one. As third alternative, new field AddonDefinition::FileName in addition to existing AddonDefinition::Name.

@jsantorek jsantorek added the bug Something isn't working label Feb 14, 2025
@DeltaGW2
Copy link
Member

DeltaGW2 commented Feb 14, 2025

The file name is only created when installing as there's no way to know what the file is supposed to be called until downloading.
An idea was to have a "friendly dll name" in the API or alternatively pull it from the GitHub release. Latter however would only work for GitHub hosted addons.

When it comes to updating addons, it will always keep the name of the current dll.

This might be fixed as part of the loader rewrite, but it would require knowing the name of the .dll before downloading, which adds another API call. Not something I'd willingly do at 60 requests per hour.

Adding a field FileName to the AddonDef has no value at all, as mentioned the .dll name is never changed.

The upcoming changes to nexus will also have some better dev tooling regarding addon versions, so that might also help.

@jsantorek
Copy link
Author

ok, I'll update the issue after I'll have a look post update.

@jsantorek
Copy link
Author

I just hope I conveyed my issue clearly - as a dev, I'd be WAY happier with warning addon named 'X Y Z' found with unexpected name 'XYZ.dll' - should be 'X_Y_Z.dll after first build, than with "XYZ.dll" or another addon with this signature (...) is already loaded. Duplicate. the day after review+release.

@DeltaGW2
Copy link
Member

The problem is that there is no "expected" name. The name is created during installation, because the alternative would be to use the signature or something else that's not really user friendly. Users can rename the DLL to whatever they want. Nexus does not care. Equally, I have no control over your build output name or whether you even directly compile into /addons. Nexus CANNOT give a warning like that, because it has no knowledge of what the addon should be named. The signature check does precisely that.

@DeltaGW2 DeltaGW2 added invalid This doesn't seem right and removed bug Something isn't working labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants