Re: PackageMaker and AppleScript check
Re: PackageMaker and AppleScript check
- Subject: Re: PackageMaker and AppleScript check
- From: Iceberg-Dev <email@hidden>
- Date: Thu, 30 Apr 2009 12:00:13 +0200
On Apr 30, 2009, at 10:38 AM, Marco Bambini wrote:
Hello,
I am developing an installer using PackageMaker (10.4 target) ...
what I would like to do at startup is to check if a file exists and
then ask the user if he want to remove it? If yes the file will be
deleted, otherwise it will be retained... then the standard
installation process can continue.
I can use AppleScript and the script would be easy to write, but I
wonder how I can embed it into the installer.
Call your AppleScript script from the Installation Check JavaScript.
Don't forget to allow the use of external scripts.
<?xml version="1.0" encoding="UTF-8"?>
<installer-script authoringTool="Ivanhoe" authoringToolVersion="2.0"
authoringToolBuild="2B2" minSpecVersion="1.0">
<options allow-external-scripts="true"/>
<installation-check script="installation_check()"/>
[...]
<script>
function installation_check()
{
system.run(relative_path_to_your_script);
return true;
}
</script>
[...]
./ is the Resources folder of your distribution as far as I can tell.
_______________________________________________
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