I build my pkg with productbuild and pkgbuild.

My root path looks like this: ROOT > Applications/Scripts/Library/private/

In Applications/ is my .app , which works. However in Library for example is another folder "Desktop Pictures" and there is a background.png. I would like to have that exact path with the .png on the device that i install this package, so i can use it later for automatically set the background.

Not working tho

This is how the pkg gets build:

pkgbuild --root "ROOT" \
--identifier "${IDENTIFIER}" \
--version "${VERSION}" \
--install-location "/" \
--sign "${IDENTITY}" \
--scripts ROOT/Scripts \

productbuild \
--distribution distribution.dist \
--scripts "ROOT/Scripts" \
--sign "${IDENTITY}" \
--package-path "${PACKAGE_NAME}_before.pkg" \

Edit: Although the command

pkgutil --payload-files mypackage.pkg

Tells me for example:

./Library/Desktop Pictures
./Library/Desktop Pictures/background.png

Edit: I basically found out, that manually installing the pkg and typing in my password, its working.

So let me rephrase my question: How is it possible to install the files to my mac without having access to password input, since its automated?

You must log in to answer this question.

Browse other questions tagged .