mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-10-02 12:23:17 +08:00
Issues due date / Add labels to issues (push) Has been cancelled
Doxygen / build (push) Has been cancelled
After #3528 and #3525, only try to use wayland if it is available. This is preventing a lot of warnings if the fallback option is used.
25 lines
794 B
Python
Executable File
25 lines
794 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import sys
|
|
|
|
# Make sure to use Wayland for high DPI screens
|
|
if os.environ["XDG_SESSION_TYPE"] == "wayland":
|
|
os.environ["QT_QPA_PLATFORM"] = "wayland;xcb"
|
|
|
|
dirname = os.path.dirname(os.path.abspath(__file__))
|
|
PAPARAZZI_HOME = os.getenv("PAPARAZZI_HOME",dirname)
|
|
PAPARAZZI_SRC = os.getenv("PAPARAZZI_SRC",PAPARAZZI_HOME)
|
|
env = os.environ
|
|
env['PAPARAZZI_HOME'] = PAPARAZZI_HOME
|
|
env['PAPARAZZI_SRC'] = PAPARAZZI_SRC
|
|
|
|
if len(sys.argv) > 1 and sys.argv[1] == "-legacy":
|
|
del sys.argv[1]
|
|
path = os.path.normpath(os.path.join(dirname, 'sw', 'supervision', 'paparazzicenter'))
|
|
os.execve(path, sys.argv, env)
|
|
else:
|
|
path = os.path.normpath(os.path.join(dirname, 'sw', 'supervision', 'python', 'paparazzicenter.py'))
|
|
os.execve(path, sys.argv, env)
|
|
|