- wxStrcpy(name, wxFileNameFromPath(name));
- wxStripExtension(name);
- wxTheApp->SetAppName(name);
-
- // Break up string
- // Treat strings enclosed in double-quotes as single arguments
- int i = 0;
- int len = cmdLine.Length();
- while (i < len)
- {
- // Skip whitespace
- while ((i < len) && wxIsspace(cmdLine.GetChar(i)))
- i ++;
-
- if (i < len)
- {
- if (cmdLine.GetChar(i) == wxT('"')) // We found the start of a string
- {
- i ++;
- int first = i;
- while ((i < len) && (cmdLine.GetChar(i) != wxT('"')))
- i ++;
+ // also set the app name from argv[0]
+ wxString name;
+ wxFileName::SplitPath(argv[0], NULL, &name, NULL);