Below are some references that I found for creating a
(but have no experience with).
The libdmg-hfsplus repository, which includes a number of portable libraries and utilities that manipulate the HFS+ file system and DMG images, is still in its experimental stage, so it doesn’t contain any utility that allows building Apple’s DMG images from scratch, but can convert an ISO file.
The following commands were found in the article
How to Build DMG Files for Windows-Based Applications on Linux,
to build from source using a forked version of the library:
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install cmake
sudo apt-get install zlib1g-dev
sudo apt-get install genisoimage
git clone https://github.com/hamstergene/libdmg-hfsplus.git
The resulting program will be found in
dmg/dmg and can be used like this:
# Generates IMG disk image with the help of genisoimage
genisoimage -D -V "SetMeitClient" -no-pad -r -apple -file-mode 0777 -o generated.img original && \
# Converts IMG into DMG ($dmgPath is the path that points to the DMG utility)
dmg generated.img generated.dmg
This open-source project is described as :
A shell script to build fancy DMGs.
I found testimonies in several places saying that it does the job.
This open-source project requires
npm and is described as:
Generate beautiful DMG-images for your OS X applications.
There are also testimonies for its working well.