diff --git a/Contrib/Graphics/Header/nsis-r.bmp b/Contrib/Graphics/Header/nsis-r.bmp new file mode 100644 index 00000000..eb3650f7 Binary files /dev/null and b/Contrib/Graphics/Header/nsis-r.bmp differ diff --git a/Contrib/Graphics/Header/nsis.bmp b/Contrib/Graphics/Header/nsis.bmp index 6d64407f..cbb52312 100644 Binary files a/Contrib/Graphics/Header/nsis.bmp and b/Contrib/Graphics/Header/nsis.bmp differ diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html index 258a3f76..3b56a013 100644 --- a/Contrib/Modern UI/Readme.html +++ b/Contrib/Modern UI/Readme.html @@ -173,21 +173,47 @@ Display an image on the header of a page.
MUI_HEADERIMAGE_BITMAP bmp_file
Bitmap image to display on the header of installers pages (recommended size: 150x57 pixels).
Default: ${NSISDIR}\Contrib\Graphics\Header\nsis.bmp
MUI_HEADERIMAGE_UNBITMAP bmp_file
-Bitmap image to display on the header of uninstaller pages (recommended size: 150x57 pixels).
-Default: Installer header bitmap
MUI_HEADERIMAGE_NOSTRETCH
+
MUI_HEADERIMAGE_BITMAP_NOSTRETCH
Do not stretch the installer header bitmap to fit the size of the field. Use this option only if
you have an image that does not use the whole space. If you have a full size bitmap that fits
exactly, you should not use this option because the size of the field will be different if the user
has a custom DPI setting.
MUI_HEADERIMAGE_UNNOSTRETCH
+
MUI_HEADERIMAGE_BITMAP_RTL bmp_file
+Bitmap image to display on the header of installers pages when using a RTL language
+(recommended size: 150x57 pixels).
+Default: Non-RTL bitmap
MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH
+Do not stretch the installer header bitmap when using a RTL language to fit the size of the field. Use this option only if
+you have an image that does not use the whole space. If you have a full size bitmap that fits
+exactly, you should not use this option because the size of the field will be different if the user
+has a custom DPI setting.
MUI_HEADERIMAGE_UNBITMAP bmp_file
+Bitmap image to display on the header of uninstaller pages (recommended size: 150x57 pixels).
+Default: Installer header bitmap
MUI_HEADERIMAGE_UNBITMAP_UNNOSTRETCH
Do not stretch the uninstaller header bitmap to fit the size of the field. Use this option only if
you have an image that does not use the whole space. If you have a full size bitmap that fits
exactly, you should not use this option because the size of the field will be different if the user
has a custom DPI setting.
MUI_HEADERIMAGE_UNBITMAP_RTL bmp_file
+Bitmap image to display on the header of uninstallers pages when using a RTL language (recommended size: 150x57 pixels).
+Default: Installer RTL header bitmap
MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH
+Do not stretch the uninstaller header bitmap when using a RTL language to fit the size of the field. Use this option only if
+you have an image that does not use the whole space. If you have a full size bitmap that fits
+exactly, you should not use this option because the size of the field will be different if the user
+has a custom DPI setting.
MUI_HEADERIMAGE_RIGHT
-Display the header image on the right side instead of the left side.
MUI_BGCOLOR (color: RRGGBBR hexadecimal)
Background color for the header, Welcome- and Finish page.
@@ -224,7 +250,7 @@ text (with the default font).
MUI_WELCOMEFINISHPAGE_NOSTRETCH
+
MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
Do not stretch the bitmap for the Welcome and Finish page to fit the size of the field. Use this
option only if you have an image that does not use the whole space. If you have a full size bitmap
that fits exactly, you should not use this option because the size of the field will be different
@@ -241,7 +267,7 @@ InstallOptions INI file for the Welcome- and Finish page with space for 3 lines
the default font).
Default: ${NSISDIR}\Contrib\Modern UI\ioSpecial3.ini
MUI_UNWELCOMEFINISHPAGE_3LINES
Create a bigger area for the title on the uninstaller Welcome- and Finish page, to allow displaying
@@ -250,14 +276,14 @@ Create a bigger area for the title on the uninstaller Welcome- and Finish page,
Bitmap for the Welcome- and Finish page (recommended size: 164x314 pixels).
Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp
MUI_UNWELCOMEFINISHPAGE_NOSTRETCH
+
MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH
Do not stretch the bitmap for the Welcome and Finish page to fit the size of the field. Use this
option only if you have an image that does not use the whole space. If you have a full size bitmap
that fits exactly, you should not use this option because the size of the field will be different
if the user has a custom DPI setting.
MUI_UNWELCOMEFINISHPAGE_INI ini_file
InstallOptions INI file for the uninstaller Welcome- and Finish page.
@@ -457,9 +483,9 @@ Do not display the checkbox to disable the creation of Start Menu shortcuts.
In the uninstaller, use the MUI_STARTMENU_GETFOLDER macro to get the Start Menu folder:
+preference. You should also use for the uninstaller to remove the Start Menu folders. Don't +forget to remove this key during uninstallation. +For the uninstaller, use the MUI_STARTMENU_GETFOLDER macro to get the Start Menu folder:
!insertmacro MUI_STARTMENU_GETFOLDER page_id $R0 Delete "$SMPROGRAMS\$R0\Your Shortcut.lnk" @@ -567,7 +593,7 @@ LoadLanguageFile.If you want the installer to display a language selection dialog (have a look at the MultiLanguage.nsi example), insert the -MUI_LANGDLL_DISPLAY macro in the .onInit function.
+MUI_LANGDLL_DISPLAY macro in the .onInit function:Function .onInit @@ -575,6 +601,7 @@ Function .onInit FunctionEnd+You can also use this macro for the uninstaller, in the un.onInit function.
Language Selection Dialog Settings
To remember to users preference, you can define a registry key.
-
@@ -583,10 +610,10 @@ FunctionEnd MUI_LANGDLL_REGISTRY_KEY key
MUI_LANGDLL_REGISTRY_VALUENAME value_name
The registry key to store the language. The users preference will be remembered. You can also use -it in the uninstaller to display the right language. Don't forget to remove this key in the +it for the uninstaller to display the right language. Don't forget to remove this key in the uninstaller.In the uninstaller, insert the MUI_UNGETLANGUAGE macro in un.onInit to get the stored language -preference.
+For the uninstaller, insert the MUI_UNGETLANGUAGE macro in un.onInit to get the stored language +preference:
Function un.onInit diff --git a/Contrib/Modern UI/System.nsh b/Contrib/Modern UI/System.nsh index c21c7b99..f76d7494 100644 --- a/Contrib/Modern UI/System.nsh +++ b/Contrib/Modern UI/System.nsh @@ -106,15 +106,25 @@ Var MUI_TEMP2 !insertmacro MUI_DEFAULT MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp" !ifdef MUI_HEADERIMAGE + !insertmacro MUI_DEFAULT MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp" + !ifndef MUI_HEADERIMAGE_UNBITMAP !define MUI_HEADERIMAGE_UNBITMAP "${MUI_HEADERIMAGE_BITMAP}" - !ifdef MUI_HEADERIMAGE_NOSTRETCH - !ifndef MUI_HEADERIMAGE_UNNOSTRETCH - !define MUI_HEADERIMAGE_UNNOSTRETCH + !ifdef MUI_HEADERIMAGE_BITMAP_NOSTRETCH + !insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH + !endif + !endif + + !ifdef MUI_HEADERIMAGE_BITMAP_RTL + !ifndef MUI_HEADERIMAGE_UNBITMAP_RTL + !define MUI_HEADERIMAGE_UNBITMAP_RTL "${MUI_HEADERIMAGE_BITMAP_RTL}" + !ifdef MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH + !insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH !endif !endif !endif + !endif XPStyle On @@ -362,12 +372,37 @@ Var MUI_TEMP2 !ifdef MUI_HEADERIMAGE InitPluginsDir - File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP}" - !ifndef MUI_HEADERIMAGE_${UNINSTALLER}NOSTRETCH - SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp" - !else - SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp" + !ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL + + StrCmp $(^RTL) 0 mui.headerimageinit_nortl + + File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL}" + + !ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL_NOSTRETCH + SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp" + !else + SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp" + !endif + + Goto mui.headerimageinit_done + + mui.headerimageinit_nortl: + + !endif + + File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP}" + + !ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_NOSTRETCH + SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp" + !else + SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp" + !endif + + !ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL + + mui.headerimageinit_done: + !endif !endif