X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fwinreg_importer.py;h=a9f5f8a7c0bf23dea8f7cefbd302824878e8b7a5;hb=8d22a2e350167e155a798ae50844e49e8597eb96;hp=2030934e9f163efb3df191e56f4776f816706a21;hpb=e8f056cf2745b5c0c892e9dc744fd55061d799e1;p=bertos.git diff --git a/wizard/winreg_importer.py b/wizard/winreg_importer.py index 2030934e..a9f5f8a7 100644 --- a/wizard/winreg_importer.py +++ b/wizard/winreg_importer.py @@ -22,30 +22,41 @@ try: except WindowsError: TOOLCHAIN_KEY = None +try: + CLI_KEY = OpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Develer\BeRTOS SDK\Ide Command Lines") +except WindowsError: + CLI_KEY = None + def getBertosDirs(): """ Returns the path of the BeRTOS versions installed by the BeRTOS SDK installer. """ - return getFromRegistry(DIR_KEY) + return getFromRegistry(DIR_KEY).values() def getBertosToolchains(): """ Returns the path of the executables of the toolchains installed by the BeRTOS SDK installer. """ - return getFromRegistry(TOOLCHAIN_KEY) + return getFromRegistry(TOOLCHAIN_KEY).values() + +def getCommandLines(): + """ + Returns the command lines to launch in order to open the selected IDE. + """ + return getFromRegistry(CLI_KEY) def getFromRegistry(key): """ Returns the value of all the named values of the given key. """ index = 0 - items = [] + items = {} if key: while True: try: - item = EnumValue(key, index)[1] - items.append(item) + item = EnumValue(key, index) + items[item[0]] = item[1] index += 1 except WindowsError: break