Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 13, 2010, 05:37 AM   #1
thinkingwind
macrumors newbie
 
Join Date: Jul 2010
PackageMaker how-to use scripts

i am new cocoa coder.
Use packageMaker, don't understand howto use scritps.
i test it, drag a png to package

bash :
Code:
#!/usr/bin/env bash
touch -c "$2"
echo " postinstall script to touch $2" 
exit 0
i bulid package and run it, it Install failed.

Code:
Jul 13 17:40:10 bogon Installer[1018]: 		test.pkg#test.pkg : com.test.test.test.pkg : 1.0
Jul 13 17:40:10 bogon Installer[1018]: ================================================================================
Jul 13 17:40:10 bogon Installer[1018]: It took 0.00 seconds to summarize the package selections.
Jul 13 17:40:10 bogon Installer[1018]: -[IFDInstallController(Private) _buildInstallPlan]: location = file://localhost
Jul 13 17:40:10 bogon Installer[1018]: -[IFDInstallController(Private) _buildInstallPlan]: file://localhost/Users/thinking/Desktop/test.pkg#test.pkg
Jul 13 17:40:10 bogon Installer[1018]: Will use PK session
Jul 13 17:40:10 bogon Installer[1018]: Starting installation:
Jul 13 17:40:10 bogon Installer[1018]: Configuring volume "Macintosh HD"
Jul 13 17:40:10 bogon Installer[1018]: Preparing disk for local booted install.
Jul 13 17:40:10 bogon Installer[1018]: Free space on "Macintosh HD": 74.27 GB (74274979840 bytes).
Jul 13 17:40:10 bogon Installer[1018]: Create temporary directory "/var/folders/aJ/aJWeuxOZG483GhHxKfBr5k+++TI/-Tmp-//Install.101881H2zE"
Jul 13 17:40:10 bogon Installer[1018]: IFPKInstallElement (1 packages)
Jul 13 17:40:10 bogon installd[1026]: PackageKit: ----- Begin install -----
Jul 13 17:40:10 bogon installd[1026]: PackageKit: request=PKInstallRequest <1 packages, destination=/>
Jul 13 17:40:10 bogon installd[1026]: PackageKit: packages=(\n    "PKLeopardPackage <file://localhost/Users/thinking/Desktop/test.pkg#test.pkg>"\n)
Jul 13 17:40:10 bogon installd[1026]: PackageKit: Extracting /Users/thinking/Desktop/test.pkg (destination=/var/folders/zz/zzzivhrRnAmviuee+++++++++++/-Tmp-/PKInstallSandbox-tmp/Root/Applications/test.png, uid=0)
Jul 13 17:40:11 bogon installd[1026]: PackageKit: Executing script "./preinstall" in /private/tmp/PKInstallSandbox.hUbNjr/Scripts/com.test.test.test.pkg.qH2RUZ
Jul 13 17:40:11 bogon installd[1026]: PackageKit: Install Failed: PKG: pre-install scripts for "com.test.test.test.pkg"\nError Domain=PKInstallErrorDomain Code=112 UserInfo=0x100228380 "An error occurred while running scripts from the package “test.pkg”." {\n    NSFilePath = "./preinstall";\n    NSLocalizedDescription = "An error occurred while running scripts from the package \U201ctest.pkg\U201d.";\n    NSURL = "#test.pkg -- file://localhost/Users/thinking/Desktop/test.pkg";\n    PKInstallPackageIdentifier = "com.test.test.test.pkg";\n}
Jul 13 17:40:11 bogon Installer[1018]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 UserInfo=0x1001a8d80 "An error occurred while running scripts from the package “test.pkg”."
Jul 13 17:40:12 bogon Installer[1018]: Install failed: 
Jul 13 17:40:12 bogon Installer[1018]: IFDInstallController 160DD0 state = 7
Jul 13 17:40:12 bogon Installer[1018]: Displaying 'Install Failed' UI.
Jul 13 17:40:12 bogon Installer[1018]: 'Install Failed' UI displayed message:。'.
thinkingwind is offline   0 Reply With Quote
Old Jul 13, 2010, 08:53 AM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
Your script says it's a postinstall script.

Your error message says it's failing on the preinstall script.

Post the preinstall script.
chown33 is online now   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
PackageMaker error tcpms Mac Applications and Mac App Store 0 Feb 16, 2014 08:05 PM
Need help on PackageMaker knb Mac Programming 0 Jun 9, 2013 12:03 AM
PackageMaker knb OS X 4 Jun 3, 2013 08:30 AM
Issue with Packagemaker Installer on OS 10.8 arunsm OS X 10.8 Mountain Lion 0 Jul 10, 2012 07:04 AM

Forum Jump

All times are GMT -5. The time now is 07:40 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC