diff --git a/deployment/macos/deploy.py b/deployment/macos/deploy.py
index 60d45e647da40c0b94d806b6a8107cdc6569049e..dea9207ab211bf8b210ff1cf0b62748140a04def 100644
--- a/deployment/macos/deploy.py
+++ b/deployment/macos/deploy.py
@@ -9,6 +9,7 @@ p.add_option('--bundle', action='store_true', default=False)
 p.add_option('--no_rpath', action='store_true',
              default=False)
 p.add_option('--macports_workaround', action='store_true', default=False)
+p.add_option('--dmg', action='store_true', default=False)
 opts, args=p.parse_args()
 deps.make_standalone('../../stage', 'standalone', True, 
                      opts.no_rpath, 
@@ -18,6 +19,9 @@ if os.path.exists('DNG.app'):
 bundle.create_bundle('DNG', opts.bundle)
 if opts.bundle:
   shutil.copytree('../../examples', 'DNG.app/Contents/examples')
-  os.system('rm `find DNG.app/Contents/examples/ -name "*.pyc"`')
-  os.system('rm -rf DNG.app/Contents/examples/harmony')
-  os.system('rm -rf DNG.app/Contents/examples/dokk')  
\ No newline at end of file
+  os.system('rm `find DNG.app/Contents/examples/ -name "*.pyc"` 2> /dev/null')
+  os.system('rm -rf DNG.app/Contents/examples/demos/harmony')
+  os.system('rm -rf DNG.app/Contents/examples/demos/dokk')
+  if opts.dmg:
+    os.system('rm -rf openstructure.dmg')
+    os.system('hdiutil create -srcFolder DNG.app openstructure.dmg')
\ No newline at end of file