diff service/main.py @ 493:b3cedbee561d

refactoring: rename `cagou` to `libervia.desktop_kivy` + update imports and names following backend changes
author Goffi <goffi@goffi.org>
date Fri, 02 Jun 2023 18:26:16 +0200
parents 203755bbe0fe
children
line wrap: on
line diff
--- a/service/main.py	Fri Jun 02 17:53:09 2023 +0200
+++ b/service/main.py	Fri Jun 02 18:26:16 2023 +0200
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 
-# Cagou: desktop/mobile frontend for Salut à Toi XMPP client
+#Libervia Desktop-Kivy
 # Copyright (C) 2016-2018 Jérôme Poisson (goffi@goffi.org)
 
 # This program is free software: you can redistribute it and/or modify
@@ -18,13 +18,13 @@
 
 import sys
 import os
-# we want the service to access the modules from parent dir (sat, etc.)
+# we want the service to access the modules from parent dir (libervia.backend, etc.)
 os.chdir('..')
 sys.path.insert(0, '')
-from sat.core.constants import Const as C
-from sat.core import log_config
+from libervia.backend.core.constants import Const as C
+from libervia.backend.core import log_config
 # SàT log conf must be done before calling Kivy
-log_config.sat_configure(C.LOG_BACKEND_STANDARD, C)
+log_config.libervia_configure(C.LOG_BACKEND_STANDARD, C)
 # if this module is called, we should be on android,
 # but just in case...
 from kivy import utils as kivy_utils
@@ -33,7 +33,7 @@
     # so we change it to allow backend to detect android
     sys.platform = "android"
     C.PLUGIN_EXT = "pyc"
-from sat.core import sat_main
+from libervia.backend.core import main
 from twisted.internet import reactor
 from twisted.application import app, service
 from jnius import autoclass
@@ -43,8 +43,8 @@
 PythonService.mService.setAutoRestartService(True)
 
 
-sat = sat_main.SAT()
-application = service.Application("SàT backend")
-sat.setServiceParent(application)
+libervia_backend = main.LiberviaBackend()
+application = service.Application("Libervia backend")
+libervia_backend.setServiceParent(application)
 app.startApplication(application, None)
 reactor.run()