except WindowsError:\r
TOOLCHAIN_KEY = None\r
\r
+try:\r
+ CLI_KEY = OpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Develer\BeRTOS SDK\Command Lines")\r
+except WindowsError:\r
+ CLI_KEY = None\r
+\r
def getBertosDirs():\r
"""\r
Returns the path of the BeRTOS versions installed by the BeRTOS SDK installer.\r
"""\r
- return getFromRegistry(DIR_KEY)\r
+ return getFromRegistry(DIR_KEY).values()\r
\r
def getBertosToolchains():\r
"""\r
Returns the path of the executables of the toolchains installed by the BeRTOS\r
SDK installer.\r
"""\r
- return getFromRegistry(TOOLCHAIN_KEY)\r
+ return getFromRegistry(TOOLCHAIN_KEY).values()\r
+\r
+def getCommandLines():\r
+ """\r
+ Returns the command lines to launch in order to open the selected IDE.\r
+ """\r
+ return getFromRegistry(CLI_KEY)\r
\r
def getFromRegistry(key):\r
"""\r
Returns the value of all the named values of the given key.\r
"""\r
index = 0\r
- items = []\r
+ items = {}\r
if key:\r
while True:\r
try:\r
- item = EnumValue(key, index)[1]\r
- items.append(item)\r
+ item = EnumValue(key, index)\r
+ items[item[0]] = item[1]\r
index += 1\r
except WindowsError:\r
break\r