equal
deleted
inserted
replaced
26 from __future__ import print_function |
26 from __future__ import print_function |
27 import os |
27 import os |
28 import sys |
28 import sys |
29 import getopt |
29 import getopt |
30 import time |
30 import time |
|
31 |
|
32 import wx |
|
33 from wx.lib.agw.advancedsplash import AdvancedSplash |
|
34 |
31 import util.paths as paths |
35 import util.paths as paths |
32 |
36 |
33 |
37 |
34 class BeremizIDELauncher(object): |
38 class BeremizIDELauncher(object): |
35 def __init__(self): |
39 def __init__(self): |
45 |
49 |
46 def Bpath(self, *args): |
50 def Bpath(self, *args): |
47 return os.path.join(self.app_dir, *args) |
51 return os.path.join(self.app_dir, *args) |
48 |
52 |
49 def ShowSplashScreen(self): |
53 def ShowSplashScreen(self): |
50 from wx.lib.agw.advancedsplash import AdvancedSplash |
|
51 bmp = wx.Image(self.splashPath).ConvertToBitmap() |
54 bmp = wx.Image(self.splashPath).ConvertToBitmap() |
52 self.splash = AdvancedSplash(None, bitmap=bmp) |
55 self.splash = AdvancedSplash(None, bitmap=bmp) |
53 |
56 |
54 # process all events |
57 # process all events |
55 # even the events generated by splash themself during showing |
58 # even the events generated by splash themself during showing |
109 self.buildpath = args[1] |
112 self.buildpath = args[1] |
110 |
113 |
111 def CreateApplication(self): |
114 def CreateApplication(self): |
112 BMZ_DBG = os.path.exists("BEREMIZ_DEBUG") |
115 BMZ_DBG = os.path.exists("BEREMIZ_DEBUG") |
113 |
116 |
114 global wx |
|
115 import wx |
|
116 |
|
117 if wx.VERSION >= (3, 0, 0): |
117 if wx.VERSION >= (3, 0, 0): |
118 self.app = wx.App(redirect=BMZ_DBG) |
118 self.app = wx.App(redirect=BMZ_DBG) |
119 else: |
119 else: |
120 self.app = wx.PySimpleApp(redirect=BMZ_DBG) |
120 self.app = wx.PySimpleApp(redirect=BMZ_DBG) |
121 |
121 |
175 import version |
175 import version |
176 import util.ExceptionHandler |
176 import util.ExceptionHandler |
177 util.ExceptionHandler.AddExceptHook(version.app_version) |
177 util.ExceptionHandler.AddExceptHook(version.app_version) |
178 |
178 |
179 def ShowUI(self): |
179 def ShowUI(self): |
|
180 import BeremizIDE |
180 self.frame = BeremizIDE.Beremiz(None, self.projectOpen, self.buildpath) |
181 self.frame = BeremizIDE.Beremiz(None, self.projectOpen, self.buildpath) |
181 if self.splash: |
182 if self.splash: |
182 self.splash.Close() |
183 self.splash.Close() |
183 self.frame.Show() |
184 self.frame.Show() |
184 |
185 |