Added external custom profile generator option

This commit is contained in:
Oliver Duis
2010-11-06 12:31:51 +01:00
parent 602a15e5ea
commit 87d1f3ae46
9 changed files with 60 additions and 5 deletions

View File

@@ -187,3 +187,24 @@ bool safe_spawn_command_line_async (const Glib::ustring& cmd_utf8)
#endif
return success;
}
bool safe_spawn_command_line_sync (const Glib::ustring& cmd_utf8)
{
std::string cmd;
std::string stdOut;
std::string stdErr;
bool success = false;
int exitStatus=-1;
try {
cmd = Glib::filename_from_utf8(cmd_utf8);
printf ("command line: |%s|\n", cmd.c_str());
// if it crashes here on windows, make sure you have the GTK runtime files gspawn-win32-helper*.exe files in RT directory
Glib::spawn_command_line_sync (cmd,NULL,NULL, &exitStatus);
} catch (Glib::Exception& ex) {
printf ("%s\n", ex.what().c_str());
}
return (exitStatus==0);
}