From ceb2d1cfb6b681ad75b8ff3e9148ce2db085ef42 Mon Sep 17 00:00:00 2001 From: Alexander Stone Date: Mon, 22 Apr 2019 09:53:59 -0500 Subject: [PATCH] First pass at using pyinstaller to build apps. --- .gitignore | 3 +++ build.spec | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 build.spec diff --git a/.gitignore b/.gitignore index 621a9de..2e703ec 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ LacCore_Holes* project_data* project_location_data* CSDCO.sqlite3 +build/* +dist/* +__pycache__/* diff --git a/build.spec b/build.spec new file mode 100644 index 0000000..c69abbd --- /dev/null +++ b/build.spec @@ -0,0 +1,34 @@ +import gooey +gooey_root = os.path.dirname(gooey.__file__) +gooey_languages = Tree(os.path.join(gooey_root, 'languages'), prefix = 'gooey/languages') +gooey_images = Tree(os.path.join(gooey_root, 'images'), prefix = 'gooey/images') +a = Analysis(['csdco-metadata-aggregator.py'], + pathex=['~'], + hiddenimports=[], + hookspath=None, + runtime_hooks=None, + ) +pyz = PYZ(a.pure) + +options = [('u', None, 'OPTION'), ('u', None, 'OPTION'), ('u', None, 'OPTION')] + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + options, + gooey_languages, # Add them in to collected files + gooey_images, # Same here. + name='CSDCO Metadata Aggregator.exe', + debug=False, + strip=None, + upx=True, + console=False, + windowed=True, + icon=os.path.join(gooey_root, 'images', 'program_icon.ico')) + +app = BUNDLE(exe, + name='CSDCO Metadata Aggregator.app', + icon=None, + bundle_identifier=None)