Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
taste-setup
Commits
7f8bb920
Commit
7f8bb920
authored
Oct 06, 2017
by
Thanassis Tsiodras
Browse files
Merge branch 'master' of
https://gitrepos.estec.esa.int/taste/taste-setup
parents
7e94b03b
ecf56fda
Changes
2
Hide whitespace changes
Inline
Side-by-side
ellidiss-GUI
@
fe4253f5
Compare
b05bb19f
...
fe4253f5
Subproject commit
b05bb19ffd8d213e53f1f273e0b58ffa4b087692
Subproject commit
fe4253f5e42dc6bc8c9c6aa6a9f177667d3861e9
misc/helper-scripts/check-deployment-target-gui.py
View file @
7f8bb920
...
@@ -7,51 +7,46 @@ from PySide.QtGui import (QApplication,
...
@@ -7,51 +7,46 @@ from PySide.QtGui import (QApplication,
QMessageBox
)
QMessageBox
)
def
install_gr740_rtems410_gaisler_posix
():
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
():
def
check_gr740_rtems410_gaisler_posix
():
if
not
os
.
path
.
isdir
(
"/opt/rtems-4.10"
):
if
not
os
.
path
.
isdir
(
"/opt/rtems-4.10"
):
raise
NotImplementedError
(
install_gr740_rtems410_gaisler_posix
)
raise
NotImplementedError
(
install_gr740_rtems410_gaisler_posix
)
# When editing, replace dot (.) with underscore (_)
PLATFORMS
=
{
"crazyflie_v2.gnat"
:
lambda
:
True
,
# the TASTE GUI mixes them up if there is more than one underscore
"stm32f4_discovery.gnat"
:
lambda
:
True
,
PLATFORMS
=
{
"crazyflie_v2_gnat"
:
lambda
:
True
,
"leon.rtems_posix"
:
lambda
:
True
,
"stm32f4_discovery_gnat"
:
lambda
:
True
,
"leon2.rtems412_posix"
:
lambda
:
True
,
"leon_rtems_posix"
:
lambda
:
True
,
"leon3.rtems412_posix"
:
lambda
:
True
,
"leon2_rtems412_posix"
:
lambda
:
True
,
"gr712.rtems412_posix"
:
lambda
:
True
,
"leon3_rtems412_posix"
:
lambda
:
True
,
"gr740.rtems412_posix"
:
lambda
:
True
,
"gr712_rtems412_posix"
:
lambda
:
True
,
"gr740.rtems410_gaisler_posix"
:
"gr740_rtems412_posix"
:
lambda
:
True
,
"gr740_rtems410_gaisler_posix"
:
check_gr740_rtems410_gaisler_posix
,
check_gr740_rtems410_gaisler_posix
,
"x86
.
linux"
:
lambda
:
True
,
"x86
_
linux"
:
lambda
:
True
,
"x86
.
win32"
:
lambda
:
True
"x86
_
win32"
:
lambda
:
True
}
}
def
query_user
(
platform
):
def
query_user
(
platform
):
msg_box
=
QMessageBox
()
msg_box
=
QMessageBox
()
msg_box
.
setWindowTitle
(
"This plaform is not installed!"
)
msg_box
.
setWindowTitle
(
"This plaform is not installed!"
)
ok
=
msg_box
.
addButton
(
"Install now"
,
QMessageBox
.
AcceptRole
)
ok
=
msg_box
.
addButton
(
"Install now"
,
QMessageBox
.
AcceptRole
)
later
=
msg_box
.
addButton
(
"Install later"
,
QMessageBox
.
RejectRole
)
later
=
msg_box
.
addButton
(
"Install later"
,
QMessageBox
.
RejectRole
)
msg_box
.
setEscapeButton
(
later
)
msg_box
.
setEscapeButton
(
later
)
msg_box
.
setDefaultButton
(
ok
)
msg_box
.
setDefaultButton
(
ok
)
msg_box
.
setIcon
(
QMessageBox
.
Warning
)
msg_box
.
setIcon
(
QMessageBox
.
Warning
)
msg_box
.
setText
(
"Do you want to install target
\n
{} ?"
.
format
(
platform
))
msg_box
.
setText
(
"Do you want to install target
\n
{} ?"
.
format
(
platform
))
msg_box
.
exec_
()
msg_box
.
exec_
()
if
msg_box
.
clickedButton
()
==
ok
:
return
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
def
main
():
def
main
():
app
=
QApplication
(
sys
.
argv
)
app
=
QApplication
(
sys
.
argv
)
# check if the target in supported
# check if the target in supported
try
:
try
:
platform
=
sys
.
argv
[
1
]
platform
=
sys
.
argv
[
1
]
PLATFORMS
[
platform
]()
PLATFORMS
[
platform
.
replace
(
'.'
,
'_'
)
]()
except
KeyError
:
except
KeyError
:
warn_box
=
QMessageBox
()
warn_box
=
QMessageBox
()
warn_box
.
setIcon
(
QMessageBox
.
Information
)
warn_box
.
setIcon
(
QMessageBox
.
Information
)
...
@@ -64,6 +59,13 @@ def main():
...
@@ -64,6 +59,13 @@ def main():
install_it
,
=
exc
.
args
install_it
,
=
exc
.
args
if
query_user
(
platform
):
if
query_user
(
platform
):
install_it
()
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
:
else
:
print
(
"Platform {} is installed"
.
format
(
platform
))
print
(
"Platform {} is installed"
.
format
(
platform
))
sys
.
exit
(
0
)
sys
.
exit
(
0
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment