|
|
#1 |
|
Junior Member
Join Date: Jul 2003
Posts: 4
|
Custom Icon
Does anyone know if a custom icon can be set anywhere in NSIS? My program, Firebird, has a bug and an icon cannot be set on the .exe, even by using programs such as resHack so I'm hoping I can tell it to use a custom icon.
Thanks for your help. |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Jul 2003
Location: USA
Posts: 34
|
!define MUI_ICON "${NSISDIR}\Contrib\Icons\Youriconname.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Icons\YourIconname.ico" Copy your Icons in the folder |
|
|
|
|
|
#3 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
the previous example applies to installers with modern interface. if you use the standard interface use
Icon [path\]icon.ico UninstallIcon [path\]icon.ico you can find this in the documentation |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jul 2003
Posts: 4
|
Thanks for your reply but I want to set the icon for the program itself. ie: MozillaFirebird.exe. When compiling this program, it won't create the program icon and I was hoping I would be able to set it with the installer.
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jul 2003
Posts: 4
|
In reading over my post, I did not make it clear. Here is a portion of my script:
; Subsection about shortcuts (desktop, startmenu, quicklaunch) ; SubSection /e "${NAME_SecAddShortcuts}" SecAddShortcuts Section "${NAME_SecAddDesktopShortcut}" SecAddDesktopShortcut CreateShortCut "$DESKTOP\${DESC_DesktopShortcut}.lnk" \ "$INSTDIR\${EXE}" "" "$INSTDIR\${EXE}" 0 SectionEnd Section "${NAME_SecAddStartShortcuts}" SecAddStartShortcuts CreateDirectory "$SMPROGRAMS\${DESC_StartDir}" CreateShortCut "$SMPROGRAMS\${DESC_StartDir}\${DESC_StartUninst}.lnk" \ "$INSTDIR\${UNINSTALLER}" "" "$INSTDIR\${UNINSTALLER}" 0 CreateShortCut "$SMPROGRAMS\${DESC_StartDir}\${DESC_StartProg}.lnk" \ "$INSTDIR\${EXE}" "" "$INSTDIR\${EXE}" 0 SectionEnd Section "${NAME_SecAddQuicklaunchShortcut}" SecAddQuicklaunchShortcut CreateShortCut "$QUICKLAUNCH\${DESC_Quicklaunch}.lnk" \ "$INSTDIR\${EXE}" "" "$INSTDIR\${EXE}" 0 SectionEnd SubSectionEnd I need to tell the installer to use my icon located here: [D:\!Browsers\InTouch\intouch\32i.ico] |
|
|
|
|
|
#6 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
ok... sinxe your icon for the shorcut isn't the same of the installer or the uninstaller...
Try this: code: Where "$INSTDIR\theico.ico" is the installed path of the icon... * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jul 2003
Posts: 4
|
Please forgive me as I am a noobie. I tried entering the lines you suggested and I get an error. Do I replace
CreateShortCut "$DESKTOP\${DESC_DesktopShortcut}.lnk" \ "$INSTDIR\${EXE}" "" "$INSTDIR\${EXE}" 0 with CreateShortCut "short.lnk" "$INSTDIR\${exe}.exe" "" \ "$INSTDIR\D:\!Browsers\InTouch\intouch\32i.ico" 0 "SW_SHOWNORMAL" "" "Intouch" If so, I receive the following error: CreateShortCut: "short.lnk"->"$INSTDIR\InTouch.exe.exe" icon:$INSTDIR\D:\!Browsers\InTouch\intouch\32i.ico,0, showmode=0x1, hotkey=0x0, comment=Intouch Error: Can't add entry, no section or function is open! Error in script "D:\!Browsers\InTouch\InTouchinstaller\installer.nsi" on line 216 -- aborting creation process |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You must place the code in a Function or section.
Example code: -Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|