Announcement

Collapse
No announcement yet.

Two sets of HiDPI images, one installer?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Two sets of HiDPI images, one installer?

    Hi.

    I have HiDPI background images for an MUI2 installer.

    120 dpi standard
    1.52 MB
    1.52 MB uninstaller
    ---------
    120 dpi custom
    15.9 KB
    19.5 KB uninstaller
    ---------
    144 dpi standard
    2.21 MB
    2.21 MB uninstaller
    ---------
    144 dpi custom
    19.9 KB
    24.4 KB uninstaller
    ---------
    168 dpi standard
    3.04 MB
    3.04 MB uninstaller
    ---------
    168 dpi custom
    23.9 KB
    29.6 KB uninstaller
    ---------
    192 dpi standard
    3.92 MB
    3.92 MB uninstaller
    ---------
    192 dpi custom
    27.7 KB
    34.9 KB uninstaller

    Standard images installer = 10.69 MB + uninstaller = 10.69 MB | uncompressed 24-bit BMPs

    Custom images installer = 87.6 KB + uninstaller = 108.4 KB | compressed RLE BMPs

    100%, 125%, 150%, 175%, 200% are standard dpi settings.
    Custom settings are 110% or 180% or 202%, and so forth, in theory.
    I can use only the small images by defining 'lite' mode.
    In 'lite' mode the huge images are not compiled.

    It is tempting to build only a 'lite' version, although NSIS is very good at compressing and extracting. Without a 'lite' switch would it be possible however to conditionally set 'lite' mode at run-time? Or is there a way to exclude the large images from the uninstaller on a vintage OS?

    Thanks.

  • #2
    Not really sure what you are asking for here. The only way to have different uninstallers is to build them separately and include them as normal exe files.

    Maybe it would be possible to include the extra images as png and convert on the fly with gdiplus.
    IntOp $PostCount $PostCount + 1

    Comment


    • #3
      Size in the installer is not a problem. I compile on my computer. Nor is it essentially something NSIS can't do when it creates the uninstaller.

      It just takes a few ticks longer to compile a 6MB uninstaller. Overhead, yes, but it works.

      The 'lite' version is smoother, because the images are extracted quicker on pages where they display. But I would like to reduce overhead as much as possible. In some cases, at least. Like, let us say, Windows 8.1 SP2 or less. (An example. Ideally you might be able to detect if the system is a laptop.)

      For a small 'lite' installer, on Windows 8.1 SP2 and below, large images should be unnecessary to include in the uninstaller.

      My original concept was to use smaller images for custom DPI settings as a fallback. The background color in the images is the same color as that of the page. Off-white. With a setting of 161% (I haven't tried it, but) the 144 dpi images would look almost normal, though smaller, unstretched and uncropped. Stretching is bad in my experience, nasty. The large BMPs I found don't look good when you convert them to index colors. I'm stuck with the 24-bits.

      Nothing wrong with that.

      Comparing versions (8.1 SP2) at run-time is apparently too late.

      So, what I'm asking is whether there is a workaround to change what goes into the uninstaller on the user's system based on the user's system.

      I will accept the reality of the situation though, if there isn't a workaround.

      Thanks for your reply. :-)

      Comment


      • #4
        Your idea to build uninstallers separately and include them seems the best solution.

        Comment


        • #5
          Is there even a Windows 8.1 SP2? There is 8.1 Update 1 but just detect 8.1
          IntOp $PostCount $PostCount + 1

          Comment


          • #6
            I don't know. I think this was one of your definitions. About 2016.

            PHP Code:
            !macro _WinVerCustom_AtLeastDllVer _a _b _t _f
              
            !insertmacro _LOGICLIB_TEMP
              Push 
            $0
              GetDLLVersion 
            "$SysDir\KERNEL32.DLL" $0 $_LOGICLIB_TEMP
              IntCmpU 
            ${_a} $"" ++3
              IntCmpU 
            ${_b$_LOGICLIB_TEMP "" "" +2
              StrCpy $_LOGICLIB_TEMP 
            "+"
              
            Pop $0
              
            !insertmacro _== $_LOGICLIB_TEMP "+" '${_t}' '${_f}'
            !macroend

            !define SysDllAtLeastWinXPSP2 '0x00050001 WinVerCustom_AtLeastDllVer 0x0a280884'
            !define SysDllAtLeastWin8SP0 '0x00060002 WinVerCustom_AtLeastDllVer 0' 
            I must have cloned SP2.

            Redefining the local image folder shortly before calling 'WriteUninstaller "$INSTDIR\bin\${uninstx}"' was my last attempt to exclude the large images programmatically. I will have to include them for Windows 8.1 update 1 and on laptops.

            Comment

            Working...
            X