extract CallArtificialFunction to Util.nsh
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5780 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8e06903fc9
commit
7c1a3aa639
3 changed files with 37 additions and 19 deletions
35
Include/Util.nsh
Normal file
35
Include/Util.nsh
Normal file
|
@ -0,0 +1,35 @@
|
|||
; ---------------------
|
||||
; Util.nsh
|
||||
; ---------------------
|
||||
;
|
||||
; Voodoo macros to make end-user usage easier. This may be documented someday.
|
||||
|
||||
!verbose push
|
||||
!verbose 3
|
||||
|
||||
!ifndef ___UTIL__NSH___
|
||||
!define ___UTIL__NSH___
|
||||
|
||||
# see WinVer.nsh and *Func.nsh for usage examples
|
||||
!macro CallArtificialFunction NAME
|
||||
!ifndef __UNINSTALL__
|
||||
!define CallArtificialFunction_TYPE inst
|
||||
!else
|
||||
!define CallArtificialFunction_TYPE uninst
|
||||
!endif
|
||||
Call :.${NAME}${CallArtificialFunction_TYPE}
|
||||
!ifndef ${NAME}${CallArtificialFunction_TYPE}_DEFINED
|
||||
Goto ${NAME}${CallArtificialFunction_TYPE}_DONE
|
||||
!define ${NAME}${CallArtificialFunction_TYPE}_DEFINED
|
||||
.${NAME}${CallArtificialFunction_TYPE}:
|
||||
!insertmacro ${NAME}
|
||||
Return
|
||||
${NAME}${CallArtificialFunction_TYPE}_DONE:
|
||||
!endif
|
||||
!undef CallArtificialFunction_TYPE
|
||||
!macroend
|
||||
!define CallArtificialFunction `!insertmacro CallArtificialFunction`
|
||||
|
||||
!endif # !___UTIL__NSH___
|
||||
|
||||
!verbose pop
|
Loading…
Add table
Add a link
Reference in a new issue