Re: Postinstall script behaves differently than if launching fromTerminal
Re: Postinstall script behaves differently than if launching fromTerminal
- Subject: Re: Postinstall script behaves differently than if launching fromTerminal
- From: Luke Bellandi <email@hidden>
- Date: Mon, 3 Nov 2008 08:44:11 -0800
- Acceptlanguage: en-US
- Thread-topic: Postinstall script behaves differently than if launching fromTerminal
Hi Matt,
You should be able to launch an NSTask in your installer plugin. Code is code, right? So why wouldn't you be able to?
If your package requires root-user authentication, then your post-install script will run as root user. This confusion comes up a lot in working with preflight and other scripts in installer packages.
To run it as the logged-in user (which is probably what you want and will fix this problem), prepend the following to your Adobe AIR install command line in your script:
"sudo -u $USER "
Best,
Luke
On 11/2/08 6:24 AM, "Matt Brewer" <email@hidden> wrote:
I'm writing an installer for my company which also redistributes the
Adobe AIR Runtime (licensing taken care of). There is a silent
install option which should run this in the background and make it a
seamless experience for the user.
#!/bin/sh
/Applications/Adobe\ AIR\ Installer.app/Contents/MacOS/Adobe\ AIR\
Installer -silent
exit 0
This works just fine when launching from the Terminal. However, when
used as a postinstall script, the Adobe installer complains that AIR
isn't installed. Just wondering if anyone had any thoughts why it
would behave differently.
I also wrote an Installer plugin in Xcode, I take it that I can't
launch a NSTask there, just wanted to clarify....
Matt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden