Archive: BMPs for each page, MUI_ICON no show, Header_txt color


BMPs for each page, MUI_ICON no show, Header_txt color
Hello,

I know nothing about coding... So learning to use NSIS with UMUI has been a bit of challenge and I have a few issues remaining. I've really poured myself into this the last several days. However, my level of knowledge started at 0. My apologies if these question seem elementary.

The MUI-ICON will not show on the <installer>.exe file. It does show on the desktop shortcut. Even the icon that is defaulted by UMUI does not show. Oddly, if I open Icon Sushi and then choose to "open file", the "open file" browser window shows the icon on the installer. The icons also show in Filezilla.

Also, I can't figure out how to change the color of the header text in the upper left. Is this MUI_HEADER_TEXT? I'm not wanting to change MUI_TEXT_COLOR, only the header. Is there and easy command for this or does it require a fair amount of extra code?

Finally, is there a way to define a different UMUI_LEFTIMAGE_BMP for different pages rather than just using the same image for all?

Thanks in advance.

Here's the code I'm using for reference.


;--------------------------------
;General

!define VERSION "1.11"
!define NAME "Fortress Forever"

;--------------------------------
;Configuration

Name "${NAME} ${VERSION}"
OutFile "${Name} ${VERSION}.exe"

SetCompressor /FINAL lzma

XPStyle on
BrandingText "${Name} ${VERSION}"

!define PRODUCT_NAME "Fortress Forever"
!define PRODUCT_VERSION "1.11"
!define PRODUCT_PUBLISHER "Fortress Forever Team"
!define PRODUCT_WEB_SITE "http://www.fortress-forever.com/"

;--------------------------------
;Include UltraModernUI

!include "UMUI.nsh"

;--------------------------------
;Interface Settings

!define MUI_ABORTWARNING
!define MUI_ICON "F:\HalfLife\FF\INSTALLER\FortressForever\Fortress Forever.ico"
!define MUI_COMPONENTSPAGE_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\red.bmp"

!define MUI_TEXT_COLOR FFFFCC
!define MUI_BGCOLOR a1a9b0
!define UMUI_TEXT_LIGHTCOLOR 000000


!define UMUI_LEFTIMAGE_BMP "F:\HalfLife\FF\INSTALLER\pics\3classes171x384.bmp"
!define UMUI_HEADERIMAGE_BMP "F:\HalfLife\FF\INSTALLER\pics\headrlogo.bmp"
!define UMUI_BOTTOMIMAGE_BMP "${NSISDIR}\Contrib\UltraModernUI\Skins\gray\BtmImg.bmp"
!define UMUI_BRANDINGTEXTFRONTCOLOR F5F5F5
!define UMUI_BRANDINGTEXTBACKCOLOR 000000
!define MUI_LICENSEPAGE_BUTTON "DO it!"

;------------------------
; Installer pages

!insertmacro MUI_PAGE_WELCOME
!define MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_PAGE_LICENSE "F:\HalfLife\FF\INSTALLER\FortressForever\license.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"

; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS

!define APPID 215

!define FULL_GAME_NAME "Fortress Forever" ;This is the name of the game defined in gameinfo.txt
;Remove all colons from this (as well as any other invalid char in a file name)

!define DESKICO "F:\HalfLife\FF\INSTALLER\FortressForever\Fortress Forever.ico"
;This is the location on the local computer for the desktop icon for the game.
;The icon name must be the same name as the Game keyvalue specified in your GameInfo.txt.
;Remove all colons from this (as well as any other invalid char in a file name)

; MUI end

;======= NSIS STEAM SOURCEMOD INSTALLER, zipdll section removed =======

var ICONDIR
var STEAMEXE
ShowInstDetails show

Section "Game Files" FILES
SetOverwrite ifdiff
; SetOutPath "$INSTDIR"

!include "F:\HalfLife\FF\INSTALLER\filelist.nsh"

!ifndef NO_DESKTOP_ICON
SetOutPath "$ICONDIR"
File "${DESKICO}"
!endif

SectionEnd

!ifndef NO_DESKTOP_ICON
Section "Desktop Shortcut" SHORTCUT
SetOutPath "$DESKTOP"
CreateShortcut "${FULL_GAME_NAME}.lnk" $STEAMEXE \
'-applaunch ${APPID} -game "$INSTDIR"' "$ICONDIR\${FULL_GAME_NAME}.ico"
SectionEnd
!endif

;---------------------
; Section descriptions

!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SHORTCUT} "No need to make things easy..."
!insertmacro MUI_DESCRIPTION_TEXT ${FILES} "Trying to uncheck the Game Files are we?"
!insertmacro MUI_FUNCTION_DESCRIPTION_END

Page custom Finish
Function Finish
MessageBox MB_OK|MB_ICONEXCLAMATION "Steam must be restarted for the game to show on the games list."
FunctionEnd

;---------------------------------------
; Registry path detector for Source Mods

Function .onInit
ReadRegStr $R0 HKLM "Software\Valve\Steam" InstallPath
ReadRegStr $R1 HKCU "Software\Valve\Steam" SourceModInstallPath
IfErrors lbl_error 0
StrCpy $INSTDIR "$R1\FortressForever"
!ifndef NO_DESKTOP_ICON
StrCpy $ICONDIR "$R0\steam\games"
SectionSetFlags ${SHORTCUT} 0
StrCpy $STEAMEXE "$R0\steam.exe"
!endif
SectionSetFlags ${FILES} 17
Return
lbl_error:
ClearErrors
SectionSetFlags ${FILES} 17
FunctionEnd

As for the icon, it's an icon cache problem. See:

http://www.pctools.com/guides/registry/detail/1153/