issue/2871 - Fix the framework copy and codesigining issues

Forget the other one... that one is cleaner!
please keep the indentation the way it was, throughout the file?