• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Packages(.app) - open app folder script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Packages(.app) - open app folder script


  • Subject: Re: Packages(.app) - open app folder script
  • From: Stephen Kay <email@hidden>
  • Date: Sat, 25 Mar 2017 18:21:14 -0700
  • Thread-topic: Packages(.app) - open app folder script

On 3/4/17 10:30 AM, "Stephane Sudre" <email@hidden> wrote:

>- open the folder %2/.. using the current user
>
>  ->
>http://s.sudre.free.fr/Stuff/Installer/Installation_Scripts/InstallationSc
>ripts-FAQ003.html
>
>
>

That seems to be a typo %2 ?

So would this be written as:

/usr/bin/su $USER -c /usr/bin/open $2

Because it doesn't seem to work...

What is $2 exactly? The full path to the app bundle? I.e.
/Applications/My\ App.app

Thanks,
- Stephen


On Sat, Mar 4, 2017 at 2:33 AM, Stephen Kay <email@hidden> wrote:
>I'm replacing a MindVision VISE X installer with Packages...
>
>My (ancient) app is installed in a folder in the /Applications directory
>(I know, this is not the ideal way) but in any case, it was a simple task
>in VISE to specify that the app folder be opened after installation.
>
>I gather that with Packages you would do this via a Post-installation
>shell script on the application's package.
>
>I'm not very skilled with shell scripts, can any of you geniuses share how
>to find the folder (when you don't know for sure where it might be
>installed) and pass the result to the 'open' command?

This can be done by attaching a post-installation script to the bundle
of the application in the payload and using the  $2 parameter (which
is the location of the application).

What can be done in the script is:

- do nothing if the installation is not done via the UI:

  -> check the COMMAND_LINE_INSTALL en var.

- open the folder %2/.. using the current user

  ->
http://s.sudre.free.fr/Stuff/Installer/Installation_Scripts/InstallationScr
ipts-FAQ003.html

-if necessary, it might be possible to only do this on the first
installation but I don't remember whether the following solution works
as-is for bundle scripts:

http://s.sudre.free.fr/Software/Packages/Q&A_5.html

To attach the script to the app bundle:

http://s.sudre.free.fr/Software/documentation/Packages/en/Package_Payload.h
tml#5



 _______________________________________________
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


References: 
 >Packages(.app) - open app folder script (From: Stephen Kay <email@hidden>)
 >Re: Packages(.app) - open app folder script (From: Stephane Sudre <email@hidden>)

  • Prev by Date: Re: Packages - how to make an uninstaller?
  • Next by Date: Re: Packages - how to make an uninstaller?
  • Previous by thread: Re: Packages(.app) - open app folder script
  • Next by thread: How do you codesign a Packages .pkg?
  • Index(es):
    • Date
    • Thread