Beremiz.py
changeset 1796 4f7a0c40a7c3
parent 1792 4d1de8b0183f
child 1805 52daabbb6f90
equal deleted inserted replaced
1795:e27d253bd0ba 1796:4f7a0c40a7c3
    31 import util.paths as paths
    31 import util.paths as paths
    32 
    32 
    33 
    33 
    34 class BeremizIDELauncher:
    34 class BeremizIDELauncher:
    35     def __init__(self):
    35     def __init__(self):
       
    36         self.app = None
       
    37         self.frame = None
    36         self.updateinfo_url = None
    38         self.updateinfo_url = None
    37         self.extensions = []
    39         self.extensions = []
    38         self.app_dir = paths.AbsDir(__file__)
    40         self.app_dir = paths.AbsDir(__file__)
    39         self.projectOpen = None
    41         self.projectOpen = None
    40         self.buildpath = None
    42         self.buildpath = None
   124         if wx.VERSION < (3, 0, 0):
   126         if wx.VERSION < (3, 0, 0):
   125             wx.InitAllImageHandlers()
   127             wx.InitAllImageHandlers()
   126 
   128 
   127         self.ShowSplashScreen()
   129         self.ShowSplashScreen()
   128         self.BackgroundInitialization()
   130         self.BackgroundInitialization()
   129         self.app.MainLoop()
       
   130 
   131 
   131     def BackgroundInitialization(self):
   132     def BackgroundInitialization(self):
   132         self.InitI18n()
   133         self.InitI18n()
   133         self.CheckUpdates()
   134         self.CheckUpdates()
   134         self.LoadExtensions()
   135         self.LoadExtensions()
   182         self.frame = BeremizIDE.Beremiz(None, self.projectOpen, self.buildpath)
   183         self.frame = BeremizIDE.Beremiz(None, self.projectOpen, self.buildpath)
   183         if self.splash:
   184         if self.splash:
   184             self.splash.Close()
   185             self.splash.Close()
   185         self.frame.Show()
   186         self.frame.Show()
   186 
   187 
   187     def Start(self):
   188     def PreStart(self):
   188         self.ProcessCommandLineArgs()
   189         self.ProcessCommandLineArgs()
   189         self.CreateApplication()
   190         self.CreateApplication()
       
   191 
       
   192     def MainLoop(self):
       
   193         self.app.MainLoop()
       
   194 
       
   195     def Start(self):
       
   196         self.PreStart()
       
   197         self.MainLoop()
   190 
   198 
   191 
   199 
   192 if __name__ == '__main__':
   200 if __name__ == '__main__':
   193     beremiz = BeremizIDELauncher()
   201     beremiz = BeremizIDELauncher()
   194     beremiz.Start()
   202     beremiz.Start()