Skip to content

Commit 3305ba9

Browse files
committed
Improved compatibility with OS X 10.8
1 parent 77608a1 commit 3305ba9

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

Stockfish.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -703,9 +703,9 @@
703703
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
704704
GCC_WARN_UNUSED_FUNCTION = YES;
705705
GCC_WARN_UNUSED_VARIABLE = YES;
706-
MACOSX_DEPLOYMENT_TARGET = 10.9;
706+
MACOSX_DEPLOYMENT_TARGET = 10.8;
707707
ONLY_ACTIVE_ARCH = YES;
708-
SDKROOT = macosx;
708+
SDKROOT = macosx10.8;
709709
};
710710
name = Debug;
711711
};
@@ -735,8 +735,8 @@
735735
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
736736
GCC_WARN_UNUSED_FUNCTION = YES;
737737
GCC_WARN_UNUSED_VARIABLE = YES;
738-
MACOSX_DEPLOYMENT_TARGET = 10.9;
739-
SDKROOT = macosx;
738+
MACOSX_DEPLOYMENT_TARGET = 10.8;
739+
SDKROOT = macosx10.8;
740740
};
741741
name = Release;
742742
};
@@ -849,9 +849,9 @@
849849
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
850850
GCC_WARN_UNUSED_FUNCTION = YES;
851851
GCC_WARN_UNUSED_VARIABLE = YES;
852-
MACOSX_DEPLOYMENT_TARGET = 10.9;
852+
MACOSX_DEPLOYMENT_TARGET = 10.8;
853853
ONLY_ACTIVE_ARCH = YES;
854-
SDKROOT = macosx;
854+
SDKROOT = macosx10.8;
855855
};
856856
name = Test;
857857
};

Stockfish/SFMArrowView.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ - (void)drawRect:(NSRect)dirtyRect
2323
return;
2424
}
2525

26-
[[NSColor colorWithRed:1 green:0 blue:0 alpha:0.5] set];
26+
[[NSColor colorWithSRGBRed:1 green:0 blue:0 alpha:0.5] set];
2727

2828
CGFloat arrowLineWidth = self.squareSideLength * ARROW_LINE_WIDTH_AS_PERCENT_OF_SQUARE_WIDTH;
2929

Stockfish/SFMBoardView.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ - (id)initWithFrame:(NSRect)frame
114114
self.lightSquareColor = [NSColor whiteColor];
115115
self.darkSquareColor = [NSColor brownColor];
116116
self.fontColor = [NSColor whiteColor];
117-
self.highlightColor = [NSColor colorWithRed:1 green:1 blue:0 alpha:0.7];
117+
self.highlightColor = [NSColor colorWithSRGBRed:1 green:1 blue:0 alpha:0.7];
118118

119119
self.boardShadow = [NSShadow new];
120120
[self.boardShadow setShadowBlurRadius:BOARD_SHADOW_BLUR_RADIUS];
121-
[self.boardShadow setShadowColor:[NSColor colorWithWhite:0 alpha:0.75]]; // Gray
121+
[self.boardShadow setShadowColor:[NSColor colorWithGenericGamma22White:0 alpha:0.75]]; // Gray
122122

123123
self.position = new Position([FEN_START_POSITION UTF8String]);
124124

Stockfish/SFMChessGame.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ - (id)initWithWhite:(SFMPlayer *)p1 andBlack:(SFMPlayer *)p2
2727
{
2828
self = [super init];
2929
if (self) {
30-
NSDateComponents *dateComponents = [[NSCalendar currentCalendar] components:NSCalendarUnitYear|NSCalendarUnitDay|NSCalendarUnitMonth fromDate:[NSDate new]];
30+
NSDateComponents *dateComponents = [[NSCalendar currentCalendar] components:kCFCalendarUnitYear|kCFCalendarUnitDay|kCFCalendarUnitMonth fromDate:[NSDate new]];
3131
NSString *dateStr = [NSString stringWithFormat:@"%ld.%02ld.%02ld", (long)dateComponents.year, (long)dateComponents.month, (long)dateComponents.day];
3232
NSDictionary *defaultTags = @{@"Event": @"Casual Game",
3333
@"Site": @"Earth",

Stockfish/SFMPieceView.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ - (id)initWithPieceType:(Chess::Piece)pieceType
2929

3030
NSShadow *shadow = [NSShadow new];
3131
[shadow setShadowBlurRadius:PIECE_SHADOW_BLUR_RADIUS];
32-
[shadow setShadowColor:[NSColor colorWithWhite:0 alpha:0.5]]; // Gray
32+
[shadow setShadowColor:[NSColor colorWithGenericGamma22White:0 alpha:0.5]]; // Gray
3333
[self setShadow:shadow];
3434
}
3535
return self;

Stockfish/SFMWindowController.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ - (void)checkIfGameOver
182182
if (self.currentGame.currPosition->is_mate()) {
183183
NSString *resultText = (self.currentGame.currPosition->side_to_move() == WHITE) ? @"0-1" : @"1-0";
184184
NSAlert *alert = [NSAlert alertWithMessageText:@"Game over!" defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:(self.currentGame.currPosition->side_to_move() == WHITE) ? @"Black wins." : @"White wins."];
185-
[alert beginSheetModalForWindow:self.window completionHandler:nil];
185+
[alert beginSheetModalForWindow:self.window modalDelegate:nil didEndSelector:nil contextInfo:nil];
186186
self.currentGame.tags[@"Result"] = resultText;
187187
} else if (self.currentGame.currPosition->is_immediate_draw()) {
188188
NSAlert *alert = [NSAlert alertWithMessageText:@"Game over!" defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:@"It's a draw."];
189-
[alert beginSheetModalForWindow:self.window completionHandler:nil];
189+
[alert beginSheetModalForWindow:self.window modalDelegate:nil didEndSelector:nil contextInfo:nil];
190190
self.currentGame.tags[@"Result"] = @"1/2-1/2";
191191
}
192192
}
@@ -431,7 +431,7 @@ - (NSString *)prettyPV:(NSString *)pvAsText
431431
}
432432

433433
// And now, we add the arrow to the board
434-
Move firstMove = ((SFMChessMove *)[pvMacMoveObjects firstObject]).move;
434+
Move firstMove = ((SFMChessMove *) pvMacMoveObjects[0]).move;
435435
[self.boardView clearArrows];
436436
[self.boardView addArrowFrom:move_from(firstMove) to:move_to(firstMove)];
437437

Stockfish/Stockfish-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
<key>CFBundlePackageType</key>
4343
<string>APPL</string>
4444
<key>CFBundleShortVersionString</key>
45-
<string>1.0.3</string>
45+
<string>1.0.4</string>
4646
<key>CFBundleSignature</key>
4747
<string>????</string>
4848
<key>CFBundleVersion</key>
49-
<string>13</string>
49+
<string>14</string>
5050
<key>LSApplicationCategoryType</key>
5151
<string>public.app-category.board-games</string>
5252
<key>LSMinimumSystemVersion</key>

Stockfish/stockfish-64

0 Bytes
Binary file not shown.

Stockfish/stockfish-sse42

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)