diff options
Diffstat (limited to 'src/leap/bitmask/gui/app.py')
-rw-r--r-- | src/leap/bitmask/gui/app.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/leap/bitmask/gui/app.py b/src/leap/bitmask/gui/app.py index c87ba88e..4bd91909 100644 --- a/src/leap/bitmask/gui/app.py +++ b/src/leap/bitmask/gui/app.py @@ -68,8 +68,7 @@ class BrowserWindow(QtWidgets.QDialog): sys.exit(1) -def start_app(): - +def launch_gui(): global qApp global bitmaskd @@ -86,5 +85,18 @@ def start_app(): sys.exit(qApp.exec_()) +def start_app(): + from leap.bitmask.util import STANDALONE + + # Allow the frozen binary in the bundle double as the cli entrypoint + # Why have only a user interface when you can have two? + + if STANDALONE and len(sys.argv) > 1: + from leap.bitmask.cli import bitmask_cli + return bitmask_cli.main() + + launch_gui() + + if __name__ == "__main__": start_app() |