Compiling and running code as dmg or exe

2k Views Asked by At

Newbie question I am finding it hard to get my head around.

If I wanted to use one of the many tool out their like rsync lsync or s3cmd how can you build these into a program for none computer savvy people to use.

Ie I am comfortable opening terminal and running s3cmd which Is developed in python how would I go about developing this as a dmg file for mac or exe file for windows?

So a user could just install the dmg or exe then they have s3cmd lsync or rsync on their computer.

I can open up eclipse code a simple app in java and then export as a dmg or exe I cannot figure out how you do this for other languages say write a simple piece of code that I cam save as a dmg or exe and that after installed will add a folder to my desktop or something simple like that to get me started?

1

There are 1 best solutions below

1
On

If you mean specifically with Python, as I gather from tagging that in your question, it won't simply run the same way as Java will, because there's no equivalent Virtual Machine.

If the user has a Python interpreter on their system, they they can simply run the .py file. If they do not, you can bundle the interpreter and needed libraries into an executable using Py2Exe, cxFreeze, or bbFreeze. For replacing a dmg, App2Exe does something similar.

However. the three commands you listed are not python-related, and rely on functionality that is not necessarily available on Windows or Mac, so it might not be as possible.