Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 12th March 2010, 22:46   #1
Zinthose
Senior Member
 
Join Date: May 2009
Posts: 152
Exclamation [BUG] System Plugin issue with SetDetailsPrint lastused

First off, I posted a bug report ticket already but I decided to also post a copy on the forums to let others know.

In a nutshell if I use the system plugin after calling
code:
SetDetailsPrint none
, then
code:
SetDetailsPrint lastused
has no effect.

Here is a sample that reproduces the issue on my system.
PHP Code:
## Compiled using MakeNSIS v2.46

OutFile "System Plugin - SetDetailsPrint ***91;Bug***93;.exe"
ShowInstDetails show

Section Main

    DetailPrint 
"This is displayed" 

    
Call SetDetailsPrintTest
    
    DetailPrint 
"This should be displayed but dosn't!"
    
SectionEnd

Function SetDetailsPrintTest
    SetDetailsPrint none
    
    Push 
$0
    System
::Alloc 8
    Pop 
$0
    
    DetailPrint 
"This is not displayed"
    
    
System::Free $0
    
    
## FIXME This should revert to the default DetailsPrint mode but has no effect
        
SetDetailsPrint lastused
FunctionEnd 
Zinthose is offline   Reply With Quote
Old 12th March 2010, 23:19   #2
Zinthose
Senior Member
 
Join Date: May 2009
Posts: 152
Here is a macro for a temporary work around.

PHP Code:
!macro _SetDetailsPrint _VALUE
    
## There is a bug that prevents lastused from working on the 2.46 version of NSIS
    ##   I'm hoping this will be fixed in the next version
    ##   ***91;url***93;http://sourceforge.net/tracker/?func=detail&aid=2969695&group_id=22049&atid=373085***91;/url***93;
    
!if ${_VALUE} == lastused
        
!ifndef NSIS_VERSION_MAJOR NSIS_VERSION_MINOR
            
!searchparse ${NSIS_VERSION"v" NSIS_VERSION_MAJOR `.NSIS_VERSION_MINOR
        
!endif
        !if ${
NSIS_VERSION_MAJOR}.${NSIS_VERSION_MINOR} > 2.46
            
!warning `***91;BUG WORKAROUND SKIPPED***93; - If any following "DetailPrint" operations Fail try setting "SetDetailsPrint" manually.`
            
SetDetailsPrint lastused
        
!else
            !
warning `***91;BUG WORKAROUND APPLIED***93; - "SetDetailsPrint" set to "both" and not "lastused"`
            
SetDetailsPrint both
        
!endif
    !else
        
SetDetailsPrint ${_VALUE}
    !endif
!
macroend
!define SetDetailsPrint `!insertmacro _SetDetailsPrint
EXAMPLE
PHP Code:
${SetDetailsPrintnone
${SetDetailsPrintlastused 
Zinthose is offline   Reply With Quote
Old 13th March 2010, 00:21   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
This is not specific to the system plugin.

There might be some memory corruption going on that resets the lastused state, or maybe the codepath that handles plugin commands sets the detailprint state.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump