Warn if a unsupported bitmap format is used (Bug #681 & FR #559)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7273 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2021-06-25 20:44:37 +00:00
parent 774a70ae93
commit ef6d0510ec
11 changed files with 61 additions and 9 deletions

View file

@ -214,12 +214,14 @@ Var mui.Button.Back
${if} $(^RTL) == 1
File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UN}BITMAP_RTL}"
!pragma verifyloadimage "${MUI_HEADERIMAGE_${UN}BITMAP_RTL}"
!insertmacro MUI_HEADERIMAGE_INITHELPER_LOADIMAGE "${UN}" "_RTL" ${IMGRESID} "$PLUGINSDIR\modern-header.bmp"
${else}
!endif
File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UN}BITMAP}"
!pragma verifyloadimage "${MUI_HEADERIMAGE_${UN}BITMAP}"
!insertmacro MUI_HEADERIMAGE_INITHELPER_LOADIMAGE "${UN}" "" ${IMGRESID} "$PLUGINSDIR\modern-header.bmp"
!ifdef MUI_HEADERIMAGE_${UN}BITMAP_RTL

View file

@ -91,6 +91,7 @@ Finish page (implemented using nsDialogs)
InitPluginsDir
File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP}"
!pragma verifyloadimage "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP}"
!ifdef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT
Call "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT}"

View file

@ -43,6 +43,7 @@ Welcome page (implemented using nsDialogs)
InitPluginsDir
File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP}"
!pragma verifyloadimage "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP}"
!ifdef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT
Call "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT}"

View file

@ -452,6 +452,7 @@ Var MUI_TEMP2
!insertmacro INSTALLOPTIONS_EXTRACT_AS "${MUI_${UNINSTALLER}WELCOMEFINISHPAGE_INI}" "ioSpecial.ini"
File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${MUI_${UNINSTALLER}WELCOMEFINISHPAGE_BITMAP}"
!pragma verifyloadimage "${MUI_${UNINSTALLER}WELCOMEFINISHPAGE_BITMAP}"
!insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Text" "$PLUGINSDIR\modern-wizard.bmp"
@ -474,6 +475,7 @@ Var MUI_TEMP2
StrCmp $(^RTL) 0 mui.headerimageinit_nortl
File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL}"
!pragma verifyloadimage "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL}"
!ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL_NOSTRETCH
SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
@ -488,6 +490,7 @@ Var MUI_TEMP2
!endif
File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP}"
!pragma verifyloadimage "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP}"
!ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_NOSTRETCH
SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"