anchor.diff:          ECHO Linkage option not defined. 
           ECHO Use: static or dynamic.
       ) ELSE (
  -        Rem Delete folders which we do not want to ship
  -        Remove-Item '%BASE_PATH%\bin\mne-cpp-test-data' -Recurse
  -        Remove-Item '%BASE_PATH%\bin\mne_scan_plugins' -Recurse
  -        Remove-Item '%BASE_PATH%\bin\mne_analyze_plugins' -Recurse
  -        Remove-Item '%BASE_PATH%\bin\mne_rt_server_plugins' -Recurse
  -        Remove-Item '%BASE_PATH%\bin\resources' -Recurse
  +        IF "%LINK_OPTION%"=="dynamic" (
  +            Rem Solve for dependencies only mne_scan.exe and mnecppDisp3D.dll since it links all needed qt and mne-cpp libs
  +            windeployqt %BASE_PATH%\bin\mne_scan.exe
  +            windeployqt %BASE_PATH%\bin\mnecppDisp3D.dll
   
  -        Rem Creating archive of all win deployed applications
  -        7z a %BASE_PATH%\mne-cpp-windows-%LINK_OPTION%-x86_64.zip %BASE_PATH%\bin
  +            Rem Copy LSL and Brainflowlibraries manually
  +            xcopy %BASE_PATH%\applications\mne_scan\plugins\brainflowboard\brainflow\installed\lib\* %BASE_PATH%\bin\ /s /i
  +            xcopy %BASE_PATH%\applications\mne_scan\plugins\lsladapter\liblsl\build\install\bin\lsl.dll %BASE_PATH%\bin\ /i
  +        )
       )
       :; # ########## WINDOWS SECTION ENDS ####################
       :; # ####################################################
  
positive.code: 
      fi
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
      
      
      # ############## MAC SECTION ENDS ######################
      # ######################################################
  
  
negative.code:         echo "Variable ${LINK_OPTION} is not set."
          echo "Use: static or dynamic"
      else
          if [ ${LINK_OPTION} == "dynamic" ]; then
              # Call macdeployqt on all .app bundles in the bin folder
              for f in ./bin/*.app; do $Qt5_DIR/bin/macdeployqt $f ; done
  