Extract dmg specific code