Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: PackageMaker and AppleScript check
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PackageMaker and AppleScript check




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


References: 
 >PackageMaker and AppleScript check (From: Marco Bambini <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.