Git Product home page Git Product logo

dmg2pkg's Introduction

Dmg2Pkg

A great deal of the macOS apps provided on the Net are DMG files, that contain a single app at the root of the volume. Then, one must drag manually the app to the Applications folder to install it. This makes the process of installing these apps cumbersome when they must be imported into a deployment system (say, Jamf Pro) as these can't import directly the DMG and work with it… The DMG must be converted first.

There are many tools that can easily convert a DMG to a PKG format that is easy to import in Jamf Pro, like AutoPkgr, but they can be a bit complex to deal with and they have their limits, i.e. downloading the DMG if it's located behind a paywall. quickpkg is another great tool, but I wanted to find a fast way to perform batch conversion of DMG files, and also be able to make conversion as easy as dropping the files in a folder. Thus, Dmg2Pkg here.

How it works

  1. Download and install quickpkg. Ensure that the quickpkg command is in your $PATH!
  2. Download the Dmg2Pkg.sh script.
  3. Install this script where you want, and don't forget to chmod 755 it.
  4. Change the variables in the script. If you don't, it will create a new Dmg2Pkg folder in _/Users/Shared.
  5. Move your DMG file in the Source_DMGs folder.
  6. Run the script.
  7. If everything works properly, new PKGs file should be spit in the Packages folder and the DMG should move in the Processed_DMGs folder automatically.

But wait, there's more!

Let's make things a bit more automatic!

  1. Get the Launchagent file (net.gete.dmg2pkg.plist).
  2. Install it in ~/Library/LaunchAgents.
  3. Open the file and check the paths if you moved the file (especially, check the path to the Dmg2Pkg.sh script).
  4. Launch the file with : launchctl load ~/Library/LaunchAgents/net.gete.dmg2pkg.plist
  5. Move your DMG files in the Source_DMGs folder.
  6. Wait for a few seconds, and the new PKG files should appear in the Packages folder and the DMG should move in the Processed_DMGs folder automatically.

If something weird happens (i.e. a package not generated), check Activity.log file. All quickpkg logs should be redirected in it.

dmg2pkg's People

Contributors

guillaumegete avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.