asheets
asheets

Reputation: 870

How to create a desktop shortcut from a compressed file

Recently I have been approached by friends and family asking me to create various python apps for them. I'm trying to find an easy way to distribute these projects in a way that requires zero prior knowledge and minimal explanation.

My idea is to create a virtual environment for each app and compress it, then I can simply email it to them, they can unzip it and be good to go. My question is how can I have this create shortcuts on their desktops to things such as the batch file (most importantly), excel sheets, image folders, etc?

I would appreciate any help on this, or if I'm going about this completely wrong, it would be great to learn of a better way.

Upvotes: 1

Views: 691

Answers (1)

CasualDemon
CasualDemon

Reputation: 6160

What you are taking about is 'freezing' your code so it can be distributed. Here is an overview of the concept http://docs.python-guide.org/en/latest/shipping/freezing/.

I personally have had the best luck with PyInstaller being able to create a single executable file (i.e. my_app.exe) https://pyinstaller.readthedocs.io/en/stable/operating-mode.html

Now that your code is portable, to create the desktop icon there are various installers you can use to package that and anything else you need. http://www.makeuseof.com/tag/how-to-make-an-exe-installation-file/

Upvotes: 1

Related Questions