Changeset 47439ce in sasview
- Timestamp:
- May 2, 2018 6:15:59 AM (7 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
- Children:
- 360eff3
- Parents:
- b80d945
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasview/sasview.py
rb80d945 r47439ce 201 201 tools for installation 202 202 """ 203 #TODO: This doesn't work if someone uses different compiler e.g. gcc and has no cc installed. Will fix it203 import wx 204 204 import subprocess 205 #Generic message box is nessary here becuase standard MessageBox is not moveable 206 class GenericMessageBox(wx.Dialog): 207 def __init__(self, parent, text, title = ''): 208 wx.Dialog.__init__(self, parent, -1, title = title, 209 size = (360,140), pos=(20,20), 210 style = wx.DEFAULT_DIALOG_STYLE ) 211 panel = wx.Panel(self, wx.ID_ANY, size = (360, 100), pos = (0,0)) 212 panel.SetBackgroundColour('#FFFFFF') 213 label = wx.StaticText(panel, -1, text, pos = (0,20)) 214 panel2 = wx.Panel(self, wx.ID_ANY, size = (360, 40), pos = (0, 60)) 215 btn = wx.Button(panel2, wx.ID_OK, pos = (250,7)) 216 self.ShowModal() 217 218 205 219 logger = logging.getLogger(__name__) 206 220 try: 207 221 subprocess.check_output(["cc","--version"], stderr=subprocess.STDOUT) 208 222 except subprocess.CalledProcessError as exc: 209 #At this stage wx should be working as it is imported earlier210 import wx211 223 app = wx.App() 212 dlg = wx.MessageBox('No compiler installed. Please follow instruction for ' 213 'Xcode command line installation and restart SasView' 214 'SasView is terminating now', 215 'Info', wx.OK | wx.ICON_INFORMATION | wx.STAY_ON_TOP) 224 dlg = GenericMessageBox(parent=None, 225 text='No compiler installed. Please follow instruction for\n ' 226 'Xcode command line installation and restart SasView\n' 227 'SasView is terminating now\n', 228 title = 'Info') 216 229 dlg.Destroy() 230 217 231 logger.error("No compiler installed. %s\n"%(exc)) 218 232 logger.error(traceback.format_exc())
Note: See TracChangeset
for help on using the changeset viewer.