bdbcat / oesenc_pi

GNU General Public License v2.0
10 stars 17 forks source link

hare's feet in DYLD_LIBRARY_PATH #68

Closed leamas closed 4 years ago

leamas commented 4 years ago

Ok, that should be quotation marks.

The logfile on macos reveals:

Using DYLD_LIBRARY_PATH: /Users/al/Library/Application Support/OpenCPN/Contents/Plugins:/Applications/OpenCPN.app/Contents/Plugins:"/Applications/OpenCPN.app/Contents/MacOS/PlugIns/oesenc_pi"

This will obviously not fly, the quotation marks should not be there. An untested patch (since PRs are so messy...)

-- a/src/oesenc_pi.cpp
+++ b/src/oesenc_pi.cpp
@@ -731,7 +731,7 @@ int oesenc_pi::Init(void)

 #ifdef __WXMAC__
     // Set environment variable to find the required sglock dongle library
-    wxString libDir = _T("\"") + fn_exe.GetPath( wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR) + _T("PlugIns/oesenc_pi" _T("\""));
+    wxString libDir = fn_exe.GetPath( wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR) + _T("PlugIns/oesenc_pi");
     wxSetEnv(_T("DYLD_LIBRARY_PATH"), libDir ); 
     wxLogMessage(_T("OSX LIB DYLD_LIBRARY_PATH: ") + libDir);
 #endif
leamas commented 4 years ago

BTW: If I understand this correct, using _T() is obsolete: https://docs.wxwidgets.org/3.0/group__group__funcmacro__string.html#ga437ea6ba615b75dac8603e96ec864160 (wxT() is identical to T() )

bdbcat commented 4 years ago

Patch merged, building now

leamas commented 4 years ago

Thanks!

Tested, no tracks of hares in DYLD_LIBRARY_PATH.

The path is long with duplicates. Leaving for now.

leamas commented 4 years ago

Fixed, closing