Source code for most of the plugins is here :
http://code.google.com/p/blacktree-elements-public/source
Feel free to have look around ;-).
Le 25 août 09 à 22:20, andreb a écrit :
Pay attention that building QS will update the copy under /Application
(using rsync) ;-).
Etienne.
Le 26 août 09 à 01:02, andreb a écrit :
>
> Yeah luckily I saw the Run Script build phase before I was building
> the QS application the first time.
>
> I am a bit skewed by the fact that it seems you have to specify the
> real QS version all over the place (I am still new to this codebase.
> Apologies if something I say is actually not true).
> There were hints of a VERSION in the build script phases, there is
> CFBundleVersion in Quicksilver-Info.plist and there is a header file
> QSDebug.h where VERSION is set again.
> (I mean the 38xx format number).
Yes, there are many leftovers from alcor's versioning system, which I
partially scrapped in favor of arbitrary version numbers (IIRC I'm
bumping them manually in Info.plist and in QSDebug.h). I tried using
agv (the Apple project versioning tool), but it's useless for projects
that contains more than one target, alas QS has plenty of those.
> This might fall under the category of being superflous as it isnt used
> much right now but wouldn't it be nice to just set the right number in
> the plist file and have a shell script with reads CFBundleVersion for
> all other instances. This could be easily done by a few lines like the
> following:
>
>
--snip--
>
>
> ... or is that what the bltrversion binary is already doing?
The bltrversion binary does something like this, yes.
>
> Anyway back to the "debugging a plugin" thing:
>
> I have the debugging working now. The trick in the plugin project was
> to specify a custom executable as the host which should run the plugin
> and set that custom executable to the /Applications/Quicksilver.app
> (provided rsync does succeed copying the newly built Quicksilver
> into /
> Applications). Then whenever you try to run or debug the qsplugin it
> kickstarts Quicksilver and loads the bundle hopefully with your
> breakpoints.
IIRC, Custom Executables are user-specific (this means that every
developer will have to setup it own, which is lame...). Personally I'm
not adding Custom Execs to plugins, since I usually have QS project
open alongside the plugin, I start debugging from there, since
breakpoints are globally shared, the debugger should stop on the
plugin breakpoints.
> Oh yeah, and as you said, don't forget to copy the Configuration
> directory form your Quicksilver project over to the Plugins
> repository. When I opened the Xcode project file for the Service Menu
> Module plugin the configuration folder was still in the project but
> red indicating it physically missing on the disk. It was actually good
> this way as I knew where I had to put the copied one.
Yes, readding the correct Configuration directory is the first thing
you'll have to do to "port" plugins. Then you should ensure that the
Project/Target Configurations are based on the correct .xcconfig files
(there's a small menu at the bottom-left corner that allows you to do
this. Then you should set the PRODUCT_NAME in the Target to something
valid, and the plugin should be built directly inside your QS copy
(then it'll be rsync-ed when you rebuild QS).
Note: Project-level config files are Debug.xcconfig/Release, and
Target-level are QSPlugIn_Debug.xcconfig/QSPlugIn_Release.xcconfig ;-).
> At first I had troubly with all my breakpoints in the plugin project
> turning yellow. The debugging session would ignore them and run right
> into the crash. And this while I already had "lazy loading of symbols"
> turned off in the Debugging preferences. The solution for this was to
> set the deployment target back from 10.5 to 10.4. Fritz Anderson
> writes in 'Xcode Unleashed 3':
> "Remember the rule: The SDK specifies the maximum features your code
> uses, and the deployment target specifies the minimum operating system
> your code needs."
I'm pretty sure you missed the "based on" step, which should have
taken care of all this stuff. You should do the thing I explained
above both at the project level and the target level.
> When I read this I set it back and that's when things started working.
> Well let's see if I can find something out. I liked QS so much I spend
> the better part of the last half year to learn Cocoa and Objective-C
> just to be able to take a look and try to understand it and maybe even
> help. Who knows.
>
> And again, thanks for the help!
No problem ;-).
(Quick note: I'm having a recurring problem when I start the debugger.
QS *almost* always crash the first time complaining about blah blah
0x4, and it will continue doing so if I restart debugging from Xcode.
I worked-around this by entering "run" (or "r" for short) in the gdb
console (this restart the gdb session).)
Etienne
[snip]
> Nevertheless, I hope you won't mind if I may ask a question or two if
> I cannot come to grips about what a particular class does. I'll keep
> it to a minimum I promise.
No problem, I actually had a few questions to ask when I started
hacking around too ;-).
>
> Right now, I am trying to find out where Icons get loaded/registered
> for custom AppleScript Actions (which are loaded from
> QSApplicationSupportSubPath(@"Actions/", NO)) since it appears that no
> icons will show up for those script files even if you have assigned
> custom icons from within the Finder.
>
> Say, is QSIconLoader responsible for all icon loading or do QSActions
> have their own icon determining code?
I'm pretty sure QSIconLoader is useless on Leopard. Most generic icon
display stuff goes to QuickLook from now on. I guess the particular
thing you're looking for might be around QSObject (Icon) category in
QSObject.m (related to everything that's not a file-system object).
There's also NSImage+QuickLook.m, which is responsible for, hem,
QuickLook previews ;-).
Etienne
Thanks,
> Personally, I think that Etienne and Andre and anyone else that
> continues to work on QS should be thanked profusely on behalf of all
> non-coders such as myself :)
Absolutely!
> And furthermore, I think Alcor should be kidnapped, locked in a room
> with a Mac, and made to bring everything up to date. ;)
Not the worst idea. :)
> The Google thingy isn't anywhere even close to QS in functionality,
> smarts, or that 'X' factor that we all love.
I'm keeping an eye on QSB, but so far it doesn't even look like it
will *eventually* replace Quicksilver.
The day I can use QSB to "take the URL of the current page in my
browser and IM it to Joe" (using OmniWeb and Adium, not just Safari
and iChat) and things like that, I'll *consider* using it. But I'd
mush rather a cleaned up Quicksilver.
--
Rob McBroom
<http://www.skurfer.com/>