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

Menu entry and desktop icon #141

Open
sourcebox opened this issue Oct 18, 2021 · 3 comments
Open

Menu entry and desktop icon #141

sourcebox opened this issue Oct 18, 2021 · 3 comments
Assignees

Comments

@sourcebox
Copy link

The default wxs file created by cargo wix init does not provide options to create an entry in the start menu or an icon on the desktop. To me (but I'm only an occasional Windows user/developer), both options are quite common in installers and it was not trivial to find out how to add them.

@volks73
Copy link
Owner

volks73 commented Oct 18, 2021

Thank you for the feature request. It seems reasonable to be able to add a start menu and desktop shortcut. These should be added as components and features that can be toggled on/off during installation, similar to adding the executable to the PATH environment variable. Some, myself included, do not like desktop icons, so the option to skip creation during installation would be appreciated. Would you have capacity to work on the feature implementation?

In addition to this being an option for the end-user, it should be option to include these shortcuts for the developer. Not every developer will have icons available for his or her tool to use for the shortcuts nor want these to be an option. Thus, some command line argument (option/flag) and related TOML configuration directive to enable/disable each one separately will be needed. What should the command line arguments and TOML configuration directive names be?

A complicating factor is the path to the icon files. I guess separate command line arguments and configuration directives to specify the paths will be needed. If a desktop.ico and start.ico file are located in the wix folder, then these can be used automatically, but CLI options and/or configuration directives can be used to override. Otherwise, the generic shortcut icon will be used.

...it was not trivial to find out how to add them.

Since it was not straight-forward to implement, can you share your implementation?

I would have thought the implementation in the WXS template for the adding the executable to the PATH environment variable would be a good example and outline for implementing the desktop and start menu shortcut within in the WXS file. For reference, I found this StackOverflow Q&A for implementing a desktop shortcut with the WiX toolset.

@sourcebox
Copy link
Author

sourcebox commented Oct 18, 2021

You can have a look at my project here: https://github.com/sourcebox/sysex-drop
My experience with Windows is very little, I'm mostly on Linux and macOS and only fire it up in rare cases such when building an installer for a cross-platform app. So I'm probably not the right person to help you with implementing these features. I even needed help from a friend to install some of the required components.

BTW: I did not find out myself how to add the menu entry / desktop icon. I copied it from some other project without really understanding how it's working.

@volks73 volks73 self-assigned this Oct 18, 2021
@nazar-pc
Copy link

nazar-pc commented Dec 5, 2023

This is very much needed for any GUI apps, https://wixtoolset.org/docs/v3/howtos/files_and_registry/create_start_menu_shortcut/ has instructions on how to do this, but it is quite tedious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants