gnome-music.in 668 Bytes
Newer Older
Vadim Rutkovsky's avatar
Vadim Rutkovsky committed
1
#!/usr/bin/env python3
Guillaume Quintard's avatar
Guillaume Quintard committed
2

3
import sys, signal
4
from gi.repository import Gio
Guillaume Quintard's avatar
Guillaume Quintard committed
5 6 7 8 9
sys.path.insert(1, '@pythondir@')

from gnomemusic.application import Application

if __name__ == "__main__":
10
    # We use our own libgd.so, so let gi.repository find it
Vadim Rutkovsky's avatar
Vadim Rutkovsky committed
11
    from gi.repository import GIRepository
12 13
    GIRepository.Repository.prepend_search_path('@libdir@/gnome-music')
    GIRepository.Repository.prepend_library_path('@libdir@/gnome-music')
Vadim Rutkovsky's avatar
Vadim Rutkovsky committed
14

15 16 17
    resource = Gio.resource_load("data/gnome-music.gresource")
    Gio.Resource._register(resource)

18
    app = Application()
Vadim Rutkovsky's avatar
Vadim Rutkovsky committed
19
    signal.signal(signal.SIGINT, signal.SIG_DFL)
20 21
    exit_status = app.run(sys.argv)
    sys.exit(exit_status)