Archive: NSIS 2.46 UltraModern UI Issues


NSIS 2.46 UltraModern UI Issues
Hello.

When I try to use UltraModern UI with HM NIS Edit, the installer is blank with buttons and no text. Is this a compatibility issue?

Here is my script:

; Script generated by the HM NIS Edit Script Wizard.

; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "0.2e Addons By BTTFModMachine"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\IMGEdCmd.exe"

;!define XPUI_SYSDIR "C:\Program Files (x86)\NSIS\ExperienceUI\Contrib\ExperienceUI"
;!include "${XPUI_SYSDIR}\XPUI.nsh"
RequestExecutionLevel admin
!include LogicLib.nsh

;Include UltraModernUI
!include "UMUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\orange-r.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp"
!define UMUI_TEXT_COLOR F5F5F5
!define MUI_BGCOLOR 666666
!define UMUI_TEXT_LIGHTCOLOR 000000
!define UMUI_BRANDINGTEXTFRONTCOLOR F5F5F5
!define UMUI_BRANDINGTEXTBACKCOLOR 000000
!define UMUI_LEFTIMAGE_BMP "${NSISDIR}\Contrib\UltraModernUI\Skins\blue\LeftBranding.bmp"
!define UMUI_HEADERBGIMAGE_BMP "${NSISDIR}\Contrib\UltraModernUI\Skins\blue\Header.bmp"
!define UMUI_BOTTOMIMAGE_BMP "${NSISDIR}\Contrib\UltraModernUI\Skins\green\BtmImg.bmp"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_DEFAULT MUI_TEXT_COLOR FFFFFF
!insertmacro MUI_DEFAULT MUI_BGCOLOR 3d66ab
!insertmacro MUI_DEFAULT UMUI_TEXT_LIGHTCOLOR FFFF00
!insertmacro MUI_DEFAULT UMUI_BRANDINGTEXTFRONTCOLOR 8b8ca4
!insertmacro MUI_DEFAULT UMUI_BRANDINGTEXTBACKCOLOR eeeef3
!insertmacro MUI_DEFAULT UMUI_LEFTIMAGE_BMP \
"${NSISDIR}\Contrib\UltraModernUI\Skins\blue\LeftBranding.bmp"
!insertmacro MUI_DEFAULT UMUI_HEADERIMAGE_BMP \
"${NSISDIR}\Contrib\UltraModernUI\Skins\blue\Header.bmp"
!insertmacro MUI_DEFAULT UMUI_BOTTOMIMAGE_BMP \
"${NSISDIR}\Contrib\UltraModernUI\Skins\blue\BtmImg.bmp"
!insertmacro MUI_DEFAULT MUI_ICON \
"${NSISDIR}\Contrib\Graphics\UltraModernUI\Icon.ico"
!insertmacro MUI_DEFAULT MUI_UNICON \
"${NSISDIR}\Contrib\Graphics\UltraModernUI\UnIcon.ico"

; Language files
;!insertmacro UMUI_LANGUAGE "English"

AutoCloseWindow false
; MUI end ------

Function .onInit
UserInfo::GetAccountType
pop $0
${If} $0 != "admin" ;Require admin rights on NT4+
MessageBox mb_iconstop "Administrator rights required!"
SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
Quit
${EndIf}
FunctionEnd

Name "${PRODUCT_NAME}"
OutFile "C:\Users\Ryan\Documents\NSIS\Installers\0.2e Addons UMUI.exe"
InstallDir "$PROGRAMFILES\Rockstar Games\Grand Theft Auto Vice City"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show




Section "MainSection" SEC01

SetOutPath "$INSTDIR\addtogta3img"
SetOverwrite on
File "C:\Users\Ryan\Documents\GTAVC\ImgEdCmd\ImgEdCmd.exe"
File "C:\Users\Ryan\Documents\GTAVC\sparrow.txd"

; Unset all file-attributes (like Read-Only) and check if gta3.img and gta3.dir exist
SetOutPath "$INSTDIR\models"

/*

IfFileExists "$INSTDIR\models\gta3.img" errModelInstall startModelInstallImg

Goto errModelInstall

startModelInstallImg:

IfFileExists "$INSTDIR\models\gta3.dir" errModelInstall startModelInstallDir

Goto errModelInstall

startModelInstallDir:

*/

SetFileAttributes "$INSTDIR\models\gta3.img" FILE_ATTRIBUTE_NORMAL

SetFileAttributes "$INSTDIR\models\gta3.dir" FILE_ATTRIBUTE_NORMAL

; Add models to gta3.img
DetailPrint ""
DetailPrint "GTA Command Line IMG Editing Tool 1.0"
DetailPrint "====================================="
DetailPrint "by KCow, based on ImgEd by Dan"

DetailPrint ""

DetailPrint "Program Status"

DetailPrint "--------------"

DetailPrint ""

nsExec::Exec '"$INSTDIR\addtogta3img\ImgEdCmd.exe" "$INSTDIR\models\gta3.img" /a "$INSTDIR\addtogta3img\sparrow.txd"'

DetailPrint "SUCCESS: Archive Opened Successfully"

DetailPrint "SUCCESS: sparrow.txd Added To Archive"

DetailPrint "SUCCESS: Archive Closed Successfully"

DetailPrint ""

SectionEnd



Section -Post
RMDir /r "$INSTDIR\addtogta3img"

SectionEnd


I would appreciate it if someone would help me with this.

Thanks in advance!

-Webmaster2015

Please do not paste such large scripts directly, use pastebin or similar tool.

Are you sure your values are correct?
These look suspicious:

!define UMUI_TEXT_COLOR F5F5F5
!define MUI_BGCOLOR 666666
!define UMUI_TEXT_LIGHTCOLOR 000000
!define UMUI_BRANDINGTEXTFRONTCOLOR F5F5F5
!define UMUI_BRANDINGTEXTBACKCOLOR 000000

Maybe the correct format is 0x123456 ???


Format is ok, but sometimes it needs to be in quotes. You may also add buttons colors. Below my example:


##Interface setup
!define UMUI_SKIN "skinname"
!define UMUI_HEADERBGIMAGE
!define UMUI_TEXT_COLOR "FFFFFF"
!define MUI_BGCOLOR "2860A8"
!define UMUI_HEADERTEXT_COLOR "FFFFFF"
#Text and background colors for all Input,List,Treeview (except for licencepage and instfile page)
!define UMUI_TEXT_INPUTCOLOR 000000
!define UMUI_BGINPUTCOLOR "FFFFFF"
!define MUI_LICENSEPAGE_BGCOLOR "FFFFFF"
!define MUI_INSTFILESPAGE_COLORS "${UMUI_TEXT_INPUTCOLOR} ${UMUI_BGINPUTCOLOR}"
#Use skinned buttons
!define UMUI_DISABLED_BUTTON_TEXT_COLOR 666666
!define UMUI_SELECTED_BUTTON_TEXT_COLOR 000066
!define UMUI_BUTTON_TEXT_COLOR 000000