Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Mac > Xcode
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Xcode section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 28th, 2006, 03:01 PM
Registered User
Join Date: Apr 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default PakageMaker & External scripts

Hi - I am trying to launch an applescript at the end of a packagemaker installation. I have a postinstall shell script that uses "osascripts" to call to the applescript. Outside of the installer this works fine.

Once compiled, though, the script is never executed.

I know now that PackageMaker scripts must be shell or perl scripts. The documentation also says that external scripts can be called by the shell script, but I tried this and cannot get it to work.

All I want to do is have the installer run a simply applescript either before or after the installation completes.

I have read the documentation and know that:

1. Script should be perl or bash shell - I am using a shell script.
2. Resources directory should be created at the same hierarchical level as the installation directory to contain the scripts.
3. script names need to be preflight, postinstall, postupgrade, etc.
4. scripts need to have proper permissions so they can be executed.

Incidentally, my shell script works fine outside the installer, but the installer does not execute it for some reason.

Well, if anyone what reads this knows how to do this, I would really appreciate the answer!


  #2 (permalink)  
Old May 12th, 2006, 05:00 PM
Registered User
Join Date: Apr 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

Well - I solved the problem myself. Here is the answer, in case others are interested:

I used nano to create a file called postflight with no extension. I wrote my shell script inside the file and saved it. Before I was saving as postflight.sh, and that was the problem. PackageMaker will only recognize Unix executable files, (shell scripts), that are named properly, as stated above.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling external scripts from XSLT dextermagnific XSLT 2 June 25th, 2007 03:55 AM
Newbie: XSLT & Scripts kwilliams XSLT 13 August 5th, 2005 11:39 AM
Javascript && keeps turnig into && ayrton Pro VB.NET 2002/2003 3 June 27th, 2005 03:34 PM
Linux & KDE & C++ & QT & MYSQL & Kdevelop Munnnki Linux 0 January 2nd, 2005 05:41 PM
Restore & Delete Scripts Walden SQL Server 2000 1 June 16th, 2003 06:10 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.