Skip to content
Snippets Groups Projects
Select Git revision
  • 108dd6195ab02b9764ed6292e748bf9a6623f53b
  • trunk
  • RELEASE_6_5_DRIVEDB
  • RELEASE_6_6_DRIVEDB
  • RELEASE_7_0_DRIVEDB
  • RELEASE_7_2_DRIVEDB
  • RELEASE_7_3_DRIVEDB
  • RELEASE_6_0_DRIVEDB
  • RELEASE_6_1_DRIVEDB
  • RELEASE_6_2_DRIVEDB
  • RELEASE_6_3_DRIVEDB
  • RELEASE_6_4_DRIVEDB
  • tags/RELEASE_7_4
  • tags/RELEASE_7_3
  • RELEASE_5_41_DRIVEDB
  • RELEASE_5_42_DRIVEDB
  • RELEASE_5_43_DRIVEDB
  • tags/RELEASE_7_2
  • tags/RELEASE_7_1
  • tags/RELEASE_7_0
  • RELEASE_5_40_DRIVEDB
21 results

Doxyfile

Blame
  • FT_check_for_kat_binary.m NaN GiB
    %---------------------------------------------------------------------  
    % function [FT] = FT_check_for_kat_binary(FT)
    % 
    % Checks if the Finesse binary can be found and tests which
    % kat.ini file can be used
    %
    % FT: FT structure
    %
    % Part of the SimTools package
    % Andreas Freise 22.05.08 afreise@googlemail.com
    %---------------------------------------------------------------------  
    
    function [FT] = FT_check_for_kat_binary(FT)
    
      baseid='FTchekforkat';
      
      if (~isstruct(FT))
        msgid=[baseid,':checkinarg'];
        result='input argument must be a FT structure';
        error(msgid,result);
      end
      
      disp('--------------------------------------------------------------------');
      % check if katbinary exists and produces a version output
      commandstring = [FT.katbinary,' -v'];
      [status,result]=system(commandstring);
      if (status)
        msgid=[baseid,':checkbinary'];
        result=['Cannot execute kat: ',result];
        error(msgid,result);
      else
        isFinesse=strfind(result,'Finesse');
        if (isFinesse)
          disp(['Finesse binary found: ',strtrim(result)]);
        else
          msgid=[baseid,':checkversion'];
          result=[FT.katbinary, ' does not seem to be Finesse binary'];
          error(msgid,result);      
        end
      end
      
      % check if local kat.ini exists
      local=exist('./kat.ini');
      
      if (local==2)
        FT.katini='./kat.ini';
        disp(['Using local kat.ini: ',FT.katini]);
      else
        % check if global or local kat.ini exists
        FT.katini=getenv('KATINI');
        if (FT.katini)
          disp(['Found global kat.ini: ',FT.katini]);
        else
          disp('No kat.ini file found.');
        end
      end