Merge pull request #3239 from kkartaltepe/chromeos-pls

UI: Check and fail when launched under ChromeOS
This commit is contained in:
Jim 2020-08-15 08:49:05 -07:00 committed by GitHub
commit 6058b6a87f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -102,6 +102,9 @@ AlreadyRunning.Title="OBS is already running"
AlreadyRunning.Text="OBS is already running! Unless you meant to do this, please shut down any existing instances of OBS before trying to run a new instance. If you have OBS set to minimize to the system tray, please check to see if it's still running there."
AlreadyRunning.LaunchAnyway="Launch Anyway"
ChromeOS.Title="Unsupported Platform"
ChromeOS.Text="OBS appears to be running inside a ChromeOS container. This platform is unsupported"
# warning when closing docks. it's frustrating that we actually need this.
DockCloseWarning.Title="Closing Dockable Window"
DockCloseWarning.Text="You just closed a dockable window. If you'd like to show it again, use the View → Docks menu on the menu bar."

View File

@ -1987,6 +1987,22 @@ static int run_program(fstream &logFile, int argc, char *argv[])
run:
#endif
#if !defined(_WIN32) && !defined(__APPLE__)
// Mounted by termina during chromeOS linux container startup
// https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/master/project-termina/chromeos-base/termina-lxd-scripts/files/lxd_setup.sh
os_dir_t *crosDir = os_opendir("/opt/google/cros-containers");
if (crosDir) {
QMessageBox::StandardButtons buttons(QMessageBox::Ok);
QMessageBox mb(QMessageBox::Critical,
QTStr("ChromeOS.Title"),
QTStr("ChromeOS.Text"), buttons,
nullptr);
mb.exec();
return 0;
}
#endif
if (!created_log) {
create_log_file(logFile);
created_log = true;