tma
31st May 2004 11:42 UTC
StrFunc in uninstall section
It seems it's not possible use StrFunc.nsh library and generally functions usable in both install and uninstall sections. When I try use a function from StrFunc in uninstall section message appears
Call must be used with function names starting with "un." in the uninstall section.
Usage: Call function_name | [:label_name]
Error in macro FUNCTION_STRING_StrRep_Call on macroline 8
Problem is of course that StrFunc macros defines functions without "un." prefix. But it stupid to write duplicate function libraries for install and uninstall distinquishing only "un." prefixes.
It's possible define functions usable for both i/u sections?
Thanks Tomas
deguix
31st May 2004 13:01 UTC
Use ${UnStrFunc} after including installer commands to separate from uninstaller commands you want to include.
Every StrFunc.nsh command included after ${UnStrFunc} can be used by uninstaller sections and functions. Example:
!include "StrFunc.nsh"
${StrStr} # Supportable for Install Sections and Functions
${UnStrFunc} # Command to separate commands supportable for
# Install/Uninstall sections and functions
${UnStrStr} # Supportable for Uninstall Sections and Functions
Section
${StrStr} $0 "OK! Now what?" "wh"
SectionEnd
Section Uninstall
${UnStrStr} $0 "OK! Now what?" "wh"
SectionEnd
tma
31st May 2004 13:22 UTC
Thanks, note that this support is not in StrFunc.nsh installed from standard NSIS installer - there was version 1.2 from 7th February 2004. I had to download it directly from cvs (v.1.3 or 1.4).
Tomas
deguix
31st May 2004 13:30 UTC
StrFunc.nsh is attached to NSIS project. If you want its updates (the not buggy ones) you can use the NSIS Updater. Latest version is 1.06 - March 26th, 2004.