From c2e85238c8b1f6fee62ff51d8cc8905125c3302a Mon Sep 17 00:00:00 2001 From: Julian Storer Date: Fri, 28 Aug 2009 19:34:53 +0100 Subject: [PATCH] minor updates for XCode 3.2 compatibility --- build/macosx/Juce.xcodeproj/project.pbxproj | 2 ++ .../juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj | 4 +++- extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj | 2 ++ src/native/mac/juce_mac_Files.mm | 4 ++-- src/native/mac/juce_mac_NSViewComponentPeer.mm | 2 +- src/native/mac/juce_mac_QuickTimeMovieComponent.mm | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/build/macosx/Juce.xcodeproj/project.pbxproj b/build/macosx/Juce.xcodeproj/project.pbxproj index c762291eb8..6704e178d5 100644 --- a/build/macosx/Juce.xcodeproj/project.pbxproj +++ b/build/macosx/Juce.xcodeproj/project.pbxproj @@ -2926,6 +2926,7 @@ "DEBUG=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = jucedebug; @@ -2946,6 +2947,7 @@ "NDEBUG=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PRODUCT_NAME = juce; diff --git a/extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj b/extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj index 2145e641fa..b8d319af9e 100644 --- a/extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj +++ b/extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj @@ -57,7 +57,7 @@ 847F4EA20E8BA9C300F64426 /* ThreadingDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadingDemo.cpp; path = ../../src/demos/ThreadingDemo.cpp; sourceTree = SOURCE_ROOT; }; 847F4EA30E8BA9C300F64426 /* TreeViewDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TreeViewDemo.cpp; path = ../../src/demos/TreeViewDemo.cpp; sourceTree = SOURCE_ROOT; }; 847F4EA40E8BA9C300F64426 /* WidgetsDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WidgetsDemo.cpp; path = ../../src/demos/WidgetsDemo.cpp; sourceTree = SOURCE_ROOT; }; - 847F4EB00E8BA9DD00F64426 /* ApplicationStartup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ApplicationStartup.cpp; path = ../../src/ApplicationStartup.cpp; sourceTree = SOURCE_ROOT; }; + 847F4EB00E8BA9DD00F64426 /* ApplicationStartup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; name = ApplicationStartup.cpp; path = ../../src/ApplicationStartup.cpp; sourceTree = SOURCE_ROOT; }; 847F4EB10E8BA9DD00F64426 /* BinaryData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BinaryData.cpp; path = ../../src/BinaryData.cpp; sourceTree = SOURCE_ROOT; }; 847F4EB20E8BA9DD00F64426 /* BinaryData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BinaryData.h; path = ../../src/BinaryData.h; sourceTree = SOURCE_ROOT; }; 847F4EB30E8BA9DD00F64426 /* juce_AppConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = juce_AppConfig.h; path = ../../src/juce_AppConfig.h; sourceTree = SOURCE_ROOT; }; @@ -286,6 +286,7 @@ ARCHS = "$(ARCHS_STANDARD_32_BIT)"; GCC_C_LANGUAGE_STANDARD = c99; GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; @@ -299,6 +300,7 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; GCC_C_LANGUAGE_STANDARD = c99; + GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; diff --git a/extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj b/extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj index 5427eb6580..f325e44a25 100644 --- a/extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj +++ b/extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj @@ -563,6 +563,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 846929130A49DB9C00314975 /* juce.xcconfig */; buildSettings = { + GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; LIBRARY_SEARCH_PATHS = ../../../../bin; @@ -574,6 +575,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 846929130A49DB9C00314975 /* juce.xcconfig */; buildSettings = { + GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; LIBRARY_SEARCH_PATHS = ../../../../bin; diff --git a/src/native/mac/juce_mac_Files.mm b/src/native/mac/juce_mac_Files.mm index 78f19b816c..701c46669c 100644 --- a/src/native/mac/juce_mac_Files.mm +++ b/src/native/mac/juce_mac_Files.mm @@ -497,14 +497,14 @@ void juce_findFileClose (void* handle) throw() //============================================================================== bool juce_launchExecutable (const String& pathAndArguments) throw() { - char* const argv[4] = { "/bin/sh", "-c", (char*) (const char*) pathAndArguments, 0 }; + const char* const argv[4] = { "/bin/sh", "-c", (const char*) pathAndArguments, 0 }; const int cpid = fork(); if (cpid == 0) { // Child process - if (execve (argv[0], argv, 0) < 0) + if (execve (argv[0], (char**) argv, 0) < 0) exit (0); } else diff --git a/src/native/mac/juce_mac_NSViewComponentPeer.mm b/src/native/mac/juce_mac_NSViewComponentPeer.mm index ef4b81a458..48a7512865 100644 --- a/src/native/mac/juce_mac_NSViewComponentPeer.mm +++ b/src/native/mac/juce_mac_NSViewComponentPeer.mm @@ -807,7 +807,7 @@ NSViewComponentPeer::NSViewComponentPeer (Component* const component, [((JuceNSWindow*) window) setOwner: this]; [window orderOut: nil]; - [window setDelegate: window]; + [window setDelegate: (JuceNSWindow*) window]; [window setOpaque: component->isOpaque()]; [window setHasShadow: ((windowStyleFlags & windowHasDropShadow) != 0)]; diff --git a/src/native/mac/juce_mac_QuickTimeMovieComponent.mm b/src/native/mac/juce_mac_QuickTimeMovieComponent.mm index 8dd66e3b7e..072d537f12 100644 --- a/src/native/mac/juce_mac_QuickTimeMovieComponent.mm +++ b/src/native/mac/juce_mac_QuickTimeMovieComponent.mm @@ -77,7 +77,7 @@ static QTMovie* openMovieFromStream (InputStream* movieStream, File& movieFile) { movie = [QTMovie movieWithDataReference: [QTDataReference dataReferenceWithReferenceToData: [NSData dataWithBytes: temp.getData() length: temp.getSize()] - name: [NSString stringWithCString: suffixesToTry[i]] + name: [NSString stringWithUTF8String: suffixesToTry[i]] MIMEType: @""] error: nil];