I develop plug-ins for graphic host applications. And my code for conditional compilation
doesn't work properly. I need to compile the section if the application is found.
Seems like I cannot use a user variable in !define /math...
My code:
Function .onInit
ClearErrors
ReadRegStr $Path HKLM "Software\Application\Version" "PluginPath"
IfErrors 0 +3
IntOp $somedef 0 + 0
goto not_found
StrCpy $Application "Application"
IntOp $somedef 0 + 1
not_found:
!define /math result ${somedef} * 1
FunctionEnd
!if ${result} != 0
Section "$Application"
SetOutPath $Path
File "${PLUGIN_FILE}"
SectionEnd
!endif