26 #if defined (HAVE_CONFIG_H)
35 #if defined (OCTAVE_USE_WINDOWS_API) && defined (_UNICODE)
40 # include <versionhelpers.h>
71 if (octave_id != liboctave_id)
73 std::cerr <<
"octave hg id ("
75 <<
") does not match liboctave hg id ("
81 if (octave_id != liboctinterp_id)
83 std::cerr <<
"octave hg id ("
85 <<
") does not match liboctinterp hg id ("
91 if (octave_id != liboctgui_id)
93 std::cerr <<
"octave hg id ("
95 <<
") does not match liboctgui hg id ("
105 #if defined (OCTAVE_USE_WINDOWS_API) && defined (_UNICODE)
108 wmain (
int argc,
wchar_t **wargv)
110 static char **argv =
new char * [argc + 1];
111 std::vector<std::string> argv_str;
114 std::wstring_convert<std::codecvt_utf8<wchar_t>,
wchar_t> wchar_conv;
115 for (
int i_arg = 0; i_arg < argc; i_arg++)
116 argv_str.push_back (wchar_conv.to_bytes (wargv[i_arg]));
119 for (
int i_arg = 0; i_arg < argc; i_arg++)
120 argv[i_arg] = &argv_str[i_arg][0];
121 argv[argc] =
nullptr;
123 unsigned int old_console_codepage = 0;
124 unsigned int old_console_output_codepage = 0;
126 if (IsWindows7OrGreater ())
129 old_console_codepage = GetConsoleCP ();
130 old_console_output_codepage = GetConsoleOutputCP ();
133 SetConsoleCP (65001);
134 SetConsoleOutputCP (65001);
144 octave::sys::env::set_program_name (argv[0]);
146 octave::qt_application app (argc, argv);
148 int ret = app.execute ();
150 #if defined (OCTAVE_USE_WINDOWS_API) && defined (_UNICODE)
151 if (IsWindows7OrGreater ())
154 if (old_console_codepage)
155 SetConsoleCP (old_console_codepage);
156 if (old_console_output_codepage)
157 SetConsoleOutputCP (old_console_output_codepage);
OCTAVE_API std::string liboctave_hg_id(void)
OCTGUI_API std::string liboctgui_hg_id(void)
OCTINTERP_API std::string liboctinterp_hg_id(void)
int main(int argc, char **argv)
static void check_hg_versions(void)
std::string octave_hg_id(void)