some useful compile time macros...maybe
they are just crap :confused: anyway im using them in my secret project :D ...maybe they could be useful 4 u...
!macro _IfNDefDefineData __macrovarDefineName __macrovarDefineData
!ifndef "${__macrovarDefineName}"
!define "${__macrovarDefineName}" "${__macrovarDefineData}"
!endif
!macroend
!macro _IfNDefDefine __macrovarDefineName
!insertmacro _IfNDefDefineData "${__macrovarDefineName}" ""
!macroend
;!macro _VerifyDefined __macrovarDefineName
;!insertmacro _IfNDefDefine "${__macrovarDefineName}"
;!macroend
!macro _IfDefUnDefine __macrovarDefineName
!ifdef "${__macrovarDefineName}"
!undef "${__macrovarDefineName}"
!endif
!macroend
!macro _ForceDefineData __macrovarDefineName __macrovarDefineData
;!echo "_ForceDefineData::: {__macrovarDefineName}='${__macrovarDefineName}' | {__macrovarDefineData}='${__macrovarDefineData}'"
!ifdef "${__macrovarDefineName}"
!undef "${__macrovarDefineName}"
!endif
!define ${__macrovarDefineName} ${__macrovarDefineData}
!macroend
!macro _ForceDefine __macrovarDefineName
!insertmacro _ForceDefineData "${__macrovarDefineName}" ""
!macroend
!macro _AssertMsg __mvarMsg
!error "_Assert: ${__mvarMsg} | ${__FILE__} (Line: ${__LINE__})"
!macroend
!macro _Assert
!insertmacro _AssertMsg ""
!macroend
!macro _AssertDef __macrovarDefineName
!ifndef "${__macrovarDefineName}"
!insertmacro _AssertMsg "${__macrovarDefineName} should be defined!"
!endif
!macroend
!macro _AssertNDef __macrovarDefineName
!ifdef "${__macrovarDefineName}"
!insertmacro _AssertMsg "${__macrovarDefineName} should NOT be defined!"
!endif
!macroend
; ===================================================================================================
!macro __DbgEcho __macrovar1
!ifdef NSWFLAG_DEBUG
!echo "${__macrovar1}"
!endif
!macroend
!macro __DbgDetailPrint __mvarTxt
!ifdef NSWFLAG_DEBUG
DetailPrint "${__mvarTxt}"
!endif
!macroend
; ===================================================================================================