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
26 CLI_KEY = OpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Develer\BeRTOS SDK\Ide Command Lines")
\r
27 except WindowsError:
\r
30 def getBertosDirs():
\r
32 Returns the path of the BeRTOS versions installed by the BeRTOS SDK installer.
\r
34 return getFromRegistry(DIR_KEY).values()
\r
36 def getBertosToolchains():
\r
38 Returns the path of the executables of the toolchains installed by the BeRTOS
\r
41 return getFromRegistry(TOOLCHAIN_KEY).values()
\r
43 def getCommandLines():
\r
45 Returns the command lines to launch in order to open the selected IDE.
\r
47 return getFromRegistry(CLI_KEY)
\r
49 def getFromRegistry(key):
\r
51 Returns the value of all the named values of the given key.
\r
58 item = EnumValue(key, index)
\r
59 items[item[0]] = item[1]
\r
61 except WindowsError:
\r