diff --git a/build/macosx/juce.xcconfig b/build/macosx/juce.xcconfig index 09ff0c3065..90a87e93cf 100644 --- a/build/macosx/juce.xcconfig +++ b/build/macosx/juce.xcconfig @@ -1,6 +1,11 @@ ARCHS = ppc i386 + +MACOSX_DEPLOYMENT_TARGET_ppc = 10.3 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk -GCC_VERSION_ppc = 3.3 -MACOSX_DEPLOYMENT_TARGET_ppc = 10.2 -OTHER_LD_FLAGS_ppc = /Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3/libstdc++.a -SDKROOT_ppc = /Developer/SDKs/MacOSX10.2.8.sdk \ No newline at end of file +SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk + +// N.B. For 10.2 compatibility, use these values instead of the ones above: +// GCC_VERSION_ppc = 3.3 +// MACOSX_DEPLOYMENT_TARGET_ppc = 10.2 +// OTHER_LD_FLAGS_ppc = /Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3/libstdc++.a +// SDKROOT_ppc = /Developer/SDKs/MacOSX10.2.8.sdk \ No newline at end of file diff --git a/build/win32/platform_specific_code/juce_win32_Network.cpp b/build/win32/platform_specific_code/juce_win32_Network.cpp index 9bfbc54ab0..e02cc652f2 100644 --- a/build/win32/platform_specific_code/juce_win32_Network.cpp +++ b/build/win32/platform_specific_code/juce_win32_Network.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with JUCE; if not, visit www.gnu.org/licenses or write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------------ @@ -222,7 +222,7 @@ void juce_closeInternetFile (void* handle) } } -static int getMACAddressViaGetAdaptersInfo (int64* addresses, int maxNum) +static int getMACAddressViaGetAdaptersInfo (int64* addresses, int maxNum) throw() { int numFound = 0; @@ -262,7 +262,7 @@ static int getMACAddressViaGetAdaptersInfo (int64* addresses, int maxNum) return numFound; } -static int getMACAddressesViaNetBios (int64* addresses, int maxNum) +static int getMACAddressesViaNetBios (int64* addresses, int maxNum) throw() { int numFound = 0; @@ -326,7 +326,7 @@ static int getMACAddressesViaNetBios (int64* addresses, int maxNum) return numFound; } -int SystemStats::getMACAddresses (int64* addresses, int maxNum) +int SystemStats::getMACAddresses (int64* addresses, int maxNum) throw() { int numFound = getMACAddressViaGetAdaptersInfo (addresses, maxNum); diff --git a/build/win32/platform_specific_code/juce_win32_SystemStats.cpp b/build/win32/platform_specific_code/juce_win32_SystemStats.cpp index 2e2a9e825b..ee800c6366 100644 --- a/build/win32/platform_specific_code/juce_win32_SystemStats.cpp +++ b/build/win32/platform_specific_code/juce_win32_SystemStats.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with JUCE; if not, visit www.gnu.org/licenses or write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------------ @@ -215,7 +215,7 @@ static void juce_getCpuVendor (char* const v) memcpy (v, vendor, 16); } -const String SystemStats::getCpuVendor() +const String SystemStats::getCpuVendor() throw() { char v [16]; juce_getCpuVendor (v); diff --git a/build/win32/platform_specific_code/juce_win32_Windowing.cpp b/build/win32/platform_specific_code/juce_win32_Windowing.cpp index 2fa12ab5df..5f9946bd4d 100644 --- a/build/win32/platform_specific_code/juce_win32_Windowing.cpp +++ b/build/win32/platform_specific_code/juce_win32_Windowing.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with JUCE; if not, visit www.gnu.org/licenses or write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------------ @@ -224,7 +224,7 @@ const int KeyPress::numberPadMultiply = VK_MULTIPLY | extendedKeyMod const int KeyPress::numberPadDivide = VK_DIVIDE | extendedKeyModifier; const int KeyPress::numberPadSeparator = VK_SEPARATOR | extendedKeyModifier; const int KeyPress::numberPadDecimalPoint = VK_DECIMAL | extendedKeyModifier; -const int KeyPress::numberPadEquals = VK_OEM_NEC_EQUAL | extendedKeyModifier; +const int KeyPress::numberPadEquals = 0x92 /*VK_OEM_NEC_EQUAL*/ | extendedKeyModifier; const int KeyPress::numberPadDelete = VK_DELETE | extendedKeyModifier; const int KeyPress::playKey = 0x30000; const int KeyPress::stopKey = 0x30001; @@ -301,7 +301,7 @@ public: } void blitToWindow (HWND hwnd, HDC dc, const bool transparent, - const int x, const int y, + const int x, const int y, const RectangleList& maskedRegion) throw() { static HDRAWDIB hdd = 0; @@ -2191,7 +2191,7 @@ private: case WM_GETDLGCODE: return DLGC_WANTALLKEYS; - + default: break; } diff --git a/docs/JUCE changelist.txt b/docs/JUCE changelist.txt index 265caaf0b1..0bec0d42d9 100644 --- a/docs/JUCE changelist.txt +++ b/docs/JUCE changelist.txt @@ -6,7 +6,8 @@ ============================================================================== Changelist for version 1.44 -- new Mac-only class: AppleRemoteDevice, which lets you grab and listen for events from your Apple remote control. +- new Mac-only class: AppleRemoteDevice, which lets you grab and listen for events from your Apple remote control. (Only works if you build for 10.3 or above). +- the default Mac build is now 10.3 compatible by default. (If anyone still needs 10.2 ppc compatibility, it still works, you just need to change the settings in the juce.xconfig file) - change to the keyPressed() and keyStateChanged() callbacks in Component and KeyListener. These used to be void, but they now return a bool to indicate whether the key event was needed or not. Any existing code you've got will break in the compiler, so just change it to return true if the key was used, or false to allow the event to be passed up to the next component in the chain. (This change is a better architecture than before, and was also needed so that plugins can allow unused key events to be passed on to the host application) - swapped the look and feel classes around, so that the basic LookAndFeel class is now what used to be the "shiny" one. The ShinyLookAndFeel class has been removed, and for that old fashioned look, I've added an OldSchoolLookAndFeel that you can use if you need the original L+F. This means that any custom looks that you were using may need to change their base class. - changed the MouseEvent structure so that it now contains a pointer to the event component and also the original component. diff --git a/extras/example projects/example_project_for_Mac/juce_application.xcodeproj/project.pbxproj b/extras/example projects/example_project_for_Mac/juce_application.xcodeproj/project.pbxproj index fbc625cc98..596e825f78 100644 --- a/extras/example projects/example_project_for_Mac/juce_application.xcodeproj/project.pbxproj +++ b/extras/example projects/example_project_for_Mac/juce_application.xcodeproj/project.pbxproj @@ -11,7 +11,7 @@ 8407902B09E6B5BD004E7BCD /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8407902A09E6B5BD004E7BCD /* QuickTime.framework */; }; 84F30CD108FEAAA20087E26C /* Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F30CD008FEAAA20087E26C /* Main.cpp */; }; 84F30CED08FEAD7A0087E26C /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F30CEC08FEAD7A0087E26C /* CoreAudio.framework */; }; - 84FDB0610C15BD5C00CD0087 /* libjuce.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84FDB05E0C15BD4500CD0087 /* libjuce.a */; }; + 84FDB0610C15BD5C00CD0087 /* libjucedebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84FDB05E0C15BD4500CD0087 /* libjucedebug.a */; }; 8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; }; 8D0C4E920486CD37000505A6 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; }; /* End PBXBuildFile section */ @@ -21,7 +21,7 @@ isa = PBXContainerItemProxy; containerPortal = 84F30CCA08FEAA8C0087E26C /* Juce.xcodeproj */; proxyType = 2; - remoteGlobalIDString = D2AAC046055464E500DB518D /* libjuce.a */; + remoteGlobalIDString = D2AAC046055464E500DB518D; remoteInfo = Juce; }; /* End PBXContainerItemProxy section */ @@ -45,7 +45,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 84FDB0610C15BD5C00CD0087 /* libjuce.a in Frameworks */, + 84FDB0610C15BD5C00CD0087 /* libjucedebug.a in Frameworks */, 8D0C4E920486CD37000505A6 /* Carbon.framework in Frameworks */, 84F30CED08FEAD7A0087E26C /* CoreAudio.framework in Frameworks */, 84078F3E09E6B42E004E7BCD /* AGL.framework in Frameworks */, @@ -109,7 +109,7 @@ 84FDB05A0C15BD4500CD0087 /* Products */ = { isa = PBXGroup; children = ( - 84FDB05E0C15BD4500CD0087 /* libjuce.a */, + 84FDB05E0C15BD4500CD0087 /* libjucedebug.a */, ); name = Products; sourceTree = ""; @@ -157,10 +157,10 @@ /* End PBXProject section */ /* Begin PBXReferenceProxy section */ - 84FDB05E0C15BD4500CD0087 /* libjuce.a */ = { + 84FDB05E0C15BD4500CD0087 /* libjucedebug.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = libjuce.a; + path = libjucedebug.a; remoteRef = 84FDB05D0C15BD4500CD0087 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; diff --git a/extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj b/extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj index 829eccdd00..5bba53ebee 100644 --- a/extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj +++ b/extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj @@ -32,7 +32,7 @@ 84EAE2F309DAAF0B00288D0A /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84EAE2F109DAAF0B00288D0A /* AGL.framework */; }; 84EAE2F409DAAF0B00288D0A /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84EAE2F209DAAF0B00288D0A /* OpenGL.framework */; }; 84F8DB0B099CA8DD00E911ED /* QuickTimeDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F8DB0A099CA8DD00E911ED /* QuickTimeDemo.cpp */; }; - 84FDB0950C15BDDD00CD0087 /* libjucedebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84FDB0940C15BDCE00CD0087 /* libjucedebug.a */; }; + 84FDB0950C15BDDD00CD0087 /* libjuce.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84FDB0940C15BDCE00CD0087 /* libjuce.a */; }; 8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; }; 8D0C4E920486CD37000505A6 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; }; /* End PBXBuildFile section */ @@ -85,7 +85,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 84FDB0950C15BDDD00CD0087 /* libjucedebug.a in Frameworks */, + 84FDB0950C15BDDD00CD0087 /* libjuce.a in Frameworks */, 8D0C4E920486CD37000505A6 /* Carbon.framework in Frameworks */, 84C49F2606C0F3200066071B /* CoreAudio.framework in Frameworks */, 84C4A41106C0F9A00066071B /* IOKit.framework in Frameworks */, @@ -181,7 +181,7 @@ 84FDB0900C15BDCE00CD0087 /* Products */ = { isa = PBXGroup; children = ( - 84FDB0940C15BDCE00CD0087 /* libjucedebug.a */, + 84FDB0940C15BDCE00CD0087 /* libjuce.a */, ); name = Products; sourceTree = ""; @@ -244,10 +244,10 @@ /* End PBXProject section */ /* Begin PBXReferenceProxy section */ - 84FDB0940C15BDCE00CD0087 /* libjucedebug.a */ = { + 84FDB0940C15BDCE00CD0087 /* libjuce.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = libjucedebug.a; + path = libjuce.a; remoteRef = 84FDB0930C15BDCE00CD0087 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; diff --git a/extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj b/extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj index c3cadbd074..e48d58cad7 100644 --- a/extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj +++ b/extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj @@ -50,7 +50,7 @@ 84F559320A223B0E00A8311C /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F5592A0A223B0E00A8311C /* IOKit.framework */; }; 84F559330A223B0E00A8311C /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F5592B0A223B0E00A8311C /* OpenGL.framework */; }; 84F559340A223B0E00A8311C /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F5592C0A223B0E00A8311C /* QuickTime.framework */; }; - 84FDB1B50C15C24F00CD0087 /* libjucedebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84FDB1B20C15C24300CD0087 /* libjucedebug.a */; }; + 84FDB1B50C15C24F00CD0087 /* libjuce.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84FDB1B20C15C24300CD0087 /* libjuce.a */; }; 8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; }; /* End PBXBuildFile section */ @@ -189,7 +189,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 84FDB1B50C15C24F00CD0087 /* libjucedebug.a in Frameworks */, + 84FDB1B50C15C24F00CD0087 /* libjuce.a in Frameworks */, 84F5592D0A223B0E00A8311C /* AGL.framework in Frameworks */, 84F5592E0A223B0E00A8311C /* Carbon.framework in Frameworks */, 84F5592F0A223B0E00A8311C /* CoreAudio.framework in Frameworks */, @@ -432,7 +432,7 @@ 84FDB1AE0C15C24300CD0087 /* Products */ = { isa = PBXGroup; children = ( - 84FDB1B20C15C24300CD0087 /* libjucedebug.a */, + 84FDB1B20C15C24300CD0087 /* libjuce.a */, ); name = Products; sourceTree = ""; @@ -480,10 +480,10 @@ /* End PBXProject section */ /* Begin PBXReferenceProxy section */ - 84FDB1B20C15C24300CD0087 /* libjucedebug.a */ = { + 84FDB1B20C15C24300CD0087 /* libjuce.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = libjucedebug.a; + path = libjuce.a; remoteRef = 84FDB1B10C15C24300CD0087 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; diff --git a/src/juce_appframework/gui/components/keyboard/juce_KeyMappingEditorComponent.cpp b/src/juce_appframework/gui/components/keyboard/juce_KeyMappingEditorComponent.cpp index f862938888..bbd2a89ce0 100644 --- a/src/juce_appframework/gui/components/keyboard/juce_KeyMappingEditorComponent.cpp +++ b/src/juce_appframework/gui/components/keyboard/juce_KeyMappingEditorComponent.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with JUCE; if not, visit www.gnu.org/licenses or write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------------ @@ -33,6 +33,11 @@ BEGIN_JUCE_NAMESPACE +// N.B. these two includes are put here deliberately to avoid problems with +// old GCCs failing on long include paths +#include "../../../../juce_core/containers/juce_VoidArray.h" +#include "../../../../juce_core/containers/juce_OwnedArray.h" + #include "juce_KeyMappingEditorComponent.h" #include "../menus/juce_PopupMenu.h" #include "../windows/juce_AlertWindow.h" diff --git a/src/juce_appframework/gui/graphics/colour/juce_PixelFormats.h b/src/juce_appframework/gui/graphics/colour/juce_PixelFormats.h index e908bbfddf..ee3157ac65 100644 --- a/src/juce_appframework/gui/graphics/colour/juce_PixelFormats.h +++ b/src/juce_appframework/gui/graphics/colour/juce_PixelFormats.h @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with JUCE; if not, visit www.gnu.org/licenses or write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------------ diff --git a/src/juce_appframework/gui/graphics/geometry/juce_Line.cpp b/src/juce_appframework/gui/graphics/geometry/juce_Line.cpp index 46e01d4927..01a02c12a0 100644 --- a/src/juce_appframework/gui/graphics/geometry/juce_Line.cpp +++ b/src/juce_appframework/gui/graphics/geometry/juce_Line.cpp @@ -97,28 +97,23 @@ static bool juce_lineIntersection (const float x1, const float y1, return false; } - else - { - const float along1 = ((y1 - y3) * dx2 - (x1 - x3) * dy2) / divisor; - intersectionX = x1 + along1 * dx1; - intersectionY = y1 + along1 * dy1; + const float along1 = ((y1 - y3) * dx2 - (x1 - x3) * dy2) / divisor; - if (along1 < 0 || along1 > 1.0f) - return false; + intersectionX = x1 + along1 * dx1; + intersectionY = y1 + along1 * dy1; - const float along2 = ((y1 - y3) * dx1 - (x1 - x3) * dy1) / divisor; + if (along1 < 0 || along1 > 1.0f) + return false; - return along2 >= 0 && along2 <= 1.0f; - } - } - else - { - intersectionX = x2; - intersectionY = y2; + const float along2 = ((y1 - y3) * dx1 - (x1 - x3) * dy1) / divisor; - return true; + return along2 >= 0 && along2 <= 1.0f; } + + intersectionX = x2; + intersectionY = y2; + return true; } //============================================================================== diff --git a/src/juce_core/containers/juce_Array.h b/src/juce_core/containers/juce_Array.h index 82a906a075..b9201f5c03 100644 --- a/src/juce_core/containers/juce_Array.h +++ b/src/juce_core/containers/juce_Array.h @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with JUCE; if not, visit www.gnu.org/licenses or write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------------ @@ -47,7 +47,7 @@ of the objects - for doing this, see the OwnedArray class or the ReferenceCountedArray class. If you're using a class or struct as the element type, it must be - capable of being copied or moved with a straightforward memcpy, rather than + capable of being copied or moved with a straightforward memcpy, rather than needing construction and destruction code. For holding lists of strings, use the specialised class StringArray.