*** empty log message ***

svn path=/trunk/boinc/; revision=9274
This commit is contained in:
Charlie Fenton 2006-01-20 11:57:52 +00:00
parent 1f0117c798
commit c8571103c2
2 changed files with 28 additions and 0 deletions

View File

@ -33,6 +33,7 @@
void Initialize(void); /* function prototypes */
void SetUIDBackToUser (void);
long GetBrandID(void);
OSErr FindProcess (OSType typeToFind, OSType creatorToFind, ProcessSerialNumberPtr processSN);
pid_t FindProcessPID(char* name, pid_t thePID);
static OSErr QuitBOINCManager(OSType signature);
@ -49,6 +50,7 @@ int main(int argc, char *argv[])
long response;
ProcessSerialNumber ourProcess, installerPSN;
short itemHit;
long brandID = 0;
group *grp;
char s[256];
int NumberOfLoginItems, Counter, i;
@ -89,6 +91,14 @@ int main(int argc, char *argv[])
system ("rm -rf /Library/Receipts/BOINC.pkg");
ExitToShell();
}
brandID = GetBrandID();
if (brandID == 1) {
}
Success = false;
@ -202,6 +212,24 @@ void Initialize() /* Initialize some managers */
ExitToShell();
}
long GetBrandID()
{
long iBrandId;
OSErr err;
iBrandId = 0; // Default value
FILE *f = fopen("/Contents/Resources/Branding", "r");
if (f) {
fscanf(f, "BrandId=%ld\n", &iBrandId);
fclose(f);
}
return iBrandId;
}
// ---------------------------------------------------------------------------
/* This runs through the process list looking for the indicated application */
/* Searches for process by file type and signature (creator code) */