Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for apple silicon and refactored deprecated function calls. #530

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# About Slate-arm64 #

I forked the original repository and refactored the project so that it runs natively on Apple silicon. I refactored some deprecated function calls to allow building.

Slate-arm64 currently works on Mac OS X 10.9 and above

# About Slate #

Slate is a window management application similar to Divvy and SizeUp (except better and free!). Originally written to replace them due to some limitations in how each work, it attempts to overcome them by simply being extremely configurable. As a result, it may be a bit daunting to get configured, but once it is done, the benefit is huge.
Expand Down
117 changes: 86 additions & 31 deletions Slate.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
783 changes: 783 additions & 0 deletions Slate/Base.lproj/MainMenu.xib

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Slate/ChainOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ - (void)parseOption:(NSString *)_name value:(id)value {

if (op == nil) {
@throw([NSException exceptionWithName:[NSString stringWithFormat:@"Invalid %@", _name] reason:[NSString stringWithFormat:@"Invalid %@ '%@'", _name, value] userInfo:nil]);
continue;
}
[ops addObject:op];
}
Expand Down
6 changes: 3 additions & 3 deletions Slate/JSONKit/JSONKit.m
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ + (id)allocWithZone:(NSZone *)zone
NSCParameterAssert((objects != NULL) && (_JKArrayClass != NULL) && (_JKArrayInstanceSize > 0UL));
JKArray *array = NULL;
if(JK_EXPECT_T((array = (JKArray *)calloc(1UL, _JKArrayInstanceSize)) != NULL)) { // Directly allocate the JKArray instance via calloc.
array->isa = _JKArrayClass;
object_setClass(array, _JKArrayClass);
if((array = [array init]) == NULL) { return(NULL); }
array->capacity = count;
array->count = count;
Expand Down Expand Up @@ -926,7 +926,7 @@ static void _JKDictionaryResizeIfNeccessary(JKDictionary *dictionary) {
NSCParameterAssert((keys != NULL) && (keyHashes != NULL) && (objects != NULL) && (_JKDictionaryClass != NULL) && (_JKDictionaryInstanceSize > 0UL));
JKDictionary *dictionary = NULL;
if(JK_EXPECT_T((dictionary = (JKDictionary *)calloc(1UL, _JKDictionaryInstanceSize)) != NULL)) { // Directly allocate the JKDictionary instance via calloc.
dictionary->isa = _JKDictionaryClass;
object_setClass(dictionary, _JKDictionaryClass);
if((dictionary = [dictionary init]) == NULL) { return(NULL); }
dictionary->capacity = _JKDictionaryCapacityForCount(count);
dictionary->count = 0UL;
Expand Down Expand Up @@ -2591,7 +2591,7 @@ static int jk_encode_add_atom_to_buffer(JKEncodeState *encodeState, void *object
// gains in the two to three percent range.
//
// XXX XXX XXX XXX

BOOL workAroundMacOSXABIBreakingBug = NO;
if(JK_EXPECT_F(((NSUInteger)object) & 0x1)) { workAroundMacOSXABIBreakingBug = YES; goto slowClassLookup; }

Expand Down
3 changes: 0 additions & 3 deletions Slate/SequenceOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,12 @@ - (void)parseOption:(NSString *)_name value:(id)value {
for (id key in value) {
if (![key isKindOfClass:[Operation class]] && ![key isKindOfClass:[NSArray class]] && ![key isKindOfClass:[WebScriptObject class]]) {
@throw([NSException exceptionWithName:[NSString stringWithFormat:@"Invalid %@", _name] reason:[NSString stringWithFormat:@"Invalid %@ '%@'", _name, value] userInfo:nil]);
continue;
}
NSMutableArray *innerOps = [NSMutableArray array];
if ([key isKindOfClass:[WebScriptObject class]]) {
Operation *op = [JSOperation jsOperationWithFunction:key];
if (op == nil) {
@throw([NSException exceptionWithName:[NSString stringWithFormat:@"Invalid %@", _name] reason:[NSString stringWithFormat:@"Invalid %@ '%@'", _name, value] userInfo:nil]);
continue;
}
[innerOps addObject:op];
} else if ([key isKindOfClass:[Operation class]]) {
Expand All @@ -112,7 +110,6 @@ - (void)parseOption:(NSString *)_name value:(id)value {
}
if (op == nil) {
@throw([NSException exceptionWithName:[NSString stringWithFormat:@"Invalid %@", _name] reason:[NSString stringWithFormat:@"Invalid %@ '%@'", _name, value] userInfo:nil]);
continue;
}
[innerOps addObject:op];
}
Expand Down
2 changes: 1 addition & 1 deletion Slate/Slate-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.slate.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
1 change: 0 additions & 1 deletion Slate/SwitchAppView.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
}

@property (assign) BOOL selected;
@property (assign) BOOL hidden;
@property (assign) BOOL quitting;
@property (assign) BOOL forceQuitting;
@property NSRunningApplication *app;
Expand Down
Loading