You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
698 B

  1. '''
  2. Main runner entry point for Gooey.
  3. '''
  4. import wx
  5. import wx.lib.inspection
  6. from gooey.gui.lang import i18n
  7. from gooey.gui import image_repository
  8. from gooey.gui.containers.application import GooeyApplication
  9. from gooey.util.functional import merge
  10. def run(build_spec):
  11. app = build_app(build_spec)
  12. app.MainLoop()
  13. def build_app(build_spec):
  14. app = wx.App(False)
  15. i18n.load(build_spec['language_dir'], build_spec['language'], build_spec['encoding'])
  16. imagesPaths = image_repository.loadImages(build_spec['image_dir'])
  17. gapp = GooeyApplication(merge(build_spec, imagesPaths))
  18. # wx.lib.inspection.InspectionTool().Show()
  19. gapp.Show()
  20. return app