• 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: system.run in script leads to "Path for embedded script ... not available"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: system.run in script leads to "Path for embedded script ... not available"


  • Subject: Re: system.run in script leads to "Path for embedded script ... not available"
  • From: Paul Grathwohl <email@hidden>
  • Date: Tue, 10 Jul 2012 17:12:50 +0200

Hello,

afaik productbuild does not support to include a "Scripts" directory. Instead we use pkgutil --flatten to pack a previously prepared folder structure, that can contain a "Scripts" directory.
One possible workflow for you could be:
- use productbuild to build the flat distribution pkg without the scripts
- use pkgutil --expand
- add the Scripts directory in the expanded pkg
- use pkgutil --flatten to pack the directory in a pkg again

btw: all this applies also for installer plugins, that you want to add your flat distribution pkg.

Yours,
Paul

installer-dev-bounces+p.grathwohl=email@hidden wrote on 10.07.2012 16:45:11:

> From: Jaroslav Šnajdr <email@hidden>

> To: email@hidden
> Date: 10.07.2012 16:52
> Subject: Re: system.run in script leads to "Path for embedded script
> ... not available"

> Sent by: installer-dev-bounces+p.grathwohl=email@hidden
>
> Hello Stephane,

>
> I'm fine with supporting only 10.6 and later.

>
> productbuild doesn't have any option how to reference the Scripts
> directory - it has only the --resources option. Putting the Scripts
> directory on the same level as Resources doesn't help.

>
> So it seems that productbuild doesn't support the external scripts
> at all. Or does it? Is there any other tool I could use? I need
> something that works from command line and can be a part of a daily
> build scripts.

>
> Jarda

>
> From: Stephane Sudre [
mailto:email@hidden]
> To: email@hidden
> Sent: Tue, 10 Jul 2012 16:25:59 +0100
> Subject: Re: system.run in script leads to "Path for embedded script
> ... not available"
>
> AFAIK, scripts embedded in a flat distribution are only supported on
> Mac OS X 10.6 and later.
>
> So if your OS requirements are Mac OS X 10.6 or later, it is supported.
>
> The scripts should end up in a Scripts archive at the same level as
> the Resources folder in the .pkg archive.
>
> Distribution
> Resources
> xx.lproj
> Scripts
> mypackage1.pkg
>
> So Resources may not be the folder where the script should be put for
> productbuild (I can't be sure, I don't use this tool).
>
> On Tue, Jul 10, 2012 at 3:12 PM, Jaroslav Šnajdr <email@hidden> wrote:
> > Hello everyone,
> >
> > I'm building a product installer using the productbuild utility:
> >
> > productbuild --distribution ./distribution.dist --resources ./Resources [...
> > other parameters ...]
> >
> > The distribution.dist contains an <installation-check> tag that references a
> > _javascript_ function that attempts to run an external script:
> >
> > system.run('check_something.sh');
> >
> > The <options allow-external-scripts="true"/> tag is also there.
> >
> > The check_something.sh script is located in the Resources directory - the
> > one supplied to the --resources command line option.
> > However, the resulting package doesn't contain these embedded scripts and
> > the install.log displays an error:
> >
> > IFJS: Path for embedded script check_something.sh not available
> >
> > What am I doing wrong? Am I putting the external scripts to the wrong
> > directory? Do I need to do something to have them included in the package?
> > It seems that the files in Resources/ directory that are directly referenced
> > from the distribution.dist (background, welcome, license) are included in
> > the package, but other files are not.
> >
> > I'm using Mac OS X 10.7 with XCode 4.1. The PackageMaker version is 3.0.5. I
> > don't know if the productbuild executable has any version info at all.
>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Steinberg Media Technologies GmbH, Frankenstrasse 18b, D-20097 Hamburg, Germany
Phone: +49 (40) 21035-0 | Fax: +49 (40) 21035-300 | www.steinberg.net
Managing Director: Andreas Stelling, Kazunori Kobayashi
Registration Court: Hamburg HRB 86534
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

 _______________________________________________
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: 
 >Re: system.run in script leads to "Path for embedded script ... not available" (From: Stephane Sudre <email@hidden>)
 >Re: system.run in script leads to "Path for embedded script ... not available" (From: Jaroslav Šnajdr <email@hidden>)

  • Prev by Date: Re: system.run in script leads to "Path for embedded script ... not available"
  • Next by Date: Flat Installer dies on Leopard 10.5
  • Previous by thread: Re: system.run in script leads to "Path for embedded script ... not available"
  • Next by thread: Flat Installer dies on Leopard 10.5
  • Index(es):
    • Date
    • Thread