Old 26th July 2017, 12:24   #1
tnteverett
Junior Member
 
Join Date: Jul 2017
Posts: 15
Modern UI 2 ICONs

The MultiLanguage.nsi example includes MUI2.nsh which eventually includes Interface.nsh.
I wanted to use the language options so I started down that path. When I got to changing the Icon I noticed that the typical "Icon" command did not work. After some attempt to find it in documentation I ultimately just searched NSIS files and found where the install and uninstall icons were defined. To change my icon I used the same commands right after the include statement which appeared to work.
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
;Overrides to Modern UI
!insertmacro MUI_DEFAULT MUI_ICON "D:\NSIS\Projects\ConfigPC\Nokia.ico"
!insertmacro MUI_DEFAULT MUI_UNICON "D:\NSIS\Projects\ConfigPC\Nokia.ico"
;--------------------------------
However, here is my problem which is not completely unique to the Modern UI 2 case. The file icon, as well as all subsequent page icons, have changed as expected. It is the Windows File Manager lower display application icon that has not changed. Example attached.
Where is this defined and how would I change it?
Attached Thumbnails
Click image for larger version

Name:	NSIS_ICONs.png
Views:	27
Size:	15.8 KB
ID:	53406  
tnteverett is offline   Reply With Quote
Old 26th July 2017, 12:49   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,559
Please read the MUI docs, you don't need the macro to override, just define MUI_ICON. The wrong icon is just a Explorer caching bug, rename the .exe and you will see the correct icon.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 27th July 2017, 12:09   #3
tnteverett
Junior Member
 
Join Date: Jul 2017
Posts: 15
"MUI docs"? What am I missing?
I searched NSIS help and "MUI_ICON" returns "No topics found".
Is this it?
http://nsis.sourceforge.net/Docs/Mod...02/Readme.html
tnteverett is offline   Reply With Quote
Old 27th July 2017, 13:22   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,559
Yes

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 27th July 2017, 17:50   #5
tnteverett
Junior Member
 
Join Date: Jul 2017
Posts: 15
Did not find what I needed there but searching examples I was able to simplify my code so it works. The cached icon did get resolved on its own but it was confusing.
tnteverett is offline   Reply With Quote
Old 1st August 2017, 01:09   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Click [Expand All] on the top before searching for MUI_ICON and then you should be able to see it.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
icon, mui2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump