34 lines
663 B
Python
34 lines
663 B
Python
import sys
|
|
|
|
import gi
|
|
|
|
gi.require_version("Gtk", "4.0")
|
|
gi.require_version("Adw", "1")
|
|
|
|
from gi.repository import Adw, Gio, Gtk
|
|
|
|
from .ui.window import InstallerWindow
|
|
|
|
|
|
class IridiumInstallerApp(Adw.Application):
|
|
def __init__(self):
|
|
super().__init__(
|
|
application_id="org.iridium.Installer",
|
|
flags=Gio.ApplicationFlags.FLAGS_NONE,
|
|
)
|
|
|
|
def do_activate(self):
|
|
win = self.props.active_window
|
|
if not win:
|
|
win = InstallerWindow(application=self)
|
|
win.present()
|
|
|
|
|
|
def main():
|
|
app = IridiumInstallerApp()
|
|
return app.run(sys.argv)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|