Add DOWNLOAD_ONLY attribute support to components. (b=4837; r=ssu; sr=mscott)

This commit is contained in:
sgehani%netscape.com 2001-05-23 03:18:50 +00:00
Родитель ddeda031ac
Коммит 93b5db53ea
5 изменённых файлов: 21 добавлений и 8 удалений

Двоичные данные
xpinstall/wizard/mac/rsrc/MIWCommon.rsrc

Двоичный файл не отображается.

Просмотреть файл

@ -1341,10 +1341,12 @@ DeleteXPIs(short vRefNum, long dirID)
if (pArchiveName)
DisposePtr((Ptr)pArchiveName);
compsDone++;
}
}
compsDone++;
else if (compsDone >= gControls->cfg->st[instChoice].numComps)
break;
}
}

Просмотреть файл

@ -298,7 +298,8 @@ if (err) \
#define sSELECTED 28
#define sINVISIBLE 29
#define sLAUNCHAPP 30
#define sADDITIONAL 47 /* end parse keys */
#define sADDITIONAL 47
#define sDOWNLOAD_ONLY 52 /* end parse keys */
#define rErrorList 144 /* errors */
#define eErrorMessage 1
@ -413,6 +414,7 @@ typedef struct InstComp {
Boolean invisible;
Boolean launchapp;
Boolean additional;
Boolean download_only;
/* dependees */
Handle depName[kMaxComponents];

Просмотреть файл

@ -431,7 +431,7 @@ PopulateCompWinKeys(char *cfgText)
if (currKey)
DisposePtr(currKey);
/* attributes (SELECTED|INVISIBLE|LAUNCHAPP|ADDITIONAL) */
/* attributes (SELECTED|INVISIBLE|LAUNCHAPP|ADDITIONAL|DOWNLOAD_ONLY) */
GetIndString(pkey, rParseKeys, sAttributes);
currKey = PascalToC(pkey);
Handle attrValH = NewHandleClear(255);
@ -487,6 +487,15 @@ PopulateCompWinKeys(char *cfgText)
gControls->cfg->comp[i].additional = false;
if (attrType)
DisposePtr(attrType);
GetIndString(pkey, rParseKeys, sDOWNLOAD_ONLY);
attrType = PascalToC(pkey);
if (NULL != strstr(*attrValH, attrType))
gControls->cfg->comp[i].download_only = true;
else
gControls->cfg->comp[i].download_only = false;
if (attrType)
DisposePtr(attrType);
HUnlock(attrValH);
}

Просмотреть файл

@ -277,8 +277,8 @@ RunAllXPIs(short xpiVRefNum, long xpiDirID, short vRefNum, long dirID)
(gControls->cfg->comp[i].selected == true)) ||
(instChoice < gControls->cfg->numSetupTypes-1) )
{
// if LAUNCHAPP attr wasn't set
if (!gControls->cfg->comp[i].launchapp)
// if LAUNCHAPP and DOWNLOAD_ONLY attr wasn't set
if (!gControls->cfg->comp[i].launchapp && !gControls->cfg->comp[i].download_only)
{
HLock(gControls->cfg->comp[i].archive);
pcurrArchive = CToPascal(*gControls->cfg->comp[i].archive);
@ -369,8 +369,8 @@ CountSelectedXPIs()
(gControls->cfg->comp[i].selected == true)) ||
(instChoice < gControls->cfg->numSetupTypes-1) )
{
// if LAUNCHAPP attr wasn't set
if (!gControls->cfg->comp[i].launchapp)
// if LAUNCHAPP and DOWNLOAD_ONLY attr wasn't set
if (!gControls->cfg->comp[i].launchapp && !gControls->cfg->comp[i].download_only)
numXPIs++;
}
}