%Root% is a global variable that contains the value of the current working directory - so we can use it in an inifile to resolve the relative root locations

This commit is contained in:
varada%netscape.com 1999-10-07 01:39:34 +00:00
parent ce45bea09f
commit 557d8b559b

View File

@ -122,6 +122,12 @@ BOOL CWizardMachineApp::InitInstance()
strcpy(currDirPath, Path);
CString Root = Path;
WIDGET* wroot = SetGlobal("Root",Root);
if (wroot)
wroot->cached = TRUE;
CString outputFile = Path + "output.dat";
out = fopen(outputFile, "w");
if (!out)
@ -1375,6 +1381,8 @@ BOOL CWizardMachineApp::FillGlobalWidgetArray(CString file)
name = CString(strtok(buffer,"="));
value = CString(strtok(NULL,"="));
value.TrimRight();
if (value.Find("%") >= 0)
value=replaceVars((char *) (LPCSTR) value,NULL);
WIDGET* w = SetGlobal(name, value);
if (w)