User Selectable Icons for Main Executable
My program has five different icons. I want the user to be able to choose which one the Desktop and Start Menu shortcuts use. Is this possible? And if so, how?
Archive: User Selectable Icons for Main Executable
User Selectable Icons for Main Executable
My program has five different icons. I want the user to be able to choose which one the Desktop and Start Menu shortcuts use. Is this possible? And if so, how?
You *could* use InstallOptions or InstallOptionsEx for this purpose. Create a dialog with 5 radiobuttons layed out in a vertical or horizontal fashion, and stick bitmaps beside/above/below each - each bitmap being your icons. You can have the user pick one that way quite visually.
Alternatively, you could use one of the 'radiobutton' behaviors for Sections so that the user has to select it in the Components page. That doesn't allow you to show what the icon looks like, though, and the code of those Section handlers is typically quite frightening ;)
Agree with Animaether... tey IO or IOex and show in a custom page your icons, letting the user to choose...
Alternative, you can use the components page, but the icons won't be visible there :(
Okay, I get that part. But how would I make it so that whatever radio button is seleted tell the shortcut to use a different IconGroup in the exe's resources. I tried looking at some sample code that came with the NSIS system, but none of them that I could tell had a way of pointing to a specific IconGroup, they just used the default group.
I don't know about IconGroups, but if you just have a bunch of icon resources in your DLL/EXE, you can specify the icon index in the CreateShortcut command?
Okay, forgive me if I sound incredibly stupid. I downloaded an InstallOptions form designer, but I'm completely clueless on how to assign a bitmap to a bitmap control. It doesn't have an option to let me pick the bitmap file, the help file doesn't mention it either, not even the NSIS help file mentions it.
:/
Text
(optional)
Specifies the caption of a label, checkbox, or radio button control. For DirRequest control this specifies the title of the browse dialog. For icon and bitmaps control this specifies the path to the image.
---
From the InstallOptions readme :)