gerardog / gsudo

Sudo for Windows
https://gerardog.github.io/gsudo
MIT License
5.27k stars 140 forks source link

Feature Request: Choco installer to use same .MSI install as WinGet #212

Open gerardog opened 1 year ago

gerardog commented 1 year ago

Description

Proposed technical details

ALERTua commented 10 months ago

This would leave no options to install non-UAC gsudo #271

soredake commented 10 months ago

@ALERTua https://github.com/microsoft/winget-pkgs/pull/131849

gerardog commented 10 months ago

This would leave no options to install non-UAC gsudo https://github.com/gerardog/gsudo/issues/271

@ALERTua how do you currently use chocolatey to make a non-UAC install? I thougth you were using scoop for that, which works out of the box.

@soredake: I appreciate your willing to help here, but creating a winget package is not just the creation of the manifest itself, but mainly updating the release pipeline to do that automatically on each release, and do the testing.

Plus, having another installation method means a different 'gsudo experience' (for example, no gsudo powershell module, means worse experience plus updating all the docs), or that with user-scoped installs if you do gsudo --user somebodyElse you'll find out gsudo is not in the path of the target user so you cant gsudo anymore.

So let me ask you some questions.

soredake commented 10 months ago

Does winget really offers a good portable experience such as scoop?

No, not really, https://github.com/microsoft/winget-cli/issues/549 https://github.com/microsoft/winget-cli/issues/3077 https://github.com/microsoft/winget-cli/issues/222

  • Do you know if Winget Releaser (the tool I use to create winget packages) supports portable apps too?

https://github.com/russellbanks/Komac#update-an-existing-package-with-a-new-version

You can just use komac update after manifest is created.

  • I see you are using net46 binaries. Can't x86, x64 and arm64 be used instead? Deprecating net46 was in the roadmap.

Unfortunately, no, winget needs path to binary in order to create symlink (sudo -> net46-AnyCpu/gsudo) and you can't do per-arch symlinks and there is only all-in-one zip with all binaries.

ALERTua commented 10 months ago

@ALERTua how do you currently use chocolatey to make a non-UAC install? I thougth you were using scoop for that, which works out of the box.

After a double-check I can confirm that Chocolatey installs gsudo in a non-portable (with adding PATH) mode at c:\tools\gsudo\current, and the installation freezes if run without UAC while c:\tools doesn't exist. I don't know what scoop even is, so right now, the most convenient way for my scripting is to distribute gsudo.exe along with my scripts. Gotta look into scoop, I guess. Thank you.