Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

While installing package PackageKit relocate application bundle. How to disable this behaviour?

My program erlier distibuted as a zipped bundle, but now I planing add daemon that must start after installation. So I decide create package while installing that will run Post-Install script. First, I create a simple package like this:

 productbuil --component MyAppName.app /Applications --sign "common name of my certificate" MyAppName.pkg

and trying to install it.

Installation wase successful but after I not find the app bundle in /Application directory. While inverstigatin this poltergaste I found in /var/log/install.log this line:

installd[1954]: PackageKit: Applications/MyAppName.app relocated to Users/myUserName/PAServer/scratch-dir/UserName1.Kh-profileName/MyAppName.app

After that I find this answer Making OS X Installer Packages like a Pro - Xcode Developer ID ready pkg and try to execute command lines finded in it.

pkgbuild --analyze --root ./MyProgram.app MyProgram.app.plist
pkgbuild: Inferring bundle components from contents of ./MyProgram.app pkgbuild: Writing new component property list to MyProgram.app1.plist

Where I planing to edit plist file but first I was try to simple build package with default params.

pkgbuild --root ./MyProgram.app --component-plist ./MyProgram.app.plist MyProgram.pkg pkgbuild: Reading components from ./MyProgram.app.plist pkgbuild: error: No package identifier specified and not exactly one component to derive it from.

What is wrong?

-----------------------------

I also trying to install old version of XCode aux tools to trying use PackageMaker, but can't find documentation (I needed use PackageMaker from command line) to It even if I installing XCode 4.5. I can't build packages manualy from GUI-tools, because into end-user bundle placed unique resource library, and manual buildin is too expensive. So i search for automatic building methods.

like image 790
Andrey.Kh Avatar asked Feb 24 '15 11:02

Andrey.Kh


1 Answers

You're missing the --identifier parameter. Try:

pkgbuild --identifier MyIdentifier --root ./MyProgram.app \
--component-plist ./MyProgram.app.plist MyProgram.pkg 

Where --identifier MyIdentifier is the unique name that can be registered with the system.

P.S. You may choose to follow the suffix.domain.project naming convention via:

pkgbuild --identifier com.mydomain.MyIdentifier --root ./MyProgram.app \
--component-plist ./MyProgram.app.plist MyProgram.pkg 

Where --identifier com.mydomain.MyIdentifier is the unique name that can be registered with the system.

like image 74
tresf Avatar answered Oct 24 '22 23:10

tresf