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
731 B

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