From bb88b407488a39e5be02e06ee1aa7706ac96fbea Mon Sep 17 00:00:00 2001 From: yuantailing Date: Sun, 30 Jul 2017 01:33:49 +0800 Subject: [PATCH] py2exe --- README.md | 7 +++++++ src/setup.py | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/setup.py diff --git a/README.md b/README.md index f92878b..c448cfb 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,10 @@ Run in command line: ``` $ python src/tools/recovery.py [input.xlsx] [output.xlsx] ``` + +Distribute as `.exe` (only for Windows): + +``` +$ # install [py2exe](http://www.py2exe.org/) +$ python src/setup.py py2exe +``` diff --git a/src/setup.py b/src/setup.py new file mode 100644 index 0000000..1b290de --- /dev/null +++ b/src/setup.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +# -*- coding: UTF-8 -*- + +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function + +from distutils.core import setup + +import py2exe + + +setup(name='excel-password-recovery', + windows=[{'script': 'src/gui-main.py'}], + options={ + 'py2exe': { + 'includes': ['Tkinter', 'tkFileDialog', + 'tkMessageBox', 'tools'] + } + }, + )