Restore Mac-specific files which had been modified for wxWidgets 2.9.4 but were lost in transition to GIT

This commit is contained in:
Charlie Fenton 2012-10-24 02:26:08 -07:00 committed by Oliver Bock
parent 0fdeb565a9
commit 15008dedce
7 changed files with 152 additions and 131 deletions

View File

@ -6196,3 +6196,17 @@ Rom 19 Oct 2012
uc2_graphics.vcproj
vboxwrapper.vcproj
wrapper.vcproj
Charlie 24 Oct 2012
- Restore Mac-specific files which had been modified for wxWidgets 2.9.4
but were lost in transition to GIT.
clientgui/mac/
MacAccessibility.cpp
MacBitMapComboBox.cpp
MacGUI.pch
MacSystemMenu.cpp
mac_build/
boinc.xcodeproj/
project.pbxproj
buildWxMac.sh

View File

@ -68,9 +68,6 @@ void AccessibilityIgnoreAllChildren(HIViewRef parent, int recursionLevel) {
}
pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
EventRef inEvent, void* pData);
pascal OSStatus HTMLListAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
EventRef inEvent, void* pData);
@ -101,19 +98,31 @@ pascal OSStatus PieCtrlAccessibilityEventHandler( EventHandlerCallRef inHandlerC
#if !USE_NATIVE_LISTCONTROL
pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
EventRef inEvent, void* pData);
void CBOINCListCtrl::SetupMacAccessibilitySupport() {
HIViewRef listControlView;
HIViewRef headerView;
HIViewRef bodyView;
SInt32 response;
Boolean snowLeopard;
CFIndex count, i;
OSErr err;
err = Gestalt(gestaltSystemVersion, &response);
snowLeopard = (err == noErr) && (response >= 0x1060);
listControlView = (HIViewRef)GetHandle();
count = HIViewCountSubviews(listControlView);
headerView = HIViewGetFirstSubview(listControlView);
for (i=2; i<count; ++i) {
HIObjectSetAccessibilityIgnored((HIObjectRef)headerView, true);
headerView = HIViewGetNextView(headerView);
}
bodyView = HIViewGetNextView(headerView);
err = HIViewSetEnabled(headerView, true);
@ -138,7 +147,7 @@ void CBOINCListCtrl::RemoveMacAccessibilitySupport() {
::RemoveEventHandler(m_pBodyAccessibilityEventHandlerRef);
::RemoveEventHandler(m_pHeaderAccessibilityEventHandlerRef);
}
#endif
#endif // !USE_NATIVE_LISTCONTROL
void CDlgEventLogListCtrl::SetupMacAccessibilitySupport() {
@ -148,15 +157,24 @@ void CDlgEventLogListCtrl::SetupMacAccessibilitySupport() {
HIViewRef bodyView;
SInt32 response;
Boolean snowLeopard;
CFIndex count, i;
OSErr err;
err = Gestalt(gestaltSystemVersion, &response);
snowLeopard = (err == noErr) && (response >= 0x1060);
listControlView = (HIViewRef)GetHandle();
headerView = HIViewGetFirstSubview(listControlView);
bodyView = HIViewGetNextView(headerView);
err = HIViewSetEnabled(headerView, true);
count = HIViewCountSubviews(listControlView);
headerView = HIViewGetFirstSubview(listControlView);
for (i=2; i<count; ++i) {
HIObjectSetAccessibilityIgnored((HIObjectRef)headerView, true);
headerView = HIViewGetNextView(headerView);
}
bodyView = HIViewGetNextView(headerView);
err = HIViewSetEnabled(headerView, true);
accessibilityHandlerData.pList = (wxGenericListCtrl*)this;
accessibilityHandlerData.pView = NULL;
@ -172,7 +190,7 @@ void CDlgEventLogListCtrl::SetupMacAccessibilitySupport() {
err = InstallHIObjectEventHandler((HIObjectRef)headerView, NewEventHandlerUPP(BOINCListAccessibilityEventHandler),
sizeof(myAccessibilityEvents) / sizeof(EventTypeSpec), myAccessibilityEvents,
&accessibilityHandlerData, &m_pHeaderAccessibilityEventHandlerRef);
#endif
#endif // !USE_NATIVE_LISTCONTROL
}
@ -180,7 +198,7 @@ void CDlgEventLogListCtrl::RemoveMacAccessibilitySupport() {
#if !USE_NATIVE_LISTCONTROL
::RemoveEventHandler(m_pBodyAccessibilityEventHandlerRef);
::RemoveEventHandler(m_pHeaderAccessibilityEventHandlerRef);
#endif
#endif // !USE_NATIVE_LISTCONTROL
}
@ -337,6 +355,8 @@ void wxPieCtrl::RemoveMacAccessibilitySupport() {
}
#if !USE_NATIVE_LISTCONTROL
pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
EventRef inEvent, void* pData) {
const UInt32 eventClass = GetEventClass(inEvent);
@ -372,7 +392,7 @@ pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandle
if (obj == (HIObjectRef)headerView) {
isHeader = true;
}
switch (eventKind) {
#pragma mark kEventAccessibleGetChildAtPoint
case kEventAccessibleGetChildAtPoint:
@ -456,7 +476,7 @@ pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandle
{
CFMutableArrayRef namesArray;
err = GetEventParameter (inEvent, kEventParamAccessibleAttributeNames,
err = GetEventParameter (inEvent, kEventParamAccessibleAttributeNames,
typeCFMutableArrayRef, NULL, sizeof(typeCFMutableArrayRef), NULL, &namesArray);
if (err)
return err;
@ -532,7 +552,7 @@ pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandle
{
CFMutableArrayRef namesArray;
err = GetEventParameter (inEvent, kEventParamAccessibleAttributeNames,
err = GetEventParameter (inEvent, kEventParamAccessibleAttributeNames,
typeCFMutableArrayRef, NULL, sizeof(typeCFMutableArrayRef), NULL, &namesArray);
if (err) return err;
@ -769,7 +789,7 @@ pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandle
err = HIViewGetBounds(isHeader ? headerView : bodyView, &r);
size = r.size;
if (!isHeader) {
size.height += pList->m_headerHeight;
size.height += ((CBOINCListCtrl*)pList)->GetHeaderHeight();
}
SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeHISize, sizeof( HISize ), &size );
@ -787,7 +807,7 @@ pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandle
// Now convert to global coordinates
pList->ClientToScreen(&x, &y);
pt.x = x;
pt.y = y - pList->m_headerHeight;
pt.y = y - ((CBOINCListCtrl*)pList)->GetHeaderHeight();
SetEventParameter(inEvent, kEventParamAccessibleAttributeValue, typeHIPoint, sizeof(HIPoint), &pt);
return noErr;
@ -1005,16 +1025,27 @@ pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandle
wxRect r;
// Return the size of this part as an HISize.
size.width = pList->GetColumnWidth(col);
if (isHeader) {
size.height = pList->m_headerHeight;
} else { // ! isHeader
pList->GetItemRect(row, r);
size.height = r.height;
if (col < 0) {
size.width = r.width;
if (col < 0) { // Entire row
size.width = ((wxWindow*)((CBOINCListCtrl*)pList)->m_headerWin)->GetSize().x;
} else {
size.width = pList->GetColumnWidth(col);
}
}
size.height = ((CBOINCListCtrl*)pList)->GetHeaderHeight();
} else { // ! isHeader
if (row < 0) { // Entire column
size.height = ((wxWindow*)((CBOINCListCtrl*)pList)->m_headerWin)->GetSize().y;
} else {
pList->GetItemRect(row, r);
size.height = r.height;
}
if (col < 0) { // Entire row
size.width = ((wxWindow*)((CBOINCListCtrl*)pList)->m_headerWin)->GetSize().x;
} else {
size.width = pList->GetColumnWidth(col);
}
} // ! isHeader
SetEventParameter( inEvent, kEventParamAccessibleAttributeValue, typeHISize, sizeof( HISize ), &size );
return noErr;
@ -1031,10 +1062,14 @@ pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandle
}
if (!isHeader) {
pList->GetItemRect(row, r);
y = r.y - 1;
if (col < 0) {
x = r.x;
if (row < 0) { // Entire column
y = 0;
} else {
pList->GetItemRect(row, r);
y = r.y - 1;
if (col < 0) {
x = r.x;
}
}
}
xoff = pList->GetScrollPos(wxHORIZONTAL);
@ -1046,7 +1081,7 @@ pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandle
// Now convert to global coordinates
pList->ClientToScreen(&x, &y);
pt.x = x;
pt.y = y - pList->m_headerHeight;
pt.y = y - ((CBOINCListCtrl*)pList)->GetHeaderHeight();
SetEventParameter(inEvent, kEventParamAccessibleAttributeValue, typeHIPoint, sizeof(HIPoint), &pt);
return noErr;
@ -1255,7 +1290,7 @@ pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandle
if (isHeader) {
wxListEvent event(wxEVT_COMMAND_LIST_COL_CLICK, id);
event.m_col = col;
pList->AddPendingEvent(event);
pList->GetEventHandler()->AddPendingEvent(event);
} else {
if (pView) {
pView->ClearSelections();
@ -1273,6 +1308,8 @@ pascal OSStatus BOINCListAccessibilityEventHandler( EventHandlerCallRef inHandle
return eventNotHandledErr;
}
#endif // !USE_NATIVE_LISTCONTROL
pascal OSStatus HTMLListAccessibilityEventHandler( EventHandlerCallRef inHandlerCallRef,
EventRef inEvent, void* pData) {

View File

@ -53,7 +53,7 @@ CBOINCBitmapChoice::~CBOINCBitmapChoice() {
}
void CBOINCBitmapChoice::SetItemBitmap(unsigned int n, const wxBitmap& bitmap) {
MenuHandle mhandle = (MenuHandle) m_macPopUpMenuHandle;
MenuHandle mhandle = (MenuHandle) m_popUpMenu;
unsigned int index = n + 1;
if ( mhandle == NULL || index == 0)
@ -61,7 +61,7 @@ void CBOINCBitmapChoice::SetItemBitmap(unsigned int n, const wxBitmap& bitmap) {
if ( bitmap.Ok() )
{
CGImageRef imageRef = (CGImageRef)( bitmap.CGImageCreate() ) ;
CGImageRef imageRef = (CGImageRef)( bitmap.CreateCGImage() ) ;
SetMenuItemIconHandle( mhandle , index ,
kMenuCGImageRefType , (Handle) imageRef ) ;

View File

@ -40,13 +40,29 @@
// To use the wxMac Deployment build even in BOINC Manager Development builds, reverse
// the above steps (setting USE_DEBUG_WXMAC to 0, etc.)
#define USE_DEBUG_WXMAC 0
#define WX_PRECOMP
#define USE_DEBUG_WXMAC 1
#define HAVE_SSIZE_T
#define wxDEBUG_LEVEL 0
#define __WXOSX_CARBON__
#define __WX__
#define wxUSE_BASE 1
#define MACOS_CLASSIC
#define __WXMAC_XCODE__ 1
#define SCI_LEXER
#define WX_PRECOMP 1
#define wxUSE_UNICODE_UTF8 1
#include <wx/version.h> // For wxCHECK_VERSION
#include <wx/wxprec.h>
// Allow the BOINC definitions of these instead of the wxWidgets ones
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
//#include <wx/version.h> // For wxCHECK_VERSION
#define TARGET_CARBON 1
#define wxUSE_UNICODE 1
@ -58,13 +74,15 @@
// platform.h erroneously #defines __POWERPC__, so we include platform.h first
// and then #undef __POWERPC__ before including the other wxMac header files.
// It's unclear if this affects non-CodeWarrior builds, but do it to be safe.
#include <wx/platform.h>
///////#include <wx/platform.h>
#ifdef __POWERPC__
#undef __POWERPC__
#endif
#endif
#if (defined(_DEBUG) && (! USE_DEBUG_WXMAC))
#define __WXDEBUG__ 1
#if 0 //(defined(_DEBUG) && (! USE_DEBUG_WXMAC))
#undef _DEBUG // so we can link with Deployment Wx libs
#undef __WXDEBUG__

View File

@ -178,7 +178,7 @@ bool CMacSystemMenu::SetMacMenuIcon(const wxIcon& icon) {
m_bNeedRebuildMenu = false;
theBits.CopyFromIcon(icon);
CGImageRef imageRef = (CGImageRef)theBits.CGImageCreate();
CGImageRef imageRef = (CGImageRef)theBits.CreateCGImage();
if ( (SetSystemMenuIcon != NULL) && (imageRef != NULL) ) {
SetSystemMenuIcon(imageRef);
CGImageRelease( imageRef );
@ -204,7 +204,7 @@ void CMacSystemMenu::BuildMenu() {
m_iconTaskBarSnooze = *pSkinAdvanced->GetApplicationSnoozeIcon();
theBits.CopyFromIcon(m_iconTaskBarNormal);
CGImageRef imageRef = (CGImageRef)theBits.CGImageCreate();
CGImageRef imageRef = (CGImageRef)theBits.CreateCGImage();
if ( (SetUpSystemMenu != NULL ) && (imageRef != NULL) ) {
// Currently, the system menu is the same as the Dock menu with the addition of
// the Quit menu item. If in the future you wish to make the system menu different
@ -316,7 +316,7 @@ pascal OSStatus SysMenuEventHandler( EventHandlerCallRef inHandlerCallRef,
{
CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, ID_PREFERENCES);
pFrame->AddPendingEvent(evt);
pFrame->GetEventHandler()->AddPendingEvent(evt);
return noErr ;
}
case kHICommandQuit:

View File

@ -55,6 +55,7 @@
DD130F340820C4C4001A0291 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
DD1682B10F8DC6D90096D714 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD89165E0F3B1BC200DE5B1C /* OpenGL.framework */; };
DD16BF7C099D6C90003E4B69 /* cpu_sched.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD16BF7B099D6C90003E4B69 /* cpu_sched.cpp */; };
DD17FFDE15F60AFD0002CD9F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD17FFDD15F60AFD0002CD9F /* AudioToolbox.framework */; };
DD1AFEAC0A512D8700EE5B82 /* SetupSecurity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7748B40A356D6C0025D05E /* SetupSecurity.cpp */; };
DD1AFEAD0A512D8700EE5B82 /* check_security.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6617870A3FFD8C00FFEBEB /* check_security.cpp */; };
DD1AFEAF0A512D8700EE5B82 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
@ -153,6 +154,7 @@
DD3E15320A774397007E0084 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDE2552B07C62F3E008E7D6E /* IOKit.framework */; };
DD3E15330A774397007E0084 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD1929D80918A2F100C31BCF /* Security.framework */; };
DD3E15360A774397007E0084 /* SystemMenu.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = DD40CDF907F0386A0096C645 /* SystemMenu.bundle */; };
DD3F3E3F15E63913005C966B /* libwx_osx_carbon_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DD3F3E3E15E63913005C966B /* libwx_osx_carbon_static.a */; };
DD407A4D07D2FB6500163EF5 /* app_ipc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA8B6B1B046C364400A80164 /* app_ipc.cpp */; };
DD407A4F07D2FB7100163EF5 /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344B6307C5ACEB0043025C /* base64.cpp */; };
DD407A5307D2FB7C00163EF5 /* diagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD344BA207C5AE5A0043025C /* diagnostics.cpp */; };
@ -351,7 +353,6 @@
DDAEB54012F8295800EDEDBE /* LogBOINC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD81C41407C5D13E0098A04D /* LogBOINC.cpp */; };
DDAEC9FF07FA5A5C00A7BC36 /* SetVersion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDAEC9E707FA58A000A7BC36 /* SetVersion.cpp */; };
DDB219B210B3BBA900417AEF /* WaitPermissions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB219B110B3BBA900417AEF /* WaitPermissions.cpp */; };
DDB42E3412F1B6A400E6D8A2 /* libwx_mac_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDA90F260B64673D008F2E87 /* libwx_mac_static.a */; };
DDB4A91E1411840800032E5D /* proc_control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB4A91C1411840800032E5D /* proc_control.cpp */; };
DDB4A91F1411840800032E5D /* proc_control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB4A91C1411840800032E5D /* proc_control.cpp */; };
DDB4A9201411871200032E5D /* proc_control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB4A91C1411840800032E5D /* proc_control.cpp */; };
@ -760,6 +761,7 @@
DD127880081F464E007B5DE1 /* postupgrade */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.csh; name = postupgrade; path = ../mac_installer/postupgrade; sourceTree = SOURCE_ROOT; };
DD16BF7B099D6C90003E4B69 /* cpu_sched.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cpu_sched.cpp; sourceTree = "<group>"; };
DD16BF8F099D6CE5003E4B69 /* cpu_benchmark.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = cpu_benchmark.h; path = ../client/cpu_benchmark.h; sourceTree = SOURCE_ROOT; };
DD17FFDD15F60AFD0002CD9F /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = ../../../../../System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<group>"; };
DD1929D80918A2F100C31BCF /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
DD1AFE8F0A512D2600EE5B82 /* Installer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Installer-Info.plist"; sourceTree = "<group>"; };
DD1AFEBA0A512D8700EE5B82 /* BOINC Installer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "BOINC Installer.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@ -839,6 +841,7 @@
DD344BEF07C5B1770043025C /* proxy_info.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = proxy_info.cpp; sourceTree = "<group>"; };
DD35353107E1E05C00C4718D /* libboinc_api.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libboinc_api.a; sourceTree = BUILT_PRODUCTS_DIR; };
DD3E15420A774397007E0084 /* BOINCManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BOINCManager.app; sourceTree = BUILT_PRODUCTS_DIR; };
DD3F3E3E15E63913005C966B /* libwx_osx_carbon_static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libwx_osx_carbon_static.a; path = "../../wxWidgets-2.9.4/build/osx/build/Release/libwx_osx_carbon_static.a"; sourceTree = "<group>"; };
DD407A4A07D2FB1200163EF5 /* libboinc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libboinc.a; sourceTree = BUILT_PRODUCTS_DIR; };
DD407AB707D2FC7D00163EF5 /* mem_usage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = mem_usage.cpp; sourceTree = "<group>"; };
DD407AB807D2FC7D00163EF5 /* mem_usage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = mem_usage.h; path = ../lib/mem_usage.h; sourceTree = SOURCE_ROOT; };
@ -1090,7 +1093,6 @@
DDA6BD110BD4551F008F7921 /* QTaskMemory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = QTaskMemory.h; path = ../lib/mac/QTaskMemory.h; sourceTree = SOURCE_ROOT; };
DDA850A21207EED900B473A6 /* WizardAttach.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WizardAttach.cpp; path = ../clientgui/WizardAttach.cpp; sourceTree = SOURCE_ROOT; };
DDA850A31207EED900B473A6 /* WizardAttach.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WizardAttach.h; path = ../clientgui/WizardAttach.h; sourceTree = SOURCE_ROOT; };
DDA90F260B64673D008F2E87 /* libwx_mac_static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libwx_mac_static.a; path = "../../wxMac-2.8.10/src/build/Deployment/libwx_mac_static.a"; sourceTree = SOURCE_ROOT; };
DDA99BF31099AF18002F8E9B /* MacAccessiblity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MacAccessiblity.cpp; path = ../clientgui/mac/MacAccessiblity.cpp; sourceTree = SOURCE_ROOT; };
DDA9D3BB09189A8C0060E7A7 /* Mac_GUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Mac_GUI.cpp; path = ../clientgui/mac/Mac_GUI.cpp; sourceTree = SOURCE_ROOT; };
DDAD31D60EC26B14002DA09D /* mac_address.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mac_address.cpp; path = ../lib/mac_address.cpp; sourceTree = SOURCE_ROOT; };
@ -1265,7 +1267,8 @@
DDA546610D16964E008CC69A /* QuickTime.framework in Frameworks */,
DD21B49D0D750FC600AFFEE5 /* AppKit.framework in Frameworks */,
DD1682B10F8DC6D90096D714 /* OpenGL.framework in Frameworks */,
DDB42E3412F1B6A400E6D8A2 /* libwx_mac_static.a in Frameworks */,
DD3F3E3F15E63913005C966B /* libwx_osx_carbon_static.a in Frameworks */,
DD17FFDE15F60AFD0002CD9F /* AudioToolbox.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1489,13 +1492,14 @@
20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
DD3F3E3E15E63913005C966B /* libwx_osx_carbon_static.a */,
DDFE854A0B60CFD0009B43D9 /* AppKit.framework */,
DD17FFDD15F60AFD0002CD9F /* AudioToolbox.framework */,
DDE2552B07C62F3E008E7D6E /* IOKit.framework */,
20286C33FDCF999611CA2CEA /* Carbon.framework */,
DDA546600D16964E008CC69A /* QuickTime.framework */,
DD7C5E7508110AE3002FCE1E /* ScreenSaver.framework */,
DD1929D80918A2F100C31BCF /* Security.framework */,
DDA90F260B64673D008F2E87 /* libwx_mac_static.a */,
DD89165D0F3B1BC200DE5B1C /* GLUT.framework */,
DD89165E0F3B1BC200DE5B1C /* OpenGL.framework */,
);
@ -3608,18 +3612,19 @@
DEAD_CODE_STRIPPING = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEPLOYMENT_POSTPROCESSING = YES;
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
GCC_PFE_FILE_C_DIALECTS = "c++";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ../clientgui/mac/MacGUI.pch;
HEADER_SEARCH_PATHS = (
"../../wxMac-2.8.10/src/build/include/",
"../../wxMac-2.8.10/include",
"../../wxWidgets-2.9.4/include",
"../../wxWidgets-2.9.4/build/osx/setup/carbon/include",
../clientgui,
);
INFOPLIST_FILE = Info.plist;
LIBRARY_SEARCH_PATHS = (
"../../wxMac-2.8.10/src/build/Deployment/",
"\"$(SRCROOT)/../../wxMac-2.8.10/src/build/Deployment\"",
"../../wxWidgets-2.9.4/build/osx/build/Debug",
"\"$(SRCROOT)/../../wxWidgets-2.9.4/build/osx/build/Debug\"",
);
OTHER_CFLAGS = (
"-DHAVE_CONFIG_H",
@ -3655,18 +3660,19 @@
DEAD_CODE_STRIPPING = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEPLOYMENT_POSTPROCESSING = YES;
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
GCC_PFE_FILE_C_DIALECTS = "c++";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ../clientgui/mac/MacGUI.pch;
HEADER_SEARCH_PATHS = (
"../../wxMac-2.8.10/src/build/include/",
"../../wxMac-2.8.10/include",
"../../wxWidgets-2.9.4/include",
"../../wxWidgets-2.9.4/build/osx/setup/carbon/include",
../clientgui,
);
INFOPLIST_FILE = Info.plist;
LIBRARY_SEARCH_PATHS = (
"../../wxMac-2.8.10/src/build/Deployment/",
"\"$(SRCROOT)/../../wxMac-2.8.10/src/build/Deployment\"",
"../../wxWidgets-2.9.4/build/osx/build/Release",
"\"$(SRCROOT)/../../wxWidgets-2.9.4/build/osx/build/Release\"",
);
OTHER_CFLAGS = (
"-DHAVE_CONFIG_H",
@ -3802,6 +3808,14 @@
"-lbz2",
);
PRODUCT_NAME = boincscr;
WARNING_LDFLAGS = (
"-lresolv",
"-ljpeg",
"../../freetype-2.4.10/objs/.libs/libfreetype.a",
"../../ftgl-2.1.3~rc5/src/.libs/libftgl.a",
"-lz",
"-lbz2",
);
};
name = Development;
};
@ -3827,6 +3841,14 @@
"-lbz2",
);
PRODUCT_NAME = boincscr;
WARNING_LDFLAGS = (
"-lresolv",
"-ljpeg",
"../../freetype-2.4.10/objs/.libs/libfreetype.a",
"../../ftgl-2.1.3~rc5/src/.libs/libftgl.a",
"-lz",
"-lbz2",
);
};
name = Deployment;
};

View File

@ -18,7 +18,7 @@
# along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#
#
# Script to build the wxMac-2.8.10 library for BOINC as a Universal Binary
# Script to build the wxMac-2.9.4 library for BOINC
#
# by Charlie Fenton 7/21/06
# Updated for wx-Mac 2.8.10 and Unicode 4/17/09
@ -30,8 +30,8 @@
#
## This script requires OS 10.6 or later
##
## In Terminal, CD to the wxMac-2.8.10 directory.
## cd [path]/wxMac-2.8.10/
## In Terminal, CD to the wxMac-2.9.4 directory.
## cd [path]/wxMac-2.9.4/
## then run this script:
## source [ path_to_this_script ] [ -clean ]
##
@ -65,93 +65,23 @@ if [ ! "$?" = "0" ]; then
return 1
fi
## By default, wxMac 2.8.10 links with libiconv.dyld, but building with OS 10.6 SDK
## makes it require libiconv.2.4.0.dylib, while OS 10.4 supplies only libiconv.2.2.0.dylib.
## This causes the Manager to fail under OS 10.4 with a dyld error.
## But libiconv is not really needed for BOINC Manager, so we patch wxMac's config file to
## avoid using libiconv.
if [ ! -f "include/wx/mac/carbon/config_xcode.h.orig" ]; then
## Make sure sed uses UTF-8 text encoding
unset LC_CTYPE
unset LC_MESSAGES
unset __CF_USER_TEXT_ENCODING
export LANG=en_US.UTF-8
echo "patching file include/wx/mac/carbon/config_xcode.h"
sed -i ".orig" s%"#define HAVE_ICONV 1"%"//#undef HAVE_ICONV"%g "include/wx/mac/carbon/config_xcode.h"
if [ "$1" != "-clean" ] && [ -f build/osx/build/Release/libwx_osx_carbon_static.a ]; then
echo "Release libwx_osx_carbon_static.a already built"
else
echo "config_xcode.h already patched"
fi
## Fix a bug in wxMutex. This patch should not be needed for wxMac-2.8.11 and later
if [ ! -f src/mac/carbon/thread.cpp.orig ]; then
cat >> /tmp/wxmutex_diff << ENDOFFILE
--- src/mac/carbon/thread-old.cpp 2009-03-06 04:23:14.000000000 -0800
+++ src/mac/carbon/thread.cpp 2009-05-05 04:34:41.000000000 -0700
@@ -138,8 +138,8 @@
#if TARGET_API_MAC_OSX
#define wxUSE_MAC_SEMAPHORE_MUTEX 0
-#define wxUSE_MAC_CRITICAL_REGION_MUTEX 1
-#define wxUSE_MAC_PTHREADS_MUTEX 0
+#define wxUSE_MAC_CRITICAL_REGION_MUTEX 0
+#define wxUSE_MAC_PTHREADS_MUTEX 1
#else
#define wxUSE_MAC_SEMAPHORE_MUTEX 0
#define wxUSE_MAC_CRITICAL_REGION_MUTEX 1
ENDOFFILE
patch -bfi /tmp/wxmutex_diff src/mac/carbon/thread.cpp
rm -f /tmp/wxmutex_diff
else
echo "thread.cpp already patched"
fi
## Fix a compile error in mac/carbon/graphics.cpp.
if [ ! -f src/mac/carbon/graphics.cpp.orig ]; then
cat >> /tmp/wxgraphics_diff << ENDOFFILE
--- src/mac/carbon/graphics-old.cpp 2009-03-06 04:23:13.000000000 -0800
+++ src/mac/carbon/graphics.cpp 2012-07-06 02:49:23.000000000 -0700
@@ -1069,7 +1069,7 @@
virtual void Transform( const wxGraphicsMatrixData* matrix );
// gets the bounding box enclosing all points (possibly including control points)
- virtual void GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *y) const;
+ virtual void GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h) const;
virtual bool Contains( wxDouble x, wxDouble y, int fillStyle = wxODDEVEN_RULE) const;
private :
ENDOFFILE
patch -bfi /tmp/wxgraphics_diff src/mac/carbon/graphics.cpp
rm -f /tmp/wxgraphics_diff
else
echo "graphics.cpp already patched"
fi
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac_static.a ]; then
echo "Deployment libwx_mac_static.a already built"
else
## export DEVELOPER_SDK_DIR="/Developer/SDKs"
## We must override some of the build settings in wxWindows.xcodeproj
xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Deployment $doclean build -sdk macosx10.6 GCC_VERSION_i386="" MACOSX_DEPLOYMENT_TARGET_i386=10.4 ARCHS="i386" OTHER_CPLUSPLUSFLAGS="-DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -fvisibility=hidden -fvisibility-inlines-hidden"
xcodebuild -project build/osx/wxcarbon.xcodeproj -target static -configuration Release $doclean build -sdk macosx10.6 GCC_VERSION=com.apple.compilers.llvmgcc42 MACOSX_DEPLOYMENT_TARGET_i386=10.4 ARCHS="i386" OTHER_CPLUSPLUSFLAGS="-DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -fvisibility=hidden -fvisibility-inlines-hidden"
if [ $? -ne 0 ]; then return 1; fi
fi
if [ "$1" != "-clean" ] && [ -f src/build/Development/libwx_mac_static.a ]; then
echo "Development libwx_mac_static.a already built"
if [ "$1" != "-clean" ] && [ -f build/osx/build/Debug/libwx_osx_carbon_static.a ]; then
echo "Debug libwx_osx_carbon_static.a already built"
else
## export DEVELOPER_SDK_DIR="/Developer/SDKs"
## We must override some of the build settings in wxWindows.xcodeproj
xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Development $doclean build -sdk macosx10.6 GCC_VERSION_i386="" MACOSX_DEPLOYMENT_TARGET_i386=10.4 ARCHS="i386" OTHER_CPLUSPLUSFLAGS="-DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -fvisibility=hidden -fvisibility-inlines-hidden"
xcodebuild -project build/osx/wxcarbon.xcodeproj -target static -configuration Debug $doclean build -sdk macosx10.6 GCC_VERSION=com.apple.compilers.llvmgcc42 MACOSX_DEPLOYMENT_TARGET_i386=10.4 ARCHS="i386" OTHER_CPLUSPLUSFLAGS="-DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -fvisibility=hidden -fvisibility-inlines-hidden"
if [ $? -ne 0 ]; then return 1; fi
fi