Skip to content
This repository has been archived by the owner on Jul 18, 2019. It is now read-only.

Commit

Permalink
Merge branch 'release/EasySIMBL-1.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
norio-nomura committed Oct 26, 2013
2 parents 3f937f0 + 51dff80 commit 90999b8
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 29 deletions.
20 changes: 17 additions & 3 deletions EasySIMBL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
6C564477159E7C0800215467 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0440;
LastUpgradeCheck = 0500;
};
buildConfigurationList = 6C56447A159E7C0800215467 /* Build configuration list for PBXProject "EasySIMBL" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -318,8 +318,13 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
Expand All @@ -332,7 +337,9 @@
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
Expand All @@ -344,15 +351,22 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0440"
LastUpgradeVersion = "0500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion EasySIMBL/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ @implementation AppDelegate
#pragma mark User defaults

+ (void)initialize {
NSDictionary *initialValues = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInteger:2],@"SIMBLLogLevel", nil];
NSDictionary *initialValues = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInteger:2],SIMBLPrefKeyLogLevel, nil];
[[NSUserDefaults standardUserDefaults]registerDefaults:initialValues];
[[NSUserDefaultsController sharedUserDefaultsController] setInitialValues:initialValues];
}
Expand Down
16 changes: 9 additions & 7 deletions EasySIMBL/ESPluginListManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ - (NSMutableArray*)scanPluginsInDirectory:(NSString*)dir{
NSString* name=[fileName stringByDeletingPathExtension];
//check Info.plist
NSBundle* bundle = [NSBundle bundleWithPath:path];
NSDictionary* info=[bundle infoDictionary];
NSDictionary* info=[bundle SIMBL_infoDictionary];
NSString* bundleIdentifier=[bundle bundleIdentifier];
if(![bundleIdentifier length])bundleIdentifier=@"(null)";

Expand Down Expand Up @@ -209,27 +209,29 @@ -(NSMenu*)menuForTableView:(NSTableView*)tableView row:(NSInteger)row


[menu addItem:[NSMenuItem separatorItem]];
item = [menu addItemWithTitle:@"SIMBLTargetApplications:" action:nil keyEquivalent:@""];
[menu addItemWithTitle:@"SIMBLTargetApplications:" action:nil keyEquivalent:@""];
NSDictionary* bundleInfo = [pluginInfo objectForKey:@"bundleInfo"];
NSArray* targetApps = [bundleInfo objectForKey:@"SIMBLTargetApplications"];
NSArray* targetApps = [bundleInfo objectForKey:SIMBLTargetApplications];
for (NSDictionary* targetApp in targetApps) {
NSNumber* number;
NSString* appID = [targetApp objectForKey:@"BundleIdentifier"];
NSString* appID = [targetApp objectForKey:SIMBLBundleIdentifier];
NSInteger minVer = 0;
NSInteger maxVer = 0;
number=[targetApp objectForKey:@"MinBundleVersion"];
number=[targetApp objectForKey:SIMBLMinBundleVersion];
if (number) {
minVer=[number integerValue];
}
number = [targetApp objectForKey:@"MaxBundleVersion"];
number = [targetApp objectForKey:SIMBLMaxBundleVersion];
if (number) {
maxVer=[number integerValue];
}

item = [menu addItemWithTitle:appID action:nil keyEquivalent:@""];
[item setIndentationLevel:1];
if (minVer || maxVer) {
NSString* verStr=[NSString stringWithFormat:@"version:%li - %li", minVer, maxVer];
NSString* minVerStr = minVer ? [NSString stringWithFormat:@"%li", minVer] : @"";
NSString* maxVerStr = maxVer ? [NSString stringWithFormat:@"%li", maxVer] : @"";
NSString* verStr=[NSString stringWithFormat:@"version:%@ - %@", minVerStr, maxVerStr];
item = [menu addItemWithTitle:verStr action:nil keyEquivalent:@""];
[item setIndentationLevel:2];
}
Expand Down
4 changes: 2 additions & 2 deletions EasySIMBL/EasySIMBL-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4</string>
<string>1.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>6</string>
<string>7</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ EasySIMBL![EasySIMBL](https://github.com/norio-nomura/EasySIMBL/raw/master/icon.
====================================
Changes from [original SIMBL](http://www.culater.net/software/SIMBL/SIMBL.php)
---------------------------
- **OS X 10.7, 10.8**
- **OS X 10.7, 10.8, 10.9**
- **Reads plugins from `~/Library/Application Support/SIMBL/Plugins` only.**
- **Never reads plugins from `/Library/Application Support/SIMBL/Plugins`.**
- Support sandboxed application.
Expand All @@ -13,7 +13,7 @@ Changes from [original SIMBL](http://www.culater.net/software/SIMBL/SIMBL.php)

How to install
--------------
1. Download [EasySIMBL-1.4.zip](http://github.com/downloads/norio-nomura/EasySIMBL/EasySIMBL-1.4.zip) (2012/11/11 updated)
1. Download [EasySIMBL-1.5.zip](http://github.com/norio-nomura/EasySIMBL/releases/download/EasySIMBL-1.5/EasySIMBL-1.5.zip) (2013/10/26 updated)
2. Extract and move `EasySIMBL.app` into `/Applications` or `~/Applications`.
3. Launch `EasySIMBL.app` and make check `Use SIMBL`, then quit `EasySIMBL.app`.

Expand All @@ -28,6 +28,12 @@ How to uninstall
1. Launch `EasySIMBL.app` then clear check `Use SIMBL`, then quit `EasySIMBL.app`.
2. Move `EasySIMBL.app` into Trash.

Tested combinations of OS X and applications
--------------------------------------------
- OS X 10.7.5 (11G63) : [Echofon for Mac 1.8.0](https://itunes.apple.com/jp/app/echofon-for-twitter/id403830270?mt=12) & [SimblPluginsForEchofon-1.4](https://github.com/norio-nomura/SimblPluginsForEchofon)
- OS X 10.8.5 (12F45) : Safari 6.1 & [SafariStand 6.0.200](https://github.com/hetima/SafariStand), [Echofon for Mac 1.8.0](https://itunes.apple.com/jp/app/echofon-for-twitter/id403830270?mt=12) & [SimblPluginsForEchofon-1.4](https://github.com/norio-nomura/SimblPluginsForEchofon)
- OS X 10.9 (13A603) : Safari 7.0 & [SafariStand 6.0.200](https://github.com/hetima/SafariStand), [Echofon for Mac 1.8.0](https://itunes.apple.com/jp/app/echofon-for-twitter/id403830270?mt=12) & [SimblPluginsForEchofon-1.4](https://github.com/norio-nomura/SimblPluginsForEchofon)

License
-------
Copyright 2003-2009, Mike Solomon <mas63@cornell.edu>
Expand Down
7 changes: 3 additions & 4 deletions SIMBL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 0500;
};
buildConfigurationList = E0E8F445085F4D0400DCD56F /* Build configuration list for PBXProject "SIMBL" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -357,7 +358,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand All @@ -369,7 +369,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_VERSION = 0.10.5;
PRODUCT_VERSION = 0.10.6;
SDKROOT = macosx;
};
name = Debug;
Expand All @@ -378,7 +378,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = src/SIMBL_Prefix.pch;
Expand All @@ -389,7 +388,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_VERSION = 0.10.5;
PRODUCT_VERSION = 0.10.6;
SDKROOT = macosx;
};
name = Release;
Expand Down
4 changes: 2 additions & 2 deletions SIMBL.xcodeproj/xcshareddata/xcschemes/SIMBL Agent.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0440"
LastUpgradeVersion = "0500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -42,7 +42,7 @@
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
launchStyle = "1"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
2 changes: 1 addition & 1 deletion SIMBL.xcodeproj/xcshareddata/xcschemes/SIMBL.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0440"
LastUpgradeVersion = "0500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions src/SIMBL.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

@interface NSBundle (SIMBLCocoaExtensions)

- (NSDictionary*) SIMBL_infoDictionary;
- (id) SIMBL_objectForInfoDictionaryKey: (NSString*)key;
- (NSString*) _dt_info;
- (NSString*) _dt_version;
- (NSString*) _dt_bundleVersion;
Expand Down
37 changes: 31 additions & 6 deletions src/SIMBL.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,49 @@

@implementation NSBundle (SIMBLCocoaExtensions)

/*!
* Non cached version of -infoDictionary
*
* @return A dictionary, constructed from the bundle's Info.plist file, that contains information about the receiver.
* If the bundle does not contain an Info.plist file, a empty dictionary is returned.
*/
- (NSDictionary*) SIMBL_infoDictionary;
{
NSString* infoPath = [[self bundlePath]stringByAppendingPathComponent:@"/Contents/Info.plist"];
NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfFile:infoPath];
return dictionary;
}

/*!
* Non cached and non localized version of -objectForInfoDictionaryKey: key
*
* @param key A key in the receiver's property list.
*
* @return The value associated with key in the receiver's property list (Info.plist).
*/
- (id) SIMBL_objectForInfoDictionaryKey: (NSString*)key
{
return [[self SIMBL_infoDictionary]objectForKey:key];
}

- (NSString*) _dt_info
{
return [self objectForInfoDictionaryKey: @"CFBundleGetInfoString"];
return [self SIMBL_objectForInfoDictionaryKey: @"CFBundleGetInfoString"];
}

- (NSString*) _dt_version
{
return [self objectForInfoDictionaryKey: @"CFBundleShortVersionString"];
return [self SIMBL_objectForInfoDictionaryKey: @"CFBundleShortVersionString"];
}

- (NSString*) _dt_bundleVersion
{
return [self objectForInfoDictionaryKey: (NSString*)kCFBundleVersionKey];
return [self SIMBL_objectForInfoDictionaryKey: (NSString*)kCFBundleVersionKey];
}

- (NSString*) _dt_name
{
return [self objectForInfoDictionaryKey:(NSString*)kCFBundleNameKey];
return [self SIMBL_objectForInfoDictionaryKey:(NSString*)kCFBundleNameKey];
}

@end
Expand Down Expand Up @@ -175,12 +200,12 @@ + (BOOL) shouldApplication:(NSBundle*)_appBundle loadBundleAtPath:(NSString*)_bu
}

// this is the new way of specifying when to load a bundle
NSArray* targetApplications = [pluginBundle objectForInfoDictionaryKey:SIMBLTargetApplications];
NSArray* targetApplications = [pluginBundle SIMBL_objectForInfoDictionaryKey:SIMBLTargetApplications];
if (targetApplications)
return [self shouldApplication:_appBundle loadBundle:pluginBundle withTargetApplications:targetApplications];

// fall back to the old method for older plugins - we should probably throw a depreaction warning
NSArray* applicationIdentifiers = [pluginBundle objectForInfoDictionaryKey:SIMBLApplicationIdentifier];
NSArray* applicationIdentifiers = [pluginBundle SIMBL_objectForInfoDictionaryKey:SIMBLApplicationIdentifier];
if (applicationIdentifiers)
return [self shouldApplication:_appBundle loadBundle:pluginBundle withApplicationIdentifiers:applicationIdentifiers];

Expand Down

0 comments on commit 90999b8

Please sign in to comment.