Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
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 offline   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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Run Script with Administrative Privileges during PackageMaker Installation rebello95 Mac Programming 0 Nov 7, 2011 11:27 PM
Use backslash in Applescript running a Bash Shell Script rebello95 Mac Programming 12 Nov 3, 2011 01:56 PM
PackageMaker - postinstall script is not running greg.schumacher Mac Programming 1 Oct 26, 2010 08:12 PM
Useful script for Xcode - alloc and init idelovski Mac Programming 1 Feb 4, 2009 03:53 PM
Best Place to Store and Use Scripts ScKaSx Mac Programming 2 Oct 9, 2007 08:00 PM


All times are GMT -5. The time now is 05:57 PM.

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

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