]> glassweightruler.freedombox.rocks Git - waydroid.git/blobdiff - tools/__init__.py
app_manager: Add launch intent
[waydroid.git] / tools / __init__.py
index 2afdf42532af1dc71022c377cdf227025d61c81f..2443e6ebb5d6a7a5c2f580bdbca6288094fe5896 100644 (file)
@@ -31,10 +31,16 @@ def main():
         args.sudo_timer = True
         args.timeout = 1800
 
-        if not os.path.isfile(args.config):
+        if not actions.initializer.is_initialized(args):
             if args.action and (args.action != "init" and args.action != "log"):
-                print('ERROR: WayDroid is not initialized, run "waydroid init"')
-                return 0
+                if not args.wait_for_init:
+                    print('ERROR: WayDroid is not initialized, run "waydroid init"')
+                    return 0
+
+                print('WayDroid waiting for initialization...')
+                while helpers.ipc.listen(channel="init") != "done":
+                    pass
+
             elif os.geteuid() == 0 and args.action == "init":
                 if not os.path.exists(args.work):
                     os.mkdir(args.work)
@@ -85,6 +91,8 @@ def main():
                 actions.app_manager.remove(args)
             elif args.subaction == "launch":
                 actions.app_manager.launch(args)
+            elif args.subaction == "intent":
+                actions.app_manager.intent(args)
             elif args.subaction == "list":
                 actions.app_manager.list(args)
             else: