| 1213 | } |
| 1214 | |
| 1215 | bool WindowsSystem::ParseCommandLine(TCHAR * cmdLine) |
| 1216 | { |
| 1217 | // only support the directory flag for now |
| 1218 | const QString shortDirFlag = QT_NT("-d"); |
| 1219 | const QString shortParentHwndFlag = QT_NT("-ph"); |
| 1220 | const QString shortParentRectFlag = QT_NT("-pr"); |
| 1221 | const QString shortParentDirectoryFlag = QT_NT("-pd"); |
| 1222 | const QString shortProxyHwndFlag = QT_NT("-pxh"); |
| 1223 | const QString shortSandboxFlag = QT_NT("-sandbox"); |
| 1224 | const QString shortTestUpdaterFlag = QT_NT("-testupdater"); |
| 1225 | const QString logVerbose = QT_NT("-logVerbose"); |
| 1226 | const QString logIgnoreAllFlag = QT_NT("-logIgnoreAll"); |
| 1227 | const QString logIgnoreFlag = QT_NT("-logIgnore"); |
| 1228 | const QString logDontIgnoreStartOrEnd = QT_NT("-logDontIgnoreStartOrEnd"); |
| 1229 | const QString longHelpFlag = QT_NT("-help"); |
| 1230 | const QString longRunTestsFlag = QT_NT("-runTests"); |
| 1231 | const QString skipAnimationsFlag = QT_NT("-skipAnimations"); |
| 1232 | const QString disableRenderingFlag = QT_NT("-skipRendering"); |
| 1233 | const QString dellDemoFlag = QT_NT("-del"); |
| 1234 | const QString toshibaDemoFlag = QT_NT("-toshiba"); |
| 1235 | const QString crash = QT_NT("-crash"); |
| 1236 | const QString fullDumpFlag = QT_NT("-fullDump"); |
| 1237 | const QString blockForRemoteDebugger = QT_NT("-remoteDebug"); |
| 1238 | const QString dumpVersionInfo = QT_NT("-dumpVersionInfo"); |
| 1239 | const QString ignoreGDI = QT_NT("-ignoreGDI"); |
| 1240 | const QString photoDirFlag = QT_NT("-photoDir"); |
| 1241 | const QString childProcessFlag = QT_NT("-childProcess"); |
| 1242 | const QString tradeshowFlag = QT_NT("-tradeshow"); |
| 1243 | const QString loadDemoSceneFlag = QT_NT("-loadDemoScene"); |
| 1244 | const QString automatedJSONTestingFlag = QT_NT("-automatedJSONTesting"); |
| 1245 | const QString JSONTestScriptDirFlag = QT_NT("-JSONTestScriptDir"); |
| 1246 | const QString JSONLogFileDirFlag = QT_NT("-JSONLogFileDir"); |
| 1247 | const QString JSONTestFilesDirFlag = QT_NT("-JSONTestFilesDir"); |
| 1248 | const QString touchDebugLogFlag = QT_NT("-touchDebugLog"); |
| 1249 | const QString liveMeshDemoFlag = QT_NT("-liveMeshDemo"); |
| 1250 | |
| 1251 | try { |
| 1252 | // retrieve the arguments |
| 1253 | vector<std::wstring> wargs = split_winmain(cmdLine); |
| 1254 | vector<QString> args; |
| 1255 | for (int i = 0; i < wargs.size(); ++i) |
| 1256 | args.push_back(QString::fromUtf16((const ushort *) wargs[i].c_str())); |
| 1257 | QString customDir; |
| 1258 | for (int i = 0; i < args.size(); ++i) |
| 1259 | { |
| 1260 | QString arg = args[i]; |
| 1261 | // handle the help flag if there ever is one |
| 1262 | if (arg == longHelpFlag) |
| 1263 | { |
| 1264 | // print out help message |
| 1265 | MessageBox(GetForegroundWindow(), L"Usage: BumpTop.exe\n" |
| 1266 | L"\t-d <directory>\tPoints BumpTop at the specified directory\n" |
| 1267 | L"\t-help\t\tDisplays this help message", |
| 1268 | L"BumpTop Startup Flags", MB_OK); |
| 1269 | |
| 1270 | exit(1); |
| 1271 | } |
| 1272 |
nothing calls this directly
no test coverage detected