Old 2nd July 2014, 04:29   #1
atfpodcast
Junior Member
 
Join Date: Jun 2014
Posts: 30
Unhappy How do I use my own icon for the installer?

I tried
Include Modern UI

!include "MUI.nsh"
!define MUI_ICON "apta.ico"
when I compile the script it still has the same default icon for installer. I looked around but either Im too new to know the proper term is blind...
atfpodcast is offline   Reply With Quote
Old 2nd July 2014, 07:17   #2
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
Is the icon file actually there?

How big is your installer?
See: http://forums.winamp.com/showthread.php?t=156086
jpderuiter is offline   Reply With Quote
Old 2nd July 2014, 07:28   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Is your installer actually using the Modern UI interface? If it isn't then you just need to use the Icon compiler instruction.

Stu
Afrow UK is offline   Reply With Quote
Old 2nd July 2014, 09:50   #4
atfpodcast
Junior Member
 
Join Date: Jun 2014
Posts: 30
Question

Ok I figured it out when it installs it shows my icon but what about if I want my icon to be the icon of the .exe file?

Last edited by atfpodcast; 2nd July 2014 at 10:46. Reason: to make more sense
atfpodcast is offline   Reply With Quote
Old 2nd July 2014, 11:57   #5
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
Quote:
Originally Posted by atfpodcast View Post
Ok I figured it out when it installs it shows my icon but what about if I want my icon to be the icon of the .exe file?
Same icon. If your installer is very big, you might be affected by a common Windows issue and not see it. There are several posts on this issue.
Yathosho is offline   Reply With Quote
Old 2nd July 2014, 21:50   #6
atfpodcast
Junior Member
 
Join Date: Jun 2014
Posts: 30
Unhappy

Quote:
Originally Posted by Yathosho View Post
Same icon. If your installer is very big, you might be affected by a common Windows issue and not see it. There are several posts on this issue.
Same icon? I been looking for code to make that same icon to be seen when it outputs the .exe

installer is only 5.1 megabytes and Of course I want to use the same icon
atfpodcast is offline   Reply With Quote
Old 2nd July 2014, 22:33   #7
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
Why are you making this so hard?

If you have !insertmacro MUI_LANGUAGE "xyz" in your code then you are using the Modern UI and the icon is set by MUI_ICON, if not you should use the plain Icon instruction.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 2nd July 2014, 22:48   #8
atfpodcast
Junior Member
 
Join Date: Jun 2014
Posts: 30
Angry

Quote:
Originally Posted by Anders View Post
Why are you making this so hard?

If you have !insertmacro MUI_LANGUAGE "xyz" in your code then you are using the Modern UI and the icon is set by MUI_ICON, if not you should use the plain Icon instruction.
I never used this program before and the instructions are Greek to me. I have had it a couple of days.. I don't want the default icon in this picture I want it to show the one above it.
Some one who is having a hard time understanding this program and Im making this hard? Yeah ok.
Attached Thumbnails
Click image for larger version

Name:	icon.jpg
Views:	116
Size:	49.1 KB
ID:	51254  
atfpodcast is offline   Reply With Quote
Old 2nd July 2014, 23:15   #9
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
Quote:
Originally Posted by atfpodcast View Post
I never used this program before and the instructions are Greek to me. I have had it a couple of days.. I don't want the default icon in this picture I want it to show the one above it.
Some one who is having a hard time understanding this program and Im making this hard? Yeah ok.
Afrow UK already asked you if you are using the Modern UI, you failed to respond.

Just add this to your source:

Quote:
!define MUI_ICON "myicon.ico"
Icon "myicon.ico"
one of them should work but since we cannot get a straight answer from you it is really hard to help...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 2nd July 2014, 23:32   #10
atfpodcast
Junior Member
 
Join Date: Jun 2014
Posts: 30
Quote:
Originally Posted by Anders View Post
Afrow UK already asked you if you are using the Modern UI, you failed to respond.

Just add this to your source:

one of them should work but since we cannot get a straight answer from you it is really hard to help...
I dont know what I am using. As I stated I am new and I saw code so i copied and pasted trying to get it to work.
atfpodcast is offline   Reply With Quote
Old 2nd July 2014, 23:33   #11
atfpodcast
Junior Member
 
Join Date: Jun 2014
Posts: 30
This is my program
; Installs my graphics pack for Laughingbird Software The Logo Creator.
;--------------------------------

; The name of the installer
Name "Vector Characters Elements"

; The file to write
OutFile "install.exe"
icon apta_icon.ico
; Show install details
ShowInstDetails show

Function .onInit
SetOutPath $TEMP
File /oname=spltmp.bmp "splash.bmp"


splash::show 4000 $TEMP\spltmp

Pop $0 ; $0 has '1' if the user closed the splash screen early,
; '0' if everything closed normally, and '-1' if some error occurred.

Delete $TEMP\spltmp.bmp

FunctionEnd

;--------------------------------
; The default installation directory
InstallDir "$Documents\Laughingbird Documents\Logo Elements\Vector Characters"
; InstallDir "$Documents\Laughingbird Documents\Logo Logo Libraries\"
; Request application privileges for Windows Vista
RequestExecutionLevel user

;--------------------------------

; Pages

Page directory
Page instfiles

;--------------------------------
; The stuff to install
Section "" ;No components page, name is not important

; Set output path to the installation directory.
SetOutPath $INSTDIR

; Put file there
File C:\Users\Tony\Desktop\stuff\ai\vector\png\biz_man.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\biz_woman.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\casual_girl.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\chef.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\female_doc.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\girl_megaphone.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\santa.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\superhero.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\woodboy.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\woodgirl.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\xmas_girl1.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\xmas_girl2.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\xmas_girl3.png
SectionEnd ; end the section
atfpodcast is offline   Reply With Quote
Old 3rd July 2014, 03:53   #12
atfpodcast
Junior Member
 
Join Date: Jun 2014
Posts: 30
it shows my icon in the GUI not for the .exe Do you think its a windows 7 issue? if some one else had it on their computer they would see the icon for setup.exe?
Attached Thumbnails
Click image for larger version

Name:	web.jpg
Views:	126
Size:	233.8 KB
ID:	51255  
atfpodcast is offline   Reply With Quote
Old 3rd July 2014, 04:16   #13
atfpodcast
Junior Member
 
Join Date: Jun 2014
Posts: 30
Ok I right mouse clicked the .exe and saw the icon so it looks like even with the install being only 5 megs now showing... owell..
atfpodcast is offline   Reply With Quote
Old 3rd July 2014, 09:01   #14
atfpodcast
Junior Member
 
Join Date: Jun 2014
Posts: 30
I got it to work. How? I changed the outfile name from install.exe to setup.exe and the icon shows.
atfpodcast is offline   Reply With Quote
Old 3rd July 2014, 10:23   #15
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
That's probably because the icon cache wasn't updated each time the script is compiled. It's a windows thing. Copy/pasting the .exe will regenerate the icon, as will changing it's filename.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 4th July 2014, 01:30   #16
atfpodcast
Junior Member
 
Join Date: Jun 2014
Posts: 30
Quote:
Originally Posted by JasonFriday13 View Post
That's probably because the icon cache wasn't updated each time the script is compiled. It's a windows thing. Copy/pasting the .exe will regenerate the icon, as will changing it's filename.
That's crazy windows hehe
atfpodcast is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

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