site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=NBA9wFe50haDYRw8k7BRxwmnycT+XpXfjz+8+K3ttsU=; b=QQavtA5ywsZ1XAilOn8aeUGVCIIDZgB09273rBTyJuCItBJ0N59PDXwG/o24l+FghB VCsuD/l1yPtriCz6FbVN9aw7ZzFjD3B4ccuor51gHzSMMYHAqnyH8tv9Fk5JpofBfCxd dlPASATqhzPjMRRNLdkNt59muit3oIQMNm/+o= I'n not saying the idea I'm suggesting is good but it would probably solve your issue: 1. Add a Cocoa launchd agent to your solution with its only purpose in life being to open the application, wait a bit and quit. And the launch of the agent is triggered by a modification of a file at a specific location. 2. During the update process, touch the file at the specific location. On Tue, Jan 17, 2012 at 11:32 PM, Rakesh Singhal <rakesh.singhal@gmail.com> wrote:
Hi Jens,
Thank you very much.
I have an app and a daemon which are installed on system using my installer. In postinstall script, it runs command "open /Applications/MyApp.app" and it works. If this app is already installed and I install new version, it upgrades smoothly. The daemon (client) is keep polling on server for an updated version. If it finds then it downloads the dmg file, mounts it and spawns a new process to run the installer. In preupgrade script, it kills both processes and remove plist of daemon. It works properly with 10.5 and 10.6 but gives error on 10.7. The error is "./postinstall: LSOpenURLsWithRole() failed with error -10810 for the file /Applications/MyApp.app".
com.apple.launchd System: This API can only be used by a process running within an Aqua session. open spawn_via_launchd() failed, errno=5 label=..... path=/Applications/MyApp.app/ Contents/MacOS/MyApp flags=0
I hope, you get an idea that what I am trying to do.
Regards, rksinghal
On Wed, Jan 18, 2012 at 11:49 AM, Jens Alfke <jens@mooseyard.com> wrote:
On Jan 17, 2012, at 7:55 PM, Rakesh Singhal wrote:
Thanks. Yes, its happening due to launching of GUI from daemon. But I can not use per-user agent process. I am trying to get some workaround.
It’s a security/stability restriction in the OS: you can’t make changes to a user session from outside the session. From that perspective, I’m not sure why I would want a daemon outside my login session updating my apps — that’s something I’d like to have control over. Most apps use something like Sparkle, that checks for an update when the app is launched. By comparison, I really dislike the system some Google apps use, where it checks for updates and nags me to install them even if I’m not using the app at all.
Maybe if you provide more detail about how the whole update system is supposed to work, we can suggest some sort of workaround.
—Jens
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/dev.iceberg%40gmail.com
This email sent to dev.iceberg@gmail.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com