PackageMaker 3.0.1 and requirement script
PackageMaker 3.0.1 and requirement script
- Subject: PackageMaker 3.0.1 and requirement script
- From: Steven Meyer <email@hidden>
- Date: Mon, 3 Mar 2008 13:33:21 -0500
I am having difficulties running a shell script from the Requirements
of an installer distribution.
How do I add a shell script to a distribution package so that it will
be run in the requirements? This is packagemaker 3.0.1.
I'll describe my problems more specifically
I am selecting "script for target "in the requirements. My script is
exiting 0, but the check fails. Looking at "Distribution.dist" in raw
editing mode, I see a javascript routine defined.
function pm_volume_check() {
if(!(system.run('/Users/stevenmeyer/scripts/check_target.sh') ==
true)) {
my.result.title = 'Failure';
my.result.message = 'Cannot install to volume';
my.result.type = 'Fatal';
return false;
}
return true;
}
in the documentation system.run returns the exit code of the script,
so the statement "(system.run('/Users/stevenmeyer/scripts/
check_target.sh') == true)" is wrong. Exiting with 1, however gets a
passed requirement check.
That problem dealt with, I find another which stumps me. The absolute
path of the script is coded into the javascript.
system.run looks for a script in the the /content/Resources/ . I add
scripts to the Resources folder in raw editing mode but javascript
does not find them. If I knew the installers path while in
javascript, I could perhaps work around this by calling my script with
an absolute path. Looking in the documentation, I find nothing about
installer path while in javascript.
So,
How do I put my script in content/resources?
or
How can I find the installer path in javascript so that I can call
script placed elsewhere?
Or any other solution would be fine.
I am trying to discover if photoshop is on a volume, where it is and
what version. I can handle that pretty much from the shell. I do not
know how to do this from javascript.
thank you
Steven Meyer
Technology from the boondocks
_______________________________________________
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