paths settings: assume an installed openEMS on unix systems
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>pull/10/head
parent
0b4d957201
commit
8f4a1bd943
|
@ -85,7 +85,15 @@ struct_2_xml(nf2ff.xml,nf2ff_xml,'nf2ff');
|
||||||
|
|
||||||
m_filename = mfilename('fullpath');
|
m_filename = mfilename('fullpath');
|
||||||
dir_name = fileparts( m_filename );
|
dir_name = fileparts( m_filename );
|
||||||
|
|
||||||
|
if isunix
|
||||||
|
% <openEMS-path> could be /usr or ~/opt/openEMS etc.
|
||||||
|
% assume this file to be in '<openEMS-path>/share/openEMS/matlab/'
|
||||||
|
% assume openEMS binary to be in '<openEMS-path>/bin'
|
||||||
|
openEMS_Path = [dir_name filesep '../../../bin' filesep];
|
||||||
|
else
|
||||||
openEMS_Path = [dir_name filesep '..' filesep];
|
openEMS_Path = [dir_name filesep '..' filesep];
|
||||||
|
end
|
||||||
|
|
||||||
if ((exist(nf2ff.hdf5,'file') && (mode==0)) || (mode==2))
|
if ((exist(nf2ff.hdf5,'file') && (mode==0)) || (mode==2))
|
||||||
disp('CalcNF2FF: Reading nf2ff data only...')
|
disp('CalcNF2FF: Reading nf2ff data only...')
|
||||||
|
@ -104,7 +112,7 @@ cd(Sim_Path);
|
||||||
try
|
try
|
||||||
if isunix
|
if isunix
|
||||||
% remove LD_LIBRARY_PATH set by matlab
|
% remove LD_LIBRARY_PATH set by matlab
|
||||||
system(['export LD_LIBRARY_PATH=; ' openEMS_Path 'nf2ff/nf2ff ' filename '.xml']);
|
system(['export LD_LIBRARY_PATH=; ' openEMS_Path 'nf2ff ' filename '.xml']);
|
||||||
else
|
else
|
||||||
system([openEMS_Path 'nf2ff.exe ' filename '.xml']);
|
system([openEMS_Path 'nf2ff.exe ' filename '.xml']);
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,11 +31,15 @@ end
|
||||||
|
|
||||||
filename = mfilename('fullpath');
|
filename = mfilename('fullpath');
|
||||||
dir = fileparts( filename );
|
dir = fileparts( filename );
|
||||||
openEMS_Path = [dir filesep '../..' filesep];
|
|
||||||
|
|
||||||
if isunix
|
if isunix
|
||||||
|
% <openEMS-path> could be /usr or ~/opt/openEMS etc.
|
||||||
|
% assume this file to be in '<openEMS-path>/share/openEMS/matlab/private/'
|
||||||
|
% assume openEMS binary to be in '<openEMS-path>/bin'
|
||||||
|
openEMS_Path = [dir filesep '../../../../bin' filesep];
|
||||||
openEMS_Path = [openEMS_Path 'openEMS.sh'];
|
openEMS_Path = [openEMS_Path 'openEMS.sh'];
|
||||||
else
|
else
|
||||||
|
openEMS_Path = [dir filesep '../..' filesep];
|
||||||
openEMS_Path = [openEMS_Path 'openEMS'];
|
openEMS_Path = [openEMS_Path 'openEMS'];
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue