Reputation: 9979
I have an NSIS installation script I wrote, and now I'm trying to customize the installer icon. By default, the generated install file looks like this:
I want to customize it to use a different icon however. Here's the code I added:
!include MUI.nsh
!define MUI_ICON my_icon.ico
I've got the my_icon.ico
file in the same directory as this .nsi
script, and yes it is a valid ICO file. Yet, when I compile the script, effectively nothing happens – the icon does not change.
What am I missing?
Upvotes: 1
Views: 2131
Reputation: 101569
Do you see the correct icon on the taskbar and in alt+tab when your installer is running?
This is probably just Explorer caching the icon. I can reproduce it on my system as well:
If makensis cannot find the icon it should complain and your code looks correct:
!include MUI.nsh
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\arrow-install.ico"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
Section
SectionEnd
Open a new instance of Notepad or any other application that uses a standard open dialog and navigate to the folder where your .exe is and you should see the correct icon when setting the filter to "All files". You could also open the .exe in a icon or resource editor to verify that it has the correct icon...
Upvotes: 1