Hi Chris,
Thanks for your response; apologies, I
should have CCed the list with your colleague Bill’s response as below.
Strangely enough I don’t recall reading about installer plug-ins from the
Installer literature I read. It sounds like a more elegant approach to many of
the functionality asked of me for my work and worthy of further investigation
on my part.
For this particular issue I’ve been asked
to put the fix on the backburner for now and move on to higher priority work
but I think when I get around to it I’ll check out plugins.
Thank you all for your response, much
appreciated.
Thank you kindly and have a great day,
Ben Lam
Software Developer, Build/Install
SMART Technologies Inc.
email/MSN: email@hidden | tel: 403.802.3328
Men are respectable only as they respect.
-Ralph Waldo Emerson
>>>
I am not 100% sure what the best way to do
it is. I guess I would try having the app launch as root, and have it launch
another app as the $USER to do the user interaction.
Or you can launch the UI as the user, and
pipe its output to a helper into a faceless helper app running as root.
I haven't done this, yet, so I don't have
practical examples.
On May 9, 2006, at 10:17 AM, Benjamin Lam
wrote:
> Ah, that explains everything.
>
> Having the luck I do, I do need
privileges of root and the language
> preference.
>
> You mentioned 'you should probably
modify the cocoa app', in what way
> do you mean for me to modify the
cocoa app? Do you have any function
> name hints?
>
> Thank you kindly and have a great
day, Ben Lam Software Developer,
> Build/Install SMART Technologies Inc.
>
> email/MSN: email@hidden | tel:
403.802.3328
>
> Men are respectable only as they
respect.
> -Ralph Waldo Emerson
>> -----Original Message-----
>> From: Bill Coderre
[mailto:email@hidden]
>> Sent: Tuesday, May 09, 2006 10:44
AM
>> To: Benjamin Lam
>> Subject: Re: cocoa app launched
in postflight doesn't launch in the
> right
>> language
>>
>>
>> On May 9, 2006, at 8:46 AM,
Benjamin Lam wrote:
>>> In my postflight (bash)
script, I run a Cocoa application
>>> (postflight.app) in the
following way:
>>>
>>>
"$1/Contents/Resources/postflight.app/Contents/MacOS/postflight"
>>> "$1"
"$OverRide2" "$3" "$4"
>>>
>>> I execute the binary inside
the bundle directly as it seems to me
>>> this is how to pass in
arguments, and also have it completely run
>>> (block) before continuing the
postflight script.
>>>
>>> Now the funny thing is that
whenever I run the install, it always
>>> comes up in English. In fact
the cocoa application has French &
>>> German as well, and when I
launch it outside the installation
>>> sequence (postflight), it
comes up in the right language as
> expected.
>>>
>>> How can I run the cocoa app
in postflight so it will come up in the
>>> right language? Many thanks
in advance.
>> Remember that when your preflight
and postflight scripts are running,
>> they are probably running as root
(UID 0).
>>
>> When this is the case, you get
the language preferred by root, not
>> the language preferred by the
user. You can find the user stored as
>> the environment variable USER, so
you need to SU to that user before
>> executing the cocoa program.
>>
>> My bash scripting is a little
rusty, but it's something like this:
>> /usr/bin/su -c $USER
"$1/Contents/Resources/postflight.app/Contents/
>> MacOS/postflight"
"$1" "$OverRide2" "$3" "$4"
>>
>> Note that when you do, your
postflight.app will not have the
>> privileges of root. If you need
both the privileges and the language
>> preferences, you should probably
modify the cocoa app.
From: Christopher Ryan
[mailto:email@hidden]
Sent: Tuesday, May 09, 2006 8:20
PM
To: Benjamin Lam
Cc: email@hidden
Subject: Re: cocoa app launched in
postflight doesn't launch in the right language
I assume the package you are running is admin or root auth, is that
correct? It is probably running as the root user and thus has the
language pref from the root user rather then the currently logged in
user. If a user installs the OS in another language the system (root) and
all new users will be that language.
What are you trying to do in your cocoa app? Could it be better
done as an Installer Plugin? Does it need authentication? Can the
postflight be run from a non admin/root pkg.
Greetings,
I have a
weird problem I hope you can help with.
In my
postflight (bash) script, I run a Cocoa
application (postflight.app) in the following way:
"$1/Contents/Resources/postflight.app/Contents/MacOS/postflight"
"$1" "$OverRide2" "$3" "$4"
I execute
the binary inside the bundle directly as it seems to me this is how to pass in
arguments, and also have it completely run (block) before continuing the
postflight script.
Now the
funny thing is that whenever I run the install, it always comes up in English.
In fact the cocoa application has French & German as well, and when I
launch it outside the installation sequence (postflight), it comes up in the
right language as expected.
How can I
run the cocoa app in postflight so it will come up in the right language? Many
thanks in advance.
Thank you
kindly and have a great day,
Ben Lam
Software
Developer, Build/Install
SMART
Technologies Inc.
email/MSN: email@hidden | tel: 403.802.3328
Men are
respectable only as they respect.
-Ralph Waldo
Emerson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Help/Unsubscribe/Update your Subscription: