thliebig / openEMS

openEMS is a free and open-source electromagnetic field solver using the EC-FDTD method.
http://openEMS.de
GNU General Public License v3.0
427 stars 150 forks source link

[proposed bug] Can't find openEMS binary if path has spaces on Windows #93

Closed Nistp closed 2 years ago

Nistp commented 2 years ago

Hi,

First of all, thank you so much for your awesome work!

I'm encountering this issue where on my Windows PC, I'm getting the following error when running the helical antenna tutorial:

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
args = "Helix_Ant.xml"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
error: openEMS binary exited with error-code 1
error: called from
    invoke_openEMS at line 50 column 2
    RunOpenEMS at line 181 column 9
    Helical_Antenna at line 128 column 5

From the error message and the fact that I've had success running the tutorial on a different PC, in which I've put the openEMS folder in C (C:/openEMS), I'll say that the problem is the path--more specifically, it's the space in "Program Files" where I put the openEMS folder on this PC.

I've traced it back to matlab/private/invoke_openEMS.m line 34: openEMS_bin = searchBinary('openEMS.exe', [dir filesep '..' filesep '..' filesep]);

I'd like to fix it myself, but I can't find the "searchBinary" function's definition anywhere in this repository or in Matlab's documentation. Could you please point me to where I can find more information about it?

Thank you!

thliebig commented 2 years ago

Well you will not find it in openEMS. It's in CSXCAD which openEMS builds/depends on. So I guess this can be closed here? Happy fixing ;)