No appropriate update in download package error

Asked by Leland Scott

I've looked through all the possibly related questions/answers here, but haven't found one that helps with my problem, so…

My appcast works fine, and Sparkle dutifully downloads my update package… then chokes on the install step. What I'd like to do is grab the file Sparkle has downloaded and process it from there. However, I don't know where Sparkle has downloaded the file, and haven't been able to figure out how to influence its decision.

Sparkle is running in a helper application that's NOT in the bundle of any of the bundles that the installer will update. The installer updates packages and files in several locations on the user's system, depending on what's being updated. On Snow Leopard, the installer will update a SIMBL plugin as well as an InputManager bundle, and on Leopard just the InputManager bundle. In addition, the installer will update a preference pane in the /Library folder and the User's Guide PDF file in an Application Support folder. The helper application itself may also be updated, but not necessarily.

It's clear that if I want to do this, I need to use some of the delegate methods for SUUpdater, but I first need to find a handle to the download file and its path.

Can you help? (FYI, I've used the option of including HTML directly in the appcast for describing the version changes, and that works great!)

Question information

Language:
English Edit question
Status:
Solved
For:
Sparkle Edit question
Assignee:
No assignee Edit question
Solved by:
Leland Scott
Solved:
Last query:
Last reply:
Revision history for this message
Andy Matuschak (andymatuschak) said :
#1

Hm. Sounds like you might want to use an installer .pkg to do this. It should be able to do all the things you need.

Revision history for this message
Leland Scott (llscotts) said :
#2

Yes, I do have a package installer for the updates… that's what gets downloaded with the Sparkle appcast. The package contains the various components, the requirements checks, and a script to make the appropriate updates. What I want to do is launch that installer package after the download is complete. Sorry if I wasn't clear about this.

Revision history for this message
Andy Matuschak (andymatuschak) said :
#3

This should actually happen automatically. You should ship a .zip or something with your .pkg inside of it (named the same as your CFBundleName). Sparkle should launch the installer.

Revision history for this message
Leland Scott (llscotts) said :
#4

Thanks Andy! Naturally, my plist was missing the CFBundleName key. Now, the file downloads and Sparkle launches it as I'd hoped.

NOW… Any easy way to make the "Install and Relaunch" panel go away once my package launches? At the moment, it hangs around until the user closes the package installer window. Also, when my installer launches, it does so *behind* the Sparkle panel rather than in front of it as I'd like.

Revision history for this message
Andy Matuschak (andymatuschak) said :
#5

Hm. Unfortunately, the package UI flow hasn't been well developed. Would you mind filing an enhancement request for this? I guess ideally, the installer would signal the app when it's good to go. I wonder if it gives useful exit codes.

Revision history for this message
Leland Scott (llscotts) said :
#6

OK, thanks... I'll suggest an enhancement for this.
In the meantime, I guess I can add a script to my installer to check for that window... or I guess I could have it close the Sparkle-aware app, which presumably would close the window as well. My installer would also take care of relaunching it.

Cheers,
Leland