Commit 9f19dacd authored by claes's avatar claes

wb_cmd qt/gtk fix

parent 7d620fc7
...@@ -62,39 +62,33 @@ int main(int argc, char* argv[]) ...@@ -62,39 +62,33 @@ int main(int argc, char* argv[])
i++; i++;
} }
} }
strcpy(file, argv[0]);
strcat(file, "_");
strcat(file, wmg);
} }
if (!found) { if (!found) {
struct stat st; struct stat st;
char* s; strcpy(file, "$pwr_exe/wb_cmd_qt");
if ((s = getenv("pwre_conf_qt"))) { dcli_translate_filename(file, file);
strcpy(file, "$pwr_exe/wb_cmd_qt"); if (stat(file, &st) != 0) {
strcpy(file, "$pwr_eexe/wb_cmd_qt");
dcli_translate_filename(file, file); dcli_translate_filename(file, file);
if (stat(file, &st) != 0) { if (stat(file, &st) != 0) {
strcpy(file, "$pwr_eexe/wb_cmd_qt"); strcpy(file, "$pwr_exe/wb_cmd_gtk");
dcli_translate_filename(file, file); dcli_translate_filename(file, file);
} if (stat(file, &st) != 0) {
strcpy(wmg, "qt"); strcpy(file, "$pwr_eexe/wb_cmd_gtk");
} else { dcli_translate_filename(file, file);
strcpy(file, "$pwr_exe/wb_cmd_gtk"); if (stat(file, &st) != 0) {
dcli_translate_filename(file, file); printf("** wb_cmd not found %s\n", file);
if (stat(file, &st) == 0) { exit(0);
strcpy(wmg, "gtk"); }
} else { }
strcpy(file, "$pwr_eexe/wb_cmd_gtk");
dcli_translate_filename(file, file);
if (stat(file, &st) == 0) {
strcpy(wmg, "gtk");
} else {
strcpy(wmg, "motif");
}
} }
} }
} }
strcpy(file, argv[0]);
strcat(file, "_");
strcat(file, wmg);
execvp(file, argv); execvp(file, argv);
} }
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment