Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create .pkg installer with bare executable

Tags:

macos

pkgbuild

I can use pkgbuild and productbuild to create decent installers for an app. However, I need to create one that installs a bare executable and launch daemon, and I've hit a wall.

The crux of the problem seems to be the RootRelativeBundlePath item in the component list for pkgbuild. Since there's no bundle being installed, no path will work there, but I can't omit RootRelativeBundlePath either. So I can't generate the component package.

What do I do?

like image 544
T. Reed Avatar asked Oct 15 '25 15:10

T. Reed


1 Answers

Found an answer to my own question, using the following command to build the component package, skipping the component list plist entirely:

pkgbuild --root software_root --install-location "/" --scripts scripts/ --identifier 'com.blah.pkg.blah' --version '1.0.0' installer.pkg

like image 154
T. Reed Avatar answered Oct 18 '25 13:10

T. Reed