path cleanups and windows fixes
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
This commit is contained in:
parent
58a5b6d452
commit
cfb43c4429
@ -77,8 +77,8 @@ nf2ff_xml.ATTRIBUTE.freq = freq;
|
||||
nf2ff_xml.theta = theta;
|
||||
nf2ff_xml.phi = phi;
|
||||
|
||||
nf2ff.xml = [Sim_Path '/' filename '.xml'];
|
||||
nf2ff.hdf5 = [Sim_Path '/' nf2ff_xml.ATTRIBUTE.Outfile];
|
||||
nf2ff.xml = [Sim_Path '' filesep '' filename '.xml'];
|
||||
nf2ff.hdf5 = [Sim_Path '' filesep '' nf2ff_xml.ATTRIBUTE.Outfile];
|
||||
|
||||
% create nf2ff structure
|
||||
struct_2_xml(nf2ff.xml,nf2ff_xml,'nf2ff');
|
||||
@ -88,13 +88,13 @@ dir_name = fileparts( m_filename );
|
||||
|
||||
if isunix
|
||||
% try development path
|
||||
nf2ff_bin = [dir_name filesep '../nf2ff' filesep 'nf2ff'];
|
||||
nf2ff_bin = [dir_name filesep '..' filesep 'nf2ff' filesep 'nf2ff'];
|
||||
if (~exist(nf2ff_bin,'file'))
|
||||
% fallback to install path
|
||||
nf2ff_bin = [dir_name filesep '../../../bin' filesep 'nf2ff'];
|
||||
nf2ff_bin = [dir_name filesep '..' filesep '..' filesep '..' filesep 'bin' filesep 'nf2ff'];
|
||||
end
|
||||
else
|
||||
nf2ff_bin = [dir_name filesep '..' filesep nf2ff.exe];
|
||||
nf2ff_bin = [dir_name filesep '..' filesep 'nf2ff.exe'];
|
||||
end
|
||||
|
||||
if ((exist(nf2ff.hdf5,'file') && (mode==0)) || (mode==2))
|
||||
@ -113,7 +113,7 @@ cd(Sim_Path);
|
||||
|
||||
try
|
||||
if (~exist(nf2ff_bin,'file'))
|
||||
error('openEMS:CalcNF2FF',['Binary not found: ' nf2ff_bin]);
|
||||
error('openEMS:CalcNF2FF','nf2ff binary not found!');
|
||||
end
|
||||
if isunix
|
||||
% remove LD_LIBRARY_PATH set by matlab
|
||||
|
@ -28,18 +28,18 @@ dir = fileparts( filename );
|
||||
|
||||
if isunix
|
||||
% try development path
|
||||
openEMS_bin = [dir filesep '../..' filesep 'openEMS.sh'];
|
||||
openEMS_bin = [dir filesep '..' filesep '..' filesep 'openEMS.sh'];
|
||||
if (~exist(openEMS_bin,'file'))
|
||||
% fallback to install path
|
||||
openEMS_bin = [dir filesep '../../../../bin' filesep 'openEMS.sh'];
|
||||
openEMS_bin = [dir filesep '..' filesep '..' filesep '..' filesep '..' filesep 'bin' filesep 'openEMS.sh'];
|
||||
end
|
||||
else
|
||||
openEMS_bin = [dir filesep '../..' filesep];
|
||||
openEMS_bin = [openEMS_bin 'openEMS'];
|
||||
else % assume windows
|
||||
openEMS_bin = [dir filesep '..' filesep '..' filesep];
|
||||
openEMS_bin = [openEMS_bin 'openEMS.exe'];
|
||||
end
|
||||
|
||||
if (~exist(openEMS_bin,'file'))
|
||||
error('openEMS:invoke_openEMS',['Binary not found: ' openEMS_bin]);
|
||||
error('openEMS:invoke_openEMS', 'openEMS binary not found!');
|
||||
end
|
||||
|
||||
command = [openEMS_bin ' ' opts];
|
||||
|
Loading…
Reference in New Issue
Block a user