Skip to main content
Solved

How to create .pkg installers from Drag-and-drop installers?

  • February 12, 2018
  • 13 replies
  • 62 views

Forum|alt.badge.img+5

So, what is the best way of creating a pkg from the installers that are just drag and drop but dont contain actual pkg files?

Edit

I am asking as installing the package, and then capturing changes takes about 10 minutes on the machines I use to build, as they have so much other stuff on them

Best answer by AVmcclint

Simple Package Creator and App Packager are what I use because they are a lot less overhead than Composer.

13 replies

Forum|alt.badge.img+15
  • Valued Contributor
  • 382 replies
  • February 12, 2018

10 minutes doesn't sound bad...

But sounds like you're doing snapshots. If it is just a drag & drop, sounds like just drag it, drop it, then drag it into Composer to create the .pkg.

I personally dislike snapshots, but Composer works well enough.


AVmcclint
Forum|alt.badge.img+21
  • Esteemed Contributor
  • 1043 replies
  • Answer
  • February 12, 2018

Simple Package Creator and App Packager are what I use because they are a lot less overhead than Composer.


Forum|alt.badge.img+10
  • Valued Contributor
  • 224 replies
  • February 12, 2018

Just drag the .app from applications into composer and then build as a .pkg. Just make sure to check permissions before building.


Forum|alt.badge.img+26
  • Valued Contributor
  • 909 replies
  • February 12, 2018

I second using Composer by dragging the app (and any relevant associated files). I don't use Composer much for snapshots these days as I try to stay as close to the vendor package as possible, but Composer is great for giving me a fast GUI for building my own packages through drag-and-drop. Definitely second getting your permissions right though...one time I built 4-5 drag n drop packages quickly and wasn't paying attention to permissions...luckily I only hosed my test machine, but that could have been bad.


Forum|alt.badge.img+5
  • Contributor
  • 42 replies
  • February 13, 2018

If it is just a file (or a series of files) being dropped somewhere (like /Applications), I usually use Packages. There are a ton of utilities to accomplish the same task, you just have to pick the one that you find easiest to work with.


Forum|alt.badge.img+16
  • Valued Contributor
  • 1002 replies
  • February 13, 2018

Just out of interest, does anyone know a tool that takes a vendor DMG and makes a PKG, but still uses the supplied DMG to copy into Applications from?
Just curious as a number of Apps seem to need the source DMG verified during copying with Apples new security protocols, unless their is another way of dealing with this?
EDIT: I have currently been creating this manually using scripting in Composer, it's easy enough but an automatic tool could be nice.


Forum|alt.badge.img+3
  • New Contributor
  • 7 replies
  • February 14, 2018

This might help. Open terminal and run the below command. Copy the .app from .dmg to desktop first.

sudo pkgbuild --install-location /Applications --component ./Desktop/Firefox.app ./Desktop/Mozilla Firefox.pkg

--install-location : destination location where the .app should be installed.
--component: path to the source .app


AVmcclint
Forum|alt.badge.img+21
  • Esteemed Contributor
  • 1043 replies
  • February 14, 2018

@Look take a look at the 2 apps I posted above. One of those does exactly that. :)


georgecm12
Forum|alt.badge.img+12
  • Valued Contributor
  • 183 replies
  • February 14, 2018

You also could consider looking into AutoPkg/AutoPkgr. Many apps distributed by the developer as drag and drop installers have AutoPkg recipes that will generate a pkg for you.


Forum|alt.badge.img+4
  • Contributor
  • 14 replies
  • October 11, 2022

How can I use AutoPkg or Simple Package Creator or App Packager to create a .pkg on a specific path like /usr/local/ ?
This option is available in composer but I want to do it without composer using different tool 


Forum|alt.badge.img+4
  • Contributor
  • 14 replies
  • October 11, 2022

This might help. Open terminal and run the below command. Copy the .app from .dmg to desktop first.

sudo pkgbuild --install-location /Applications --component ./Desktop/Firefox.app ./Desktop/Mozilla Firefox.pkg

--install-location : destination location where the .app should be installed.
--component: path to the source .app


How can I use AutoPkg or Simple Package Creator or App Packager to create a .pkg on a specific path like /usr/local/ ?
This option is available in composer but I want to do it without composer using different tool 


Forum|alt.badge.img+4
  • Contributor
  • 14 replies
  • October 11, 2022

Simple Package Creator and App Packager are what I use because they are a lot less overhead than Composer.


How can I use AutoPkg or Simple Package Creator or App Packager to create a .pkg on a specific path like /usr/local/ ? This option is available in composer but I want to do it without composer using different tool 


Forum|alt.badge.img+4
  • Contributor
  • 14 replies
  • October 11, 2022

You also could consider looking into AutoPkg/AutoPkgr. Many apps distributed by the developer as drag and drop installers have AutoPkg recipes that will generate a pkg for you.


How can I use AutoPkg or Simple Package Creator or App Packager to create a .pkg on a specific path like /usr/local/ ?This option is available in composer but I want to do it without composer using different tool