add generate script for macosx