Menu

#1300 SetDetailsPrint bug in ${If}

3.0 Series
closed-fixed
Anders
None
5
2024-03-30
2023-08-27
nttwqz
No
!include "MUI2.nsh"
!include "LogicLib.nsh"
!include "x64.nsh"
!include "WinVer.nsh"
!define PRODUCT_NAME "Demo"

Name "${PRODUCT_NAME}"
Caption "${PRODUCT_NAME}"
OutFile "${PRODUCT_NAME}.exe"

ManifestDPIAware true
XPStyle on
ShowInstDetails show
SetFont "Microsoft YaHei" 9
RequestExecutionLevel user

!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"

Section
    DetailPrint "DetailPrint Test"
    SetDetailsPrint none
    ${If} ${IsNativeAMD64}
    ${OrIf} ${IsWow64}
        DetailPrint "This message is still printed"     # 3.09 bug
    ${EndIf}
    ${If} ${AtLeastWin7}
        SetDetailsPrint none
        DetailPrint "This message will not print"
    ${EndIf}
    ${If} ${AtLeastWin7}
        DetailPrint "This message will not print"
    ${EndIf}
SectionEnd
1 Attachments

Discussion

  • nttwqz

    nttwqz - 2023-08-27

    After replacing LogicLib.nsh, x64.nsh, and WinVer.nsh in 3.08, the problem persists!

     
  • Manuel Parfant

    Manuel Parfant - 2023-09-22

    I also detected several issues with the DetailPrint function on NSIS 3.09.
    If SetDetailPrint is set to none and DetailPrints are used in if statements, standard message such as "Extract:", "Completed" may not be displayed in the output window after SetDetailPrint is set to both again.
    Sometimes it helps when the function SetDetailPrint both is executed twice.

     

    Last edit: Manuel Parfant 2023-09-22
    • Robin

      Robin - 2024-03-12

      I observed the same issue. With 3.08 SetDetailPrint none followed by SetDetailPrint both works as expected.
      In 3.09 SetDetailPrint both once is not enough. Trying now to call it twice like you suggested.
      [Edit] Calling SetDetailPrint both twice fixes the issue.

      I suspect this to be related to the fix to the following issue:
      #1271

       

      Last edit: Robin 2024-03-18
  • iglezz

    iglezz - 2023-10-06

    It looks like the problem is somewhere in plugins subsystem.
    SetDetailsPrint value is lost after plugin using any plugin.

     
  • Amir Szekely

    Amir Szekely - 2024-03-30

    Fixed with a patch from Anders.

     
  • Amir Szekely

    Amir Szekely - 2024-03-30
    • status: open --> closed-fixed
    • assigned_to: Anders
     

Log in to post a comment.