Skip to content

Commit

Permalink
[DEV] Add support for ppc (10.4), i386 (10.4) and x86_64 (10.5).
Browse files Browse the repository at this point in the history
Note: we need to keep SDKROOT incorrectly set to 10.5 since 10.4 SDK's WebKit.framework lacks some symbols it should have.
  • Loading branch information
rentzsch committed Jun 24, 2009
1 parent 0055375 commit 1ea6144
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 34 deletions.
42 changes: 24 additions & 18 deletions ClickToFlash.xcodeproj/project.pbxproj
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 42;
objectVersion = 44;
objects = {

/* Begin PBXAggregateTarget section */
Expand Down Expand Up @@ -288,7 +288,7 @@
55EB70320E04A8410016593D /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 55EB70350E04A8410016593D /* Build configuration list for PBXProject "ClickToFlash" */;
compatibilityVersion = "Xcode 2.4";
compatibilityVersion = "Xcode 3.0";
hasScannedForEncodings = 0;
mainGroup = 55EB70300E04A8410016593D;
productRefGroup = 55EB70430E04A8640016593D /* Products */;
Expand Down Expand Up @@ -467,13 +467,10 @@
55EB70330E04A8410016593D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
COPY_PHASE_STRIP = NO;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_SIGN_COMPARE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.4;
PRODUCT_VERSION = 1.5b2;
WARNING_CFLAGS = "-Wall";
};
Expand All @@ -482,13 +479,10 @@
55EB70340E04A8410016593D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
COPY_PHASE_STRIP = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_SIGN_COMPARE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.4;
PRODUCT_VERSION = 1.5b2;
WARNING_CFLAGS = "-Wall";
};
Expand All @@ -497,23 +491,29 @@
55EB70450E04A8640016593D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
ARCHS = (
ppc,
i386,
x86_64,
);
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)";
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_ENABLE_OBJC_GC = YES;
GCC_ENABLE_OBJC_GC = supported;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = Plugin/ClickToFlash_Prefix.pch;
INFOPLIST_FILE = "Plugin/Info-Plugin.plist";
INSTALL_PATH = "$(HOME)/Library/Bundles";
MACOSX_DEPLOYMENT_TARGET = 10.5;
"MACOSX_DEPLOYMENT_TARGET[arch=i386]" = 10.4;
"MACOSX_DEPLOYMENT_TARGET[arch=ppc]" = 10.4;
PREBINDING = NO;
PRODUCT_NAME = ClickToFlash;
SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
VALID_ARCHS = "i386 ppc ppc7400 ppc970 x86_64";
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
VALID_ARCHS = "ppc i386 x86_64";
WRAPPER_EXTENSION = webplugin;
ZERO_LINK = NO;
};
Expand All @@ -522,22 +522,28 @@
55EB70460E04A8640016593D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
ARCHS = (
ppc,
i386,
x86_64,
);
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_ENABLE_OBJC_GC = YES;
GCC_ENABLE_OBJC_GC = supported;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = "Plugin/Info-Plugin.plist";
INSTALL_PATH = "$(HOME)/Library/Bundles";
MACOSX_DEPLOYMENT_TARGET = 10.5;
"MACOSX_DEPLOYMENT_TARGET[arch=i386]" = 10.4;
"MACOSX_DEPLOYMENT_TARGET[arch=ppc]" = 10.4;
PREBINDING = NO;
PRODUCT_NAME = ClickToFlash;
SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
VALID_ARCHS = "i386 ppc ppc7400 ppc970 x86_64";
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
VALID_ARCHS = "ppc i386 x86_64";
WRAPPER_EXTENSION = webplugin;
ZERO_LINK = NO;
};
Expand Down
16 changes: 11 additions & 5 deletions MATrackingArea/MATrackingArea.m
Expand Up @@ -24,6 +24,12 @@ @implementation NSWindow (liveFrame)
// This method is because -[NSWindow frame] isn't updated continually during a drag.
- (NSRect)liveFrame {
Rect qdRect;
extern OSStatus
GetWindowBounds(
WindowRef window,
WindowRegionCode regionCode,
Rect * globalBounds);

GetWindowBounds([self windowRef], kWindowStructureRgn, &qdRect);

return NSMakeRect(qdRect.left,
Expand Down Expand Up @@ -215,7 +221,7 @@ + (void)addTrackingArea:(MATrackingArea *)trackingArea toView:(NSView *)view
return;
}

int index = [_views indexOfObject:view];
NSUInteger index = [_views indexOfObject:view];
if (index == NSNotFound) {
// Add view to _views and create appropriate entry in _trackingAreas.
[_views addObject:view];
Expand Down Expand Up @@ -252,7 +258,7 @@ + (void)removeTrackingArea:(MATrackingArea *)trackingArea fromView:(NSView *)vie
return;
}

int index = [_views indexOfObject:view];
NSUInteger index = [_views indexOfObject:view];
if (index == NSNotFound) {
// We don't have any trackingAreas for that view.
return;
Expand Down Expand Up @@ -285,7 +291,7 @@ + (void)removeTrackingArea:(MATrackingArea *)trackingArea fromView:(NSView *)vie
+ (NSArray *)trackingAreasForView:(NSView *)view
{
if (view) {
int index = [_views indexOfObject:view];
NSUInteger index = [_views indexOfObject:view];
if (index != NSNotFound) {
return [NSArray arrayWithArray:[_trackingAreas objectAtIndex:index]];
}
Expand Down Expand Up @@ -387,7 +393,7 @@ - (void)_setNotInside

- (id)copyWithZone:(NSZone *)zone
{
MATrackingArea *copy = (MATrackingArea *)[[[self class] allocWithZone:zone]
MATrackingArea *copy = (MATrackingArea *)[(MATrackingArea *)[[self class] allocWithZone:zone]
initWithRect:[self rect]
options:[self options]
owner:[self owner]
Expand All @@ -406,7 +412,7 @@ - (id)initWithCoder:(NSCoder *)coder
NSDictionary *userInfo = [coder decodeObjectForKey:@"_userInfo"];
id owner = [coder decodeObjectForKey:@"_owner"];

self = (MATrackingArea *)[[MATrackingArea alloc] initWithRect:rect
self = (MATrackingArea *)[(MATrackingArea *)[MATrackingArea alloc] initWithRect:rect
options:options
owner:owner
userInfo:userInfo];
Expand Down
24 changes: 13 additions & 11 deletions Plugin/Plugin.m
Expand Up @@ -793,19 +793,19 @@ - (void) _addTrackingAreaForCTF
trackingArea = [NSClassFromString(@"NSTrackingArea") alloc];
if (trackingArea != nil)
{
[trackingArea initWithRect:[self bounds]
options:MATrackingMouseEnteredAndExited | MATrackingActiveInKeyWindow | MATrackingEnabledDuringMouseDrag | MATrackingInVisibleRect
owner:self
userInfo:nil];
[(MATrackingArea *)trackingArea initWithRect:[self bounds]
options:MATrackingMouseEnteredAndExited | MATrackingActiveInKeyWindow | MATrackingEnabledDuringMouseDrag | MATrackingInVisibleRect
owner:self
userInfo:nil];
[self addTrackingArea:trackingArea];
}
else
{
trackingArea = [NSClassFromString(@"MATrackingArea") alloc];
[trackingArea initWithRect:[self bounds]
options:MATrackingMouseEnteredAndExited | MATrackingActiveInKeyWindow | MATrackingEnabledDuringMouseDrag | MATrackingInVisibleRect
owner:self
userInfo:nil];
[(MATrackingArea *)trackingArea initWithRect:[self bounds]
options:MATrackingMouseEnteredAndExited | MATrackingActiveInKeyWindow | MATrackingEnabledDuringMouseDrag | MATrackingInVisibleRect
owner:self
userInfo:nil];
[MATrackingArea addTrackingArea:trackingArea toView:self];
usingMATrackingArea = YES;
}
Expand Down Expand Up @@ -1199,8 +1199,10 @@ - (void)setLaunchedAppBundleIdentifier:(NSString *)newValue

@implementation NSBezierPath(MRGradientFill)

//typedef void (*CGFunctionEvaluateCallback)(void *info, const CGFloat *in, CGFloat *out);

static void
evaluate(void *info, const float *in, float *out)
evaluate(void *info, const CGFloat *in, CGFloat *out)
{
// red
*out++ = start_red + *in * d_red;
Expand Down Expand Up @@ -1263,8 +1265,8 @@ -(void)linearGradientFill:(NSRect)thisRect
colorspace = CGColorSpaceCreateDeviceRGB();

size_t components;
static const float domain[2] = { 0.0, 1.0 };
static const float range[10] = { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 };
static const CGFloat domain[2] = { 0.0, 1.0 };
static const CGFloat range[10] = { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 };
static const CGFunctionCallbacks callbacks = { 0, &evaluate, NULL };

components = 1 + CGColorSpaceGetNumberOfComponents(colorspace);
Expand Down

0 comments on commit 1ea6144

Please sign in to comment.