-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Handle DLLs for Symlinked executables #2711
Comments
iirc, the entire Zip folder is extracted and moved to the default install location. Take the Paint.Net Pull Request for example. If you comment out everything except for the zip-portable installer entry, it still installs and runs correctly, meaning that all the DLLs needed to run it are referenced. The DLLs aren’t needed in the installer files because they aren’t installers |
Maybe I wasnt' clear enough. By binary files I mean plain binary, not an
If the community agrees with the |
I think you should look at the Paint.Net manifest and zip file more closely. Specifically, this entry - - Architecture: x64
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: paintdotnet.exe
PortableCommandAlias: paint.net
InstallerUrl: https://github.com/paintdotnet/release/releases/download/v4.3.12/paint.net.4.3.12.portable.x64.zip
InstallerSha256: AF58C12B92BC759F8E38C8623E356C8B8A2534809C44058AB76055DFA15DE4F8 That specific entry is exactly what you described - a loose .exe file with a bunch of DLLs and other assets included. If you comment out all the other entries in the manifest, and then use winget to install this specific entry, it will still run perfectly fine |
@Trenly, it does work if you install it and launch it through run dialog ( Although this is fine for Desktop Apps, it is not the expected behavior for development tools and won't work for CLI apps. But even for Desktop Apps you need to specify |
It works fine for me from powershell when I use |
That's my point, |
Ahhh, I see. Thank you for your patience and the clarification! |
The issue title should be better renamed to something like "Handle DLLs for symlinked executables."
Another solution would be to use shims, like Scoop or Chocolatey: |
Use bat might cause problem while execute it in another bat script. |
I believe we've resolved this with: It would likely involve uninstalling the package and reinstalling it (if it's installed and not working), but this should unblock a fairly large number of packages in the community repository. |
Should be worth mentioning that existing packages affected by this issue like scrcpy needs to have their manifests patched with this new option, and only then reinstalling them with the new winget version should work. |
@denelon do you have an example of where specifically to add never mind... I trawled the code and found:
Where is ManifestVersion 1.9.0 documented? |
Description of the new feature / enhancement
With current
zip
support, the only types of installer allowed are:exe
filesBut what about supporting regular compressed binary packages, such as those having
exe
along with dynamicdll
libraries?Proposed technical implementation details
To use the dynamic
dll
libraries, they must either be:PATH
environment variableFiles -> RelativeFilePath
within the installer manifestIt is not possible to link
dll
files to make it work using the2
approach, because the links are forced to have.exe
extension.This could be fixed either by:
dll
s folder toPATH
environment variabledll
files specifying something likeNestedInstallerType: library
. Then it would also be useful to provide pattern matchingRelativeFilePath
, such as*.dll
WinGet\Links
, make an executablebat
with the command@call "path\to\exe" %*
, then the working directory will be the same where theexe
actually is (this would the easiest path in my opinion)The text was updated successfully, but these errors were encountered: