X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=args.h;h=3e376e57e5ca80ad96ea1d06ff3af16737389982;hb=v4.9.x;hp=fbdd498b28bff67baeb0c6c3deaf8cfa5eaf7aa9;hpb=4440c1bb156f64d3615f1c1e91ff5fbf2d7d9ca5;p=xboard.git diff --git a/args.h b/args.h index fbdd498..3e376e5 100644 --- a/args.h +++ b/args.h @@ -113,6 +113,7 @@ char *secondEngineLine; char *icsNick; char *theme; char *replace; +char *engineListFile; void EnsureOnScreen(int *x, int *y, int minX, int minY); char StringGet(void *getClosure); @@ -518,6 +519,7 @@ ArgDescriptor argDescriptors[] = { { "secondChessProgramNames", ArgString, (void *) &secondChessProgramNames, !XBOARD, (ArgIniType) SCP_NAMES }, { "themeNames", ArgString, (void *) &appData.themeNames, TRUE, (ArgIniType) "native -upf false -ub false -ubt false -pid \"\"\n" }, + { "engineList", ArgFilename, (void *) &engineListFile, TRUE, (ArgIniType) "" }, { "addMasterOption", ArgMaster, NULL, FALSE, INVALID }, { "installEngine", ArgInstall, (void *) &firstChessProgramNames, FALSE, (ArgIniType) "" }, { "installTheme", ArgInstall, (void *) &appData.themeNames, FALSE, (ArgIniType) "" }, @@ -622,6 +624,8 @@ ArgDescriptor argDescriptors[] = { { "fixedSize", ArgBoolean, (void *) &appData.fixedSize, TRUE, (ArgIniType) FALSE }, { "showMoveTime", ArgBoolean, (void *) &appData.moveTime, TRUE, (ArgIniType) FALSE }, { "bmpSave", ArgInt, (void *) &appData.bmpSave, FALSE, 0 }, + { "defaultEngineInstallDir", ArgFilename, (void *) &appData.defEngDir, FALSE, (ArgIniType) "." }, + { "defaultInstallProtocol", ArgInt, (void *) &appData.defProtocol, TRUE, (ArgIniType) 0 }, // [HGM] tournament options { "tourneyFile", ArgFilename, (void *) &appData.tourneyFile, FALSE, (ArgIniType) "" }, @@ -1436,6 +1440,14 @@ InitAppData(char *lpCmdLine) /* Parse command line */ ParseArgs(StringGet, &lpCmdLine); + /* if separate engine list is used, parse that too */ + if(*engineListFile) { + char buf[MSG_SIZ]; + MySearchPath(installDir, engineListFile, buf); + if(*buf) { ASSIGN(engineListFile, buf); } + ParseSettingsFile(engineListFile, &engineListFile); + } + if(appData.viewer && appData.viewerOptions[0]) ParseArgsFromString(appData.viewerOptions); if(appData.tourney && appData.tourneyOptions[0]) ParseArgsFromString(appData.tourneyOptions); chessProgram |= GetEngineLine(firstEngineLine, 0) || GetEngineLine(secondEngineLine, 1);