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

Option to not add shortcuts to startmenu when installing a package #6031

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

insertokname
Copy link
Contributor

@insertokname insertokname commented Jun 27, 2024

Description

Added an option to skip creating the startmenu shortcuts when installing a package.

Motivation and Context

This is really useful in a fer specific use cases, for example i have two scoop installations on my pc for various purposes. This flag really helps avoid conflicts between installs and also because the paths of my installs are manually managed this, again, helps a lot.

How Has This Been Tested?

Ran the flag on multiple packages installs.
The code is really quite simple and only interacts with a small portion of the codebase.

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

@insertokname insertokname marked this pull request as ready for review June 27, 2024 20:06
@ghost
Copy link

ghost commented Jun 28, 2024

Running scoop update|reset <app> still creates the shortcut.
Running scoop uninstall <app> removes the shortcut, even if it was not created.
Maybe add this option to install.json.

@insertokname
Copy link
Contributor Author

insertokname commented Jun 28, 2024

Thank you for the help! I made some additions to hopefully fix my oversights!

After making these changes i observed some strange behavior, even if there is no startmenu shortcut in the actual folder windows still adds the program to the startmenu directly from the scoop/apps folder. I suspect this might be from registry tomfoolery that is made by the installer but i am not sure. If you have any ideas they would be greatly appreciated!

Another thing i would like to mention is that shims also get added to the startmenu, i intend to not interfere with this since you can already manage shims through scoop shim and this option is intended to only affect the startmenu folder.

@ghost
Copy link

ghost commented Jun 29, 2024

After making these changes i observed some strange behavior, even if there is no startmenu shortcut in the actual folder windows still adds the program to the startmenu directly from the scoop/apps folder. I suspect this might be from registry tomfoolery that is made by the installer but i am not sure. If you have any ideas they would be greatly appreciated!

Do you mean apps in the nonportable repository, scoop just calls installer and doesn't control the behavior of the installer, but it is possible to remove shortcuts in the post_install.

Another thing i would like to mention is that shims also get added to the startmenu, i intend to not interfere with this since you can already manage shims through scoop shim and this option is intended to only affect the startmenu folder.

Scoop doesn't add shim to the startmenu.

By the way, you didn't update the scoop-update.ps1.
scoop-export.ps1 and scoop-import.ps1 seem to need updating as well.

@insertokname
Copy link
Contributor Author

Do you mean apps in the nonportable repository, scoop just calls installer and doesn't control the behavior of the installer, but it is possible to remove shortcuts in the post_install.

Noted, thank you for the help!

Scoop doesn't add shim to the startmenu.

I accidentally confused the startmenu for the search, sorry!

I pushed a fix for the update and the import, hope it addresses all issues! Thank you for your patience with me, this is my second ever contribution with actual code so sorry for the mistakes.

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

Successfully merging this pull request may close these issues.

1 participant