equal
deleted
inserted
replaced
41 from wx.lib.agw.advancedsplash import AdvancedSplash |
41 from wx.lib.agw.advancedsplash import AdvancedSplash |
42 |
42 |
43 def Bpath(*args): |
43 def Bpath(*args): |
44 return os.path.join(beremiz_dir,*args) |
44 return os.path.join(beremiz_dir,*args) |
45 |
45 |
|
46 def ShowSplashScreen(): |
|
47 bmp = wx.Image(Bpath("images", "splash.png")).ConvertToBitmap() |
|
48 #splash=AdvancedSplash(None, bitmap=bmp, style=wx.SPLASH_CENTRE_ON_SCREEN, timeout=4000) |
|
49 splash = AdvancedSplash(None, bitmap=bmp) |
|
50 |
|
51 # process all events |
|
52 # even the events generated by splash themself during showing |
|
53 for i in range(0,30): |
|
54 wx.Yield() |
|
55 time.sleep(0.01); |
|
56 return splash |
|
57 |
46 if __name__ == '__main__': |
58 if __name__ == '__main__': |
47 def usage(): |
59 def usage(): |
48 print "\nUsage of Beremiz.py :" |
60 print "\nUsage of Beremiz.py :" |
49 print "\n %s [Projectpath] [Buildpath]\n"%sys.argv[0] |
61 print "\n %s [Projectpath] [Buildpath]\n"%sys.argv[0] |
50 |
62 |
92 app.SetAppName('beremiz') |
104 app.SetAppName('beremiz') |
93 if wx.VERSION < (3, 0, 0): |
105 if wx.VERSION < (3, 0, 0): |
94 wx.InitAllImageHandlers() |
106 wx.InitAllImageHandlers() |
95 |
107 |
96 # popup splash |
108 # popup splash |
97 bmp = wx.Image(Bpath("images", "splash.png")).ConvertToBitmap() |
109 splash = ShowSplashScreen() |
98 #splash=AdvancedSplash(None, bitmap=bmp, style=wx.SPLASH_CENTRE_ON_SCREEN, timeout=4000) |
110 |
99 splash=AdvancedSplash(None, bitmap=bmp) |
|
100 wx.Yield() |
|
101 |
|
102 if updateinfo_url is not None: |
111 if updateinfo_url is not None: |
103 updateinfo = "Fetching %s" % updateinfo_url |
112 updateinfo = "Fetching %s" % updateinfo_url |
104 # warn for possible updates |
113 # warn for possible updates |
105 def updateinfoproc(): |
114 def updateinfoproc(): |
106 global updateinfo |
115 global updateinfo |