1 #!/usr/bin/env python
\r
4 # Copyright 2009 Develer S.r.l. (http://www.develer.com/)
\r
5 # All rights reserved.
\r
7 # $Id: qvariant_converter.py 2506 2009-04-15 08:29:07Z duplo $
\r
9 # Author: Lorenzo Berni <duplo@develer.com>
\r
12 from _winreg import *
\r
14 # Open the registry keys. When the keys don't exist it do nothing
\r
16 DIR_KEY = OpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Develer\BeRTOS SDK\BeRTOS Dirs")
\r
17 except WindowsError:
\r
21 TOOLCHAIN_KEY = OpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Develer\BeRTOS SDK\Toolchain Executables")
\r
22 except WindowsError:
\r
23 TOOLCHAIN_KEY = None
\r
25 def getBertosDirs():
\r
27 Returns the path of the BeRTOS versions installed by the BeRTOS SDK installer.
\r
29 return getFromRegistry(DIR_KEY)
\r
31 def getBertosToolchains():
\r
33 Returns the path of the executables of the toolchains installed by the BeRTOS
\r
36 return getFromRegistry(TOOLCHAIN_KEY)
\r
38 def getFromRegistry(key):
\r
40 Returns the value of all the named values of the given key.
\r
47 item = EnumValue(key, index)[1]
\r
50 except WindowsError:
\r