diff options
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 11 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig.py | 8 |
2 files changed, 12 insertions, 7 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 95402e04ba..d8d09871cf 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
@@ -37,6 +37,7 @@ from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ | |||
37 | AdvancedSettingDialog, LayerSelectionDialog, \ | 37 | AdvancedSettingDialog, LayerSelectionDialog, \ |
38 | DeployImageDialog | 38 | DeployImageDialog |
39 | from bb.ui.crumbs.persistenttooltip import PersistentTooltip | 39 | from bb.ui.crumbs.persistenttooltip import PersistentTooltip |
40 | import bb.ui.crumbs.utils | ||
40 | 41 | ||
41 | class Configuration: | 42 | class Configuration: |
42 | '''Represents the data structure of configuration.''' | 43 | '''Represents the data structure of configuration.''' |
@@ -969,12 +970,13 @@ class Builder(gtk.Window): | |||
969 | if response == gtk.RESPONSE_YES: | 970 | if response == gtk.RESPONSE_YES: |
970 | source_env_path = os.path.join(self.parameters.core_base, "oe-init-build-env") | 971 | source_env_path = os.path.join(self.parameters.core_base, "oe-init-build-env") |
971 | tmp_path = self.parameters.tmpdir | 972 | tmp_path = self.parameters.tmpdir |
973 | cmdline = bb.ui.crumbs.utils.which_terminal() | ||
972 | if os.path.exists(image_path) and os.path.exists(kernel_path) \ | 974 | if os.path.exists(image_path) and os.path.exists(kernel_path) \ |
973 | and os.path.exists(source_env_path) and os.path.exists(tmp_path): | 975 | and os.path.exists(source_env_path) and os.path.exists(tmp_path) |
974 | cmdline = "/usr/bin/xterm -e " | 976 | and cmdline: |
975 | cmdline += "\" export OE_TMPDIR=" + tmp_path + "; " | 977 | cmdline += "\' bash -c \"export OE_TMPDIR=" + tmp_path + "; " |
976 | cmdline += "source " + source_env_path + " " + os.getcwd() + "; " | 978 | cmdline += "source " + source_env_path + " " + os.getcwd() + "; " |
977 | cmdline += "runqemu " + kernel_path + " " + image_path + "; bash\"" | 979 | cmdline += "runqemu " + kernel_path + " " + image_path + "\"\'" |
978 | subprocess.Popen(shlex.split(cmdline)) | 980 | subprocess.Popen(shlex.split(cmdline)) |
979 | else: | 981 | else: |
980 | lbl = "<b>Path error</b>\nOne of your paths is wrong," | 982 | lbl = "<b>Path error</b>\nOne of your paths is wrong," |
@@ -983,6 +985,7 @@ class Builder(gtk.Window): | |||
983 | lbl = lbl + "kernel path:" + kernel_path + "\n" | 985 | lbl = lbl + "kernel path:" + kernel_path + "\n" |
984 | lbl = lbl + "source environment path:" + source_env_path + "\n" | 986 | lbl = lbl + "source environment path:" + source_env_path + "\n" |
985 | lbl = lbl + "tmp path: " + tmp_path + "." | 987 | lbl = lbl + "tmp path: " + tmp_path + "." |
988 | lbl = lbl + "You may be missing either xterm or vte for terminal services." | ||
986 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR) | 989 | dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR) |
987 | button = dialog.add_button("Close", gtk.RESPONSE_OK) | 990 | button = dialog.add_button("Close", gtk.RESPONSE_OK) |
988 | HobButton.style_button(button) | 991 | HobButton.style_button(button) |
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py index 016fb59acb..5cc8a5931a 100644 --- a/bitbake/lib/bb/ui/crumbs/hig.py +++ b/bitbake/lib/bb/ui/crumbs/hig.py | |||
@@ -30,6 +30,7 @@ import shlex | |||
30 | from bb.ui.crumbs.hobcolor import HobColors | 30 | from bb.ui.crumbs.hobcolor import HobColors |
31 | from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker | 31 | from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker |
32 | from bb.ui.crumbs.progressbar import HobProgressBar | 32 | from bb.ui.crumbs.progressbar import HobProgressBar |
33 | import bb.ui.crumbs.utils | ||
33 | 34 | ||
34 | """ | 35 | """ |
35 | The following are convenience classes for implementing GNOME HIG compliant | 36 | The following are convenience classes for implementing GNOME HIG compliant |
@@ -739,9 +740,10 @@ class DeployImageDialog (CrumbsDialog): | |||
739 | if response_id == gtk.RESPONSE_YES: | 740 | if response_id == gtk.RESPONSE_YES: |
740 | combo_item = self.usb_combo.get_active_text() | 741 | combo_item = self.usb_combo.get_active_text() |
741 | if combo_item and combo_item != self.__dummy_usb__: | 742 | if combo_item and combo_item != self.__dummy_usb__: |
742 | cmdline = "/usr/bin/xterm -e " | 743 | cmdline = bb.ui.crumbs.utils.which_terminal() |
743 | cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "; bash\"" | 744 | if cmdline: |
744 | subprocess.Popen(args=shlex.split(cmdline)) | 745 | cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "\"" |
746 | subprocess.Popen(args=shlex.split(cmdline)) | ||
745 | 747 | ||
746 | def update_progress_bar(self, title, fraction, status=None): | 748 | def update_progress_bar(self, title, fraction, status=None): |
747 | self.progress_bar.update(fraction) | 749 | self.progress_bar.update(fraction) |