*** empty log message ***

svn path=/trunk/boinc/; revision=9211
This commit is contained in:
Charlie Fenton 2006-01-11 13:35:35 +00:00
parent 9d5f806a30
commit a390baba61
3 changed files with 31 additions and 1 deletions

View File

@ -297,3 +297,8 @@ Bruce 11 Jan 2006
sched/
handle_request.C
Charlie 10 Jan 2006
-Mac: Get BrandID from file put inside application bundle by installer.
clientgui/
BOINCGUIApp.cpp

View File

@ -57,10 +57,35 @@ bool CBrandingScheme::OnInit( wxConfigBase *pConfig ) {
wxASSERT(pConfig);
#ifdef __WXMAC__
wxChar buf[1024];
ProcessSerialNumber ourPSN;
FSRef ourFSRef;
OSErr err;
iBrandId = 0; // Default value
// Get the full path to core client inside this application's bundle
err = GetCurrentProcess (&ourPSN);
if (err == noErr) {
err = GetProcessBundleLocation(&ourPSN, &ourFSRef);
}
if (err == noErr) {
err = FSRefMakePath (&ourFSRef, (UInt8*)buf, sizeof(buf));
}
if (err == noErr) {
strcat(buf, "/Contents/Resources/Branding");
FILE *f = fopen(buf, "r");
if (f) {
fscanf(f, "BrandId=%d\n", &iBrandId);
fclose(f);
}
}
#else
strBaseConfigLocation = pConfig->GetPath();
pConfig->SetPath(strBaseConfigLocation + wxT("Branding"));
pConfig->Read(wxT("BrandId"), &iBrandId, 0);
pConfig->SetPath(strBaseConfigLocation);
#endif
// If the BrandId is greater than 0 then we are running in
// branded mode

View File

@ -864,7 +864,7 @@
DDB506F80958446900181B75 /* ProxyInfoPage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ProxyInfoPage.cpp; path = ../clientgui/ProxyInfoPage.cpp; sourceTree = SOURCE_ROOT; };
DDB506F90958446900181B75 /* ProxyInfoPage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ProxyInfoPage.h; path = ../clientgui/ProxyInfoPage.h; sourceTree = SOURCE_ROOT; };
DDB8D5A5081FC8C700A5A1E8 /* postinstall */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.csh; name = postinstall; path = ../mac_installer/postinstall; sourceTree = SOURCE_ROOT; };
DDD74D8707CF482E0065AC9D /* boinc */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = boinc; sourceTree = BUILT_PRODUCTS_DIR; };
DDD74D8707CF482E0065AC9D /* boinc */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = boinc; sourceTree = BUILT_PRODUCTS_DIR; };
DDE2552B07C62F3E008E7D6E /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
DDEF388E0802B73500E87552 /* ViewStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ViewStatistics.cpp; path = ../clientgui/ViewStatistics.cpp; sourceTree = SOURCE_ROOT; };
DDEF388F0802B73500E87552 /* ViewStatistics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ViewStatistics.h; path = ../clientgui/ViewStatistics.h; sourceTree = SOURCE_ROOT; };