mirror of
https://github.com/greenshot/greenshot.git
synced 2025-01-26 07:02:50 -08:00
a07fcc50f9
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2589 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
57 lines
3.4 KiB
NSIS
57 lines
3.4 KiB
NSIS
; ---------------------
|
||
; 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`
|
||
|
||
# for usage of artificial functions inside artificial functions
|
||
# macro recursion is prohibited
|
||
!macro CallArtificialFunction2 NAME
|
||
!ifndef __UNINSTALL__
|
||
!define CallArtificialFunction2_TYPE inst
|
||
!else
|
||
!define CallArtificialFunction2_TYPE uninst
|
||
!endif
|
||
Call :.${NAME}${CallArtificialFunction2_TYPE}
|
||
!ifndef ${NAME}${CallArtificialFunction2_TYPE}_DEFINED
|
||
Goto ${NAME}${CallArtificialFunction2_TYPE}_DONE
|
||
!define ${NAME}${CallArtificialFunction2_TYPE}_DEFINED
|
||
.${NAME}${CallArtificialFunction2_TYPE}:
|
||
!insertmacro ${NAME}
|
||
Return
|
||
${NAME}${CallArtificialFunction2_TYPE}_DONE:
|
||
!endif
|
||
!undef CallArtificialFunction2_TYPE
|
||
!macroend
|
||
!define CallArtificialFunction2 `!insertmacro CallArtificialFunction2`
|
||
|
||
!endif # !___UTIL__NSH___
|
||
|
||
!verbose pop
|