Home > vbmeg > external > iso2mesh > fallbackexeext.m

fallbackexeext

PURPOSE ^

SYNOPSIS ^

function exesuff=fallbackexeext(exesuffix, exename)

DESCRIPTION ^

 exesuff=fallbackexeext(exesuffix, exename)

 get the fallback external tool extension names for the current platform

 author: Qianqian Fang, <q.fang at neu.edu>

 input:
     exesuffix: the output executable suffix from getexeext
     exename: the executable name

 output:
     exesuff: file extension for iso2mesh tool binaries

 -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function exesuff=fallbackexeext(exesuffix, exename)
0002 %
0003 % exesuff=fallbackexeext(exesuffix, exename)
0004 %
0005 % get the fallback external tool extension names for the current platform
0006 %
0007 % author: Qianqian Fang, <q.fang at neu.edu>
0008 %
0009 % input:
0010 %     exesuffix: the output executable suffix from getexeext
0011 %     exename: the executable name
0012 %
0013 % output:
0014 %     exesuff: file extension for iso2mesh tool binaries
0015 %
0016 % -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net)
0017 %
0018 
0019 exesuff=exesuffix;
0020 if(strcmp(exesuff,'.mexa64') & exist([mcpath(exename) exesuff],'file')==0) % fall back to i386 linux
0021         exesuff='.mexglx';
0022 end
0023 if(strcmp(exesuff,'.mexmaci64') & exist([mcpath(exename) exesuff],'file')==0) % fall back to i386 mac
0024         exesuff='.mexmaci';
0025 end
0026 if(strcmp(exesuff,'.mexmaci') & exist([mcpath(exename) exesuff],'file')==0) % fall back to ppc mac
0027         exesuff='.mexmac';
0028 end
0029 if(exist([mcpath(exename) exesuff],'file')==0) % fall back to OS native package
0030         exesuff='';
0031 end
0032 
0033 if(exist([mcpath(exename) exesuff],'file')==0)
0034         if(strcmp(exename,'tetgen'))
0035                return;
0036         end  
0037         error([ 'The following executable:\n' ...
0038                         '\t%s%s\n' ...
0039                         'is missing. Please download it from ' ...
0040                         'https://github.com/fangq/iso2mesh/tree/master/bin/ ' ...
0041                         'and save it to the above path, then rerun the script.\n' ...
0042                 ],mcpath(exename),getexeext);
0043 end
0044

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005