• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Techinline Blog

Remote Support Software Explained

SetMe
Remote Support Software That Always Works
Sign up
Techinline Blog
  • Product
  • Features
  • Pricing
  • How It Works

How to Build DMG Files for Windows-Based Applications on Linux

December 14, 2017 by Dan Kukarsky

When working on the macOS version of a new product, our development team was looking for a solution that would allow them to create custom DMG installers for each client. Since the product’s API is based on Microsoft Azure Service Fabric, and there are no Windows-based tools that would meet the criteria for API compatibility and scalability, our team decided to look elsewhere. And here’s where a Linux-based solution came to help.

If you’re looking for a similar tool, follow the steps below to build custom DMG installer files on Linux.

  1. Download the libdmg-hfsplus repository, which includes a number of portable libraries and utilities that manipulate the HFS+ file system and DMG images. Note that the code is still in its experimental stage, so it doesn’t contain any utility that allows building Apple’s DMG images from scratch.
  2. To build the disk image utility, run the following sequence of commands on Ubuntu version 16.04 or higher:
    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
    cd libdmg-hfsplus
    cmake .
    make
    mkdir bin
    cp dmg/dmg ./bin
  3. To create a request for generating a new DMG file, use the microsoft/aspnetcore:2.0 docker image and install genisoimage with the DMG utility copied onto it:
    FROM microsoft/aspnetcore:2.0
    COPY . /server # Contains all necessary scripts along with the DMG utility
    ADD dmg /
    WORKDIR /server
    RUN \
    apt-get update && \
    apt-get -y install genisoimage
  4. As soon as the service receives the request for generating a new DMG image, it will run the following bash script to add unique content to the client bundle, build a custom IMG image, and convert it into a DMG image with the help of the utility created in step 2:
    # Adds a unique ID to the client bundle
    (echo "-p $clientID" > original/AppName.app/Contents/Resources/args) && \
    # 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)
    $dmgPath dmg generated.img generated.dmg

This workaround will allow you to create custom DMG installer files containing unique information for each end-user.

Did you find this post helpful? Subscribe to our blog and join us on Facebook, Twitter, YouTube or LinkedIn for more tips and useful how-to’s.

Learn More About FixMe.IT

Related Posts

  • 30 Best Windows 10 Shortcuts to Know
  • 3 Ways to Switch User in Windows 10 without Logoff
  • How to Avoid Windows 10 Login Screen Loop After Fall Creators Update

Filed Under: Tips & Tricks Tagged With: DMG, Linux, macOS, Microsoft Windows, Software development

Primary Sidebar

Most Popular

Meet SetMe Solo: Ideal Pricing Plan for Individual & Small Businesses

New SetMe Features: In-Session Unattended Setup, Screen Blanking for Mac & More

SetMe's Unattended Access Is Here

New SetMe Feature: Disable Remote Input

Chrome Remote Desktop Review: The Pros & Cons

Best Remote Desktop Software for Mac in 2024

Subscribe to Newsletter

loader

Follow Us

Recent Posts

  • How to Restart a Remote Computer (the Easy Way with SetMe) May 2, 2025
  • Best Remote Desktop Software for Windows 11 (2025 Edition) April 30, 2025
  • How to Check if a Windows Server or PC Is Domain-Joined (All Methods) April 23, 2025
  • Remotely Access Headless Computers with SetMe April 18, 2025
  • How to Run PowerShell as Administrator (Windows 10 & 11) April 10, 2025
  • SetMe Recognized with Multiple Accolades from Capterra, Software Advice and GetApp in 2025 March 27, 2025

Footer

Product

  • Features
  • Pricing
  • How It Works
  • Security

Resources

  • Product Roadmap
  • Help Center

Try It Free

Do you enjoy reading our posts? You might also like our remote support app. Give it a try, it's free for 15 days:

Try SetMe Free

© 2025 · Techinline Ltd. · Built on the Genesis Framework