Distutils offers existing solutions to build a Windows self-extracting EXE. Notably, I can create the package even if I’m on Ubuntu (which is essential given our automated build process).
How do I build an osx installer from an Ubuntu machine?
(This is for python 2.7)
You could do the following, since OS X has a UNIX foundation. (I’m assuming it also has some standard utilities like
uudecodeandunzip.);uuencode file.zip file.zip >uu.txtto convert this zip-file to text.uuencodeas a here-document in that shell-script, that is fed touudecode, to recreate the zipfile. This should be the second command in the shell-script. The first commands should check for neccesary utilities.To install the program, run the shell-script. On UNIX, this script should be run as root. Don’t know how OS X handles that, though. Below is an example (the included zipfile contains two files with only random noise) ;