PKG files can only be created from DMG files containing applications by using terminal. Steps to convert macOS DMG files to PKG files. Go to the folder that contains the DMG file. Double click the dmg file and it gets mounted as a virtual disk and reveal its contents. Copy the.app. Dec 13, 2019 Despite the differences between the core of Mac OS and Windows 10,.dmg files can be read with the assistance of third-party apps. To open a.dmg file, we turned to 7-Zip, one of our favorite ways to extract files on Windows. It’s a powerful open-source tool, but it’s far from the only app.
DMG files or Disk Image files are used to install software but can contain any type of files, not just app or installation files. They are usually used by macOS software installers downloaded from the internet.
PKG files are macOS installation packages which contain installer scripts and compressed installation files that are used to install Mac software applications on a user hard drive.
The issue with DMG files is that it needs to be mounted as a virtual disk to push apps, whereas PKG files can be directly installed. So, in order to push an enterprise app, Hexnode prefers PKG files. So, we need to create PKG files from DMG files to push it through Hexnode. It’s a rather simple process that can be done with the help of the Terminal.
Terminal can create PKG files from dmg files and then the PKG files can be distributed via Hexnode as enterprise apps.
Note For using downloaded DMG files:
Enable >” App Store and identified developers” option under Mac system preferences > Security and Privacy> Allow apps downloaded from.
Enable >” App Store and identified developers” option under Mac system preferences > Security and Privacy> Allow apps downloaded from.
PKG files can only be created from DMG files containing applications by using terminal.
Steps to convert macOS DMG files to PKG files.
Create Dmg File From App Download
- Go to the folder that contains the DMG file.
- Double click the dmg file and it gets mounted as a
virtual disk and reveal its contents. - Copy the .app file to the Applications folder in the
mac - Eject the DMG file by clicking on eject button.
- Open Terminal.
- Build the PKG file using the productbuild command
- Provide the device login password and wait a few seconds for the build to finish
- The PKG file gets created at the desired location.
The two arguments specify the location of the already installed .app file (path_to_installedapp/macapp.app) and the location of the newly generated PKG file (path_to_savedpackage/packagename.pkg), respectively.
To distribute the created PKG files, check out Distribute macOS Enterprise App using Hexnode.
Create Dmg File From Application
NoteCreate Dmg File From App Download
If the app is an enterprise app or not from an identified developer, to ensure that the app is safe and free from malware, signing a PKG file is necessary. Check out How to sign pkg files for deployment.
That’s all! The process is quite easy for most applications. The only red flag here is that not all apps are created equal, so it may affect the time required for the PKG build.
Was this article helpful?
Related Articles
Are you trying to make a bootable installer? Do you have the El Capitan installer downloaded from the App Store? You cannot make a bootable DVD but you can make a bootable flash drive.
Bootable USB Installers for OS X Mavericks, Yosemite, El Capitan, and Sierra
First, review this introductory article: Create a bootable installer for macOS. Second, see this How To outline for creating a bootable El Capitan installer. Simply replace the Terminal command with the one from the preceding article by copying it into the Terminal window. You will need an 8GB or larger USB flash drive that has been partitioned and formatted for use with OS X.
Drive Partition and Format
- Open Disk Utility in the Utilities' folder.
- After Disk Utility loads select the drive (out-dented entry with the mfg.'s ID and size) from the side list.
- Click on the Erase tab in the Disk Utility toolbar. Name the drive, 'MyVolume'. <---- IMPORTANT!
- In the drop down panel set the partition scheme to GUID. Set the Format type to Mac OS Extended (Journaled.)
- Click on the Apply button and wait for the Done button to activate. When it does click on it.
- Quit Disk Utility.
Create Installer
Open the Terminal in the Utilities' folder. Choose the appropriate command line (in red) depending upon what OS X installer you want. Paste that entire command line from below at the Terminal's prompt:
Command for macOS High Sierra:
sudo /Applications/Install macOS High Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install macOS High Sierra.app
Command for macOS Sierra:
sudo /Applications/Install macOS Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install macOS Sierra.app
![Create dmg file on windows Create dmg file on windows](/uploads/1/2/5/3/125385245/228945843.png)
Command for El Capitan:
sudo /Applications/Install OS X El Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install OS X El Capitan.app
Command for Yosemite:
sudo /Applications/Install OS X Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install OS X Yosemite.app
Command for Mavericks:
sudo /Applications/Install OS X Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install OS X Mavericks.app
Press RETURN. You will be asked for your admin password. It will not echo to the Terminal window. Then press RETURN again. Wait for the return of the Terminal prompt signifying the process has completed. It takes quite some time to finish. Be patient.
Mar 3, 2018 7:47 PM