1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
## System-wide startup file for Octave.
##
## If the environment variable OCTAVE_SITE_INITFILE is set when Octave
## starts, then that file is executed instead of this file.
##
## This file contains commands that should be executed each time Octave starts
## for every user at this site.
if (ispc () && isguirunning ())
try
is_windows_console_host = ...
strcmp (winqueryreg ("HKEY_CURRENT_USER", 'Console\%%Startup', "DelegationConsole"), ...
"{B23D10C0-E52E-411E-9D5B-C09FDF709C7D}");
catch
## The above might fail for old versions of Windows 10 where that
## registry key didn't exist. Assume that the Windows Console Host
## is being used in this case.
is_windows_console_host = true;
end_try_catch
if (! is_windows_console_host)
warn_str = ["WARNING: You are using an incompatible Windows configuration!\n", ...
"Microsoft's new Terminal App is not compatible with Octave.\n", ...
"Please follow the instructions on the following page and set the ", ...
"default terminal to \"Windows Console Host\":\n", ...
"https://octave.discourse.group/t/4981/"];
warning ("octave:terminal-app", warn_str);
answer = questdlg ([warn_str, "\n\nWould you like to open that page in your browser?"], ...
"Incompatible Configuration", "Yes", "No", "Yes");
if (strcmp (answer, "Yes"))
system ("start https://octave.discourse.group/t/4981/");
endif
clear warn_str answer
endif
clear is_windows_console_host
endif
|