[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Freemdiams on GNUmed(Windows)
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] Freemdiams on GNUmed(Windows) |
Date: |
Mon, 31 Oct 2011 16:45:21 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Oct 29, 2011 at 03:59:07PM +0200, Hilbert, Sebastian wrote:
> What is the state of FreeDiams support from within GNUmed on the Windows
> platform ?
The same as on Linux, code-wise.
> From the log of GNUmed 0.9.11 it looks like it is only looking in unix-style
> directories rather then C:\Programme\FreeDiams
Can you send me a log ?
This is what gmMedication.py::cFreeDiamsInterface.__detect_binary() does:
#--------------------------------------------------------
def __detect_binary(self):
if self.path_to_binary is not None:
return True
found, cmd = gmShellAPI.find_first_binary(binaries = [
r'/usr/bin/freediams',
r'freediams',
r'/Applications/FreeDiams.app/Contents/MacOs/FreeDiams',
r'C:\Program Files\FreeDiams\freediams.exe',
r'c:\programs\freediams\freediams.exe',
r'freediams.exe'
])
if found:
self.path_to_binary = cmd
return True
try:
self.custom_path_to_binary
except AttributeError:
_log.error('cannot find FreeDiams binary, no custom
path set')
return False
if self.custom_path_to_binary is None:
_log.error('cannot find FreeDiams binary')
return False
found, cmd = gmShellAPI.detect_external_binary(binary =
self.custom_path_to_binary)
if found:
self.path_to_binary = cmd
return True
_log.error('cannot find FreeDiams binary')
return False
#--------------------------------------------------------
find_first_binary() calls gmShellAPI.py::detect_external_binary()
on each of the candidates.
> Actually now that I write this I see that it is searching the PATH variable.
Among other things, yes.
> Looks like placing c:\Programme\FreeDiams in the PATH makes it work
Sure, and if you send me a list of c:\programs\ in all of
the world's 300 major languages (or else an explanation of
what the heck Microsoft was thinking) we can improve that.
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346