anchor.diff:  if %app_count% leq 90 (
     echo WARNING: only %app_count% applications found ! Expected at least 90
   )
  +call :check_python_wrapping
   
   call :nb_report_lines
   if %nb_report_lines_out% gtr %REF_SIZE% (
  -echo Check 2/3 : FAIL
  -) else (
  -echo Check 2/3 : PASS
  +  echo Check 2/3 : FAIL
  +) else (
  +  echo Check 2/3 : PASS
   )
   set REF_SIZE=%nb_report_lines_out%
  -
  +:: -----------------------------------------------------------------------------------
   rem Check 3 : check monteverdi & mapla
  -
  -
  -endlocal
  -goto :eof
  -
  -rem functions :
  +call :check_desktop_app monteverdi
  +call :check_desktop_app mapla 20
  +
  +call :nb_report_lines
  +if %nb_report_lines_out% gtr %REF_SIZE% (
  +  echo Check 3/3 : FAIL
  +) else (
  +  echo Check 3/3 : PASS
  +)
  +
  +if /i not -%1-==-/q- (
  +  goto :skip_restore_error
  +)
  +if %DONTSHOWUI_VALUE% equ 0 call :setDontShowUI 0
  +:skip_restore_error
  +del pid.log
  +del tmp.log
  +endlocal
  +goto :eof
  +
  +::########################[ FUNCTIONS ]##################################
   :check_binary
   setlocal
   type NUL > tmp.log
  
positive.code: set CURRENT_SCRIPT_DIR=%~dp0
  set DIRNAME=%CURRENT_SCRIPT_DIR%..
  cd %DIRNAME%
  
  :: Get current PID
  type NUL > pid.log
  
negative.code: :check_application_end
  endlocal & set /a app_count=app_count+1
  goto :eof
  ::-----------------------------------------------------------------------
  :check_desktop_app
  setlocal
  set appName=%1
  set delay=5
  if not -%2-==-- set delay=%2
  type NUL > tmp.log
  start /b bin\%appName%.exe > tmp.log 2>&1
  timeout %delay% >nul
  call :get_child_pid %CURRENT_PID% %appName%.exe
  if %child_pid% gtr 1 (
    taskkill /PID %child_pid% /F /T > NUL 2>&1
  ) else (
    echo ERROR : could not launch %appName%.exe
    echo ERROR : could not launch %appName%.exe >> selftest_report.log
    type tmp.log >> selftest_report.log
  )
  endlocal
  goto :eof
  ::-----------------------------------------------------------------------
  :check_python_wrapping
  setlocal
  type NUL > tmp.log
  python -c "import otbApplication" > tmp.log 2>&1
  call :nb_tmp_lines
  if %nb_tmp_lines_out% gtr 0 (
    echo ERROR : failed to run python wrapping
    echo ERROR : failed to run python wrapping >> selftest_report.log
    type tmp.log >> selftest_report.log
  )
  endlocal
  goto :eof
  ::-----------------------------------------------------------------------
  :parse_cli_output
  setlocal
  set /a ret=1
  for /F %%a in ('findstr /n /r /c:"^This is the %app% application, version " tmp.log') do set output=%%a
  if not "%output%" gtr "1:" (
    set /a ret=0
    goto :parse_cli_output_end
  )
  set output=
  for /F %%a in ('findstr /n /r /c:"^Parameters:" tmp.log') do set output=%%a
  if not "%output%" gtr "3:" (
    set /a ret=0
    goto :parse_cli_output_end
  )
  set output=
  for /F %%a in ('findstr /n /r /c:"^Examples:" tmp.log') do set output=%%a
  if not "%output%" gtr "1" (
    set /a ret=0
    goto :parse_cli_output_end
  )
  set output=
  for /F %%a in ('findstr /n /r /c:"FATAL" tmp.log') do set output=%%a
  if "%output%" gtr "1" (
    set /a ret=0
    goto :parse_cli_output_end
  )
  :parse_cli_output_end
  endlocal & set /a parse_cli_result=%ret%
  goto :eof
  ::-----------------------------------------------------------------------
  :nb_report_lines
  setlocal
  for /F "delims=" %%i in ('find /C /V "" ^< selftest_report.log') do set output=%%i
  endlocal & set nb_report_lines_out=%output%
  goto :eof
  ::-----------------------------------------------------------------------
  :nb_tmp_lines
  setlocal
  for /F "delims=" %%i in ('find /C /V "" ^< tmp.log') do set output=%%i
  endlocal & set nb_tmp_lines_out=%output%
  goto :eof
  ::-----------------------------------------------------------------------
  :get_child_pid
  setlocal
  set parent_pid=%1
  