-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
557f8d1
commit 134d0a4
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# FinderMenu | ||
|
||
Adding items into context menu in Mac OS X Finder | ||
|
||
## Description | ||
|
||
Finder's method `buildContextMenu:forContext:browserController:maxItems:addServices:` of class `TContextMenu` is responsible for menu creation. So `mach_inject` is used to inject code into Finder process and `mach_override` to override code inside the process. | ||
|
||
The application consists of the following components: | ||
|
||
* *FinderMenu* - the injector app, that loads bundle into Finder | ||
* *FinderExt.bundle* - injectee bundle, that overrides code inside Finder process | ||
* *mach_inject_bundle.framework* (and *mach_inject_bundle_stub.bundle* which is part of this framework) - mach inject bundle framework, which used by *FinderMenu* | ||
|
||
Application has only been tested on the latest version of Mac OS X 10.8.2. I will be grateful if you test it in earlier versions. Theoretically it should work on OS X versions >= 10.6 (in 10.6 Finder has been rewritten from Carbon to Cocoa and this app is Cocoa-specific). | ||
|
||
## Building & running | ||
|
||
Application is required `procmod` group permssion, so you can not just run it in Xcode. To build it in Terminal you can use `xcodebuild` tool. After building you can just run it with `sudo`, or change executable group to `procmod` and `setgid` bit on it. | ||
|
||
## TODO | ||
|
||
For now the application simply adds items to the context menu and there is no way to determine which item was selected. The next step is to figure out how to do it. |