Commit 7f8bb920 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
parents 7e94b03b ecf56fda
Subproject commit b05bb19ffd8d213e53f1f273e0b58ffa4b087692
Subproject commit fe4253f5e42dc6bc8c9c6aa6a9f177667d3861e9
......@@ -7,24 +7,26 @@ from PySide.QtGui import (QApplication,
QMessageBox)
def install_gr740_rtems410_gaisler_posix():
print 'Installing this nice target'
""" $ /home/taste/tool-src/add-ons/install-gaisler-4.10.sh """
os.system("xterm -e $HOME/tool-src/add-ons/install-gaisler-4.10.sh")
def check_gr740_rtems410_gaisler_posix():
if not os.path.isdir("/opt/rtems-4.10"):
raise NotImplementedError(install_gr740_rtems410_gaisler_posix)
PLATFORMS = { "crazyflie_v2.gnat" : lambda: True,
"stm32f4_discovery.gnat" : lambda: True,
"leon.rtems_posix" : lambda: True,
"leon2.rtems412_posix" : lambda: True,
"leon3.rtems412_posix" : lambda: True,
"gr712.rtems412_posix" : lambda: True,
"gr740.rtems412_posix" : lambda: True,
"gr740.rtems410_gaisler_posix" :
# When editing, replace dot (.) with underscore (_)
# the TASTE GUI mixes them up if there is more than one underscore
PLATFORMS = { "crazyflie_v2_gnat" : lambda: True,
"stm32f4_discovery_gnat" : lambda: True,
"leon_rtems_posix" : lambda: True,
"leon2_rtems412_posix" : lambda: True,
"leon3_rtems412_posix" : lambda: True,
"gr712_rtems412_posix" : lambda: True,
"gr740_rtems412_posix" : lambda: True,
"gr740_rtems410_gaisler_posix" :
check_gr740_rtems410_gaisler_posix,
"x86.linux" : lambda: True,
"x86.win32" : lambda: True
"x86_linux" : lambda: True,
"x86_win32" : lambda: True
}
def query_user(platform):
......@@ -37,21 +39,14 @@ def query_user(platform):
msg_box.setIcon(QMessageBox.Warning)
msg_box.setText("Do you want to install target\n{} ?".format(platform))
msg_box.exec_()
if msg_box.clickedButton() == ok:
return True
else:
warn_box = QMessageBox()
warn_box.setIcon(QMessageBox.Information)
warn_box.setText("You can install the platform later, manually")
warn_box.exec_()
return False
return msg_box.clickedButton() == ok
def main():
app = QApplication(sys.argv)
# check if the target in supported
try:
platform = sys.argv[1]
PLATFORMS[platform]()
PLATFORMS[platform.replace('.', '_')]()
except KeyError:
warn_box = QMessageBox()
warn_box.setIcon(QMessageBox.Information)
......@@ -64,6 +59,13 @@ def main():
install_it, = exc.args
if query_user(platform):
install_it()
else:
warn_box = QMessageBox()
warn_box.setIcon(QMessageBox.Information)
warn_box.setText("You can install the platform later by typing:\n"
+ str(install_it.__doc__))
warn_box.exec_()
else:
print("Platform {} is installed".format(platform))
sys.exit(0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment