зеркало из https://github.com/mozilla/gecko-dev.git
Added RequiredTools value to check existence of needed .exe's on startup.
Fixes bug 102537
This commit is contained in:
Родитель
13748da31b
Коммит
3f50007b68
|
@ -154,6 +154,7 @@ BOOL CWizardMachineApp::InitInstance()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Do initializations
|
//Do initializations
|
||||||
//Check for comm existence
|
//Check for comm existence
|
||||||
//declare a tree for nodes
|
//declare a tree for nodes
|
||||||
|
@ -170,6 +171,39 @@ BOOL CWizardMachineApp::InitInstance()
|
||||||
if (wroot)
|
if (wroot)
|
||||||
wroot->cached = TRUE;
|
wroot->cached = TRUE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// see if our required support executables are there, as supplied in wizardmachine.ini
|
||||||
|
|
||||||
|
CString strFailed;
|
||||||
|
char szToolList[MAX_SIZE];
|
||||||
|
char szBuffer[MAX_SIZE];
|
||||||
|
|
||||||
|
|
||||||
|
GetPrivateProfileString("Default", "RequiredTools", "", szToolList, MAX_SIZE, Root + "WizardMachine.ini");
|
||||||
|
|
||||||
|
char *pTok = strtok(szToolList,",");
|
||||||
|
|
||||||
|
while (pTok)
|
||||||
|
{
|
||||||
|
if ((int)FindExecutable(pTok,currDirPath,szBuffer) <= 32)
|
||||||
|
{
|
||||||
|
strFailed += " ";
|
||||||
|
strFailed += pTok;
|
||||||
|
strFailed += ",";
|
||||||
|
}
|
||||||
|
|
||||||
|
pTok = strtok(NULL,",");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strFailed.IsEmpty())
|
||||||
|
{
|
||||||
|
CString str;
|
||||||
|
strFailed = strFailed.Left(strFailed.GetLength()-1); // remove trailing comma
|
||||||
|
str.Format("The following support files could not be found in the system path: %s. Please fix this problem and restart.",strFailed);
|
||||||
|
AfxMessageBox(str,MB_ICONSTOP);
|
||||||
|
}
|
||||||
|
|
||||||
CString outputFile = Path + "output.dat";
|
CString outputFile = Path + "output.dat";
|
||||||
out = fopen(outputFile, "w");
|
out = fopen(outputFile, "w");
|
||||||
if (!out)
|
if (!out)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче