|
22 | 22 | import sys |
23 | 23 |
|
24 | 24 | from binaryninja.update import UpdateChannel, are_auto_updates_enabled, set_auto_updates_enabled, is_update_installation_pending, install_pending_update |
25 | | -from binaryninja import core_version |
| 25 | +from binaryninja import core_version_info, get_install_directory, user_directory |
26 | 26 | import datetime |
27 | 27 | from six.moves import input |
28 | 28 |
|
@@ -72,11 +72,11 @@ def select(version): |
72 | 72 | if are_auto_updates_enabled(): |
73 | 73 | print("Disabling automatic updates.") |
74 | 74 | set_auto_updates_enabled(False) |
75 | | - if (version.version == core_version()): |
| 75 | + if (version.version == core_version_info()): |
76 | 76 | print("Already running %s" % version.version) |
77 | 77 | else: |
78 | 78 | print("version.version %s" % version.version) |
79 | | - print("core_version %s" % core_version()) |
| 79 | + print("core_version %s" % core_version_info()) |
80 | 80 | print("Downloading...") |
81 | 81 | print(version.update()) |
82 | 82 | print("Installing...") |
@@ -120,8 +120,10 @@ def main(): |
120 | 120 | load_channel(chandefault) |
121 | 121 | while not done: |
122 | 122 | print("\n\tBinary Ninja Version Switcher") |
| 123 | + print("\t\tCurrent Install:\t%s" % get_install_directory()) |
| 124 | + print("\t\tCurrent User Path:\t%s" % user_directory()) |
123 | 125 | print("\t\tCurrent Channel:\t%s" % channel.name) |
124 | | - print("\t\tCurrent Version:\t%s" % core_version()) |
| 126 | + print("\t\tCurrent Version:\t%s" % core_version_info()) |
125 | 127 | print("\t\tAuto-Updates On:\t%s\n" % are_auto_updates_enabled()) |
126 | 128 | for index, version in enumerate(versions): |
127 | 129 | date = datetime.datetime.fromtimestamp(version.time).strftime('%c') |
|
0 commit comments