Re: PackageMaker v2 command line
site_archiver@lists.apple.com Delivered-To: Installer-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1237908368; bh=C4hRRIH40qpKKyPxOQcEMV+ca0U0bydJIFKSDGFQstc=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=R/taiL9TZz6+fYQTPfgdJP20VvKNb51GAFUiuOujsorilQxlvb0WElniY1bI921epCzbo7LH7li30BEgNZ1vnr+2csznxPtz8SXyQjcFqbKCHyPgVguN9nhiAqiVmGQQ/+kl3V+J5kVKl0osW4xF+JX5r02Zgg1NEm75PVcZd0Q= Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=ZKOaPudr75M8pmOum8wrHbhdmcRqJ5ghH/CTJoIpNZR+tczc05K5A0fKNbTSxoKl/oFKyDuGc9875DTm2MsJbz/HGEkaQYbkLNzAdI1LsGLIgDC6NPzUT+ePNt5zuKBsmxBqaS0hljCAUF4JB+KYiPpV3lpDL8WRrA0pI7nGxDE=; I found out how to use Relative paths with PackageMaker run from the command line so I thought I'd share my findings in case anyone else needs this. Let me begin by saying this has been tested only using PackageMaker v2.0 and on OS X 10.4 (Tiger). Some day I hope to test this on OS X 10.5 (Leopard) and with PackageMaker v3.0. I could find no way to run PackageMaker from the command line using a Project file (.pmproj extension) that was created with the GUI version of PM that used Relative paths. If you can use Absolute paths, you can use the command line I used in my original message. This message is concerned with using the command line version of PM and needing to use Relative paths. Here is the command line that finally worked for me: /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -build -f "./Distribution/Package_contents" -r "./Distribution/Install_resources" -p MyApplication.pkg -i Info.plist -d Description.plist You can use the Info.plist file created when you run the GUI version of PackageMaker. It doesn't need an IFPkgFlagInstalledSize entry. PackageMaker will calculate that and add it to the plist. I'm not sure what happens if you already have this entry in the Info.plist and it needs to change. I think it is safer to just remove it. The Description.plist must be there if you want your installer to display the name of your application in the installer dialogs and titles. You will need to have an IFPkgDescriptionTitle entry (a string) and an IFPkgDescriptionDescription entry (also a string). While the -d option is documented in the PackageMaker man page, I never saw a Description.plist being produced by the GUI version PackageMaker. Thus, I had no idea this was a requirement when using the command line PackageMaker. I never saw a Description.plist file in the Resources directory of the final package produced by PackageMaker (GUI or command line) either. The man page for PackageMaker says it will be placed there but I believe this is an error. Notice that the Package_contents and Install_resources paths are relative. In my case, when I run PackageMaker with a comand line, my working directory is at the same level as the Distribution directory which holds Package_contents and Install_resources. Your situation will probably be different. I hope this helps someone. Regards, Jim Dodd Onset Computer Corporation. ----- Original Message ----
From: Jim Dodd <bcbuilderboy@yahoo.com> To: installer-dev@lists.apple.com Sent: Sunday, March 22, 2009 4:49:11 PM Subject: PackageMaker v2 command line
We've always used PackageMaker as a GUI application to successfully build our installer using absolute paths to the package contents and resources. Now, we decided to try to make it possible to run from a bash script file and that has worked as well by using the .pmproj file created by the GUI. As long as we continue to use absolute paths.
Never being satisfied, we decided to try to make our whole project relocatable and switch to using relative paths to the product contents and resource folders. That works when run from the GUI but not when we use this new .pmproj file (with relatie paths) to run from the command line. Our command line is similar to this:
/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -build -proj OurProject.pmproj -p OurApplication.pkg -v
We get this error message:
"The package could not be created because of the following errors: No root specified for archive."
I tried specifying a path with the -f option (directory containing the contents of the package) but nothing I've tried there works (I think using the -proj option precludes using that option - but I'm not sure). We're using PackageMaker version 2.0 on Tiger (OS X 10.4). If I change the GUI project to use absolute paths and then use that project file (.pmproj) with the command line, it works. But we need to use relative paths.
I'm sorry I am having trouble searching the list archives to check for this. I know it has probably been covered before. Can anyone offer help into why this might happen and how we can fix it?
Thank you,
Jim Dodd Onset Computer Corporation
_______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jim Dodd