From 6bf5774eb827622e6df68276e5767955c7f4daaf Mon Sep 17 00:00:00 2001 From: Tomasz Neugebauer Date: Wed, 11 Jul 2018 19:19:33 -0400 Subject: [PATCH] Updated .spec file so that it can generate the MAC OSX distribution for a console application. Added favicon.icns that will be useful eventually for the windowed mac OSX app icon. --- favicon.icns | Bin 0 -> 2221 bytes fluentdna.spec | 68 +++++++++++++++++++++++++++++-------------------- 2 files changed, 41 insertions(+), 27 deletions(-) create mode 100644 favicon.icns diff --git a/favicon.icns b/favicon.icns new file mode 100644 index 0000000000000000000000000000000000000000..a6b15ecf632b0108ca44e8f768b0fecb712f440b GIT binary patch literal 2221 zcmeHHyHUh25M6r=bIdhBNTLRCU~&o|p#!2D4iXyBo**y@LqGsM(1SXm0_S!lR^Jgm zNk`)B{F&9h{n_uy-rPMt0j$1nZ>}!@;C!=fF9DjD?bX9Q*_HQypyIq&eZ2!~$>rH4 zj#y*U*DlGrLW$=8fI^OAT#^Fbq<#j}Aqntmy}D9L6kRS)0i-^uoNi+|)@!9CfmBNu zmo*tKktT?-l7I%#gLeBM<;v%IX53&EI@>@xdN*K>nEcE zS+7EJi33j9h9v6>CR(q8i5CGz%norz3UDgu5Rv0lm@3916%uYng=x)L;OegmLrR4h z3@Xe(FXNC=VMwXaIu#-tsqjT&f9Q`w@4)>9b_l3?pI}`9LV4~@ya)jC*~J+tz;Ulb zfqSaStkaYWILi>;r3jC~K==&wgm)RjyAvQEdX literal 0 HcmV?d00001 diff --git a/fluentdna.spec b/fluentdna.spec index 58b5df4..e166131 100644 --- a/fluentdna.spec +++ b/fluentdna.spec @@ -1,35 +1,49 @@ # -*- mode: python -*- +from PyInstaller.compat import is_darwin block_cipher = None +pathextras=['D:\\josiah\\Projects\\DDV'] +mainexepath=['DDV\\fluentdna.py'] +excludelibs=[] +if is_darwin: pathextras=[] +if is_darwin: excludelibs=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'] +if is_darwin: mainexepath=['DDV/fluentdna.py'] -# Icons: https://stackoverflow.com/questions/9946760/add-image-to-spec-file-in-pyinstaller -a = Analysis(['DDV\\fluentdna.py'], - pathex=['D:\\josiah\\Projects\\DDV'], - binaries=[], - datas=[('DDV/example_data', 'DDV/example_data'), - ('DDV/html_template','DDV/html_template')], - hiddenimports=[], - hookspath=[], - runtime_hooks=[], - excludes=[], - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=block_cipher) +a = Analysis(mainexepath, + pathex=pathextras, + binaries=[], + datas=[('DDV/example_data', 'DDV/example_data'), + ('DDV/html_template','DDV/html_template')], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=excludelibs, + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher) + pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE(pyz, - a.scripts, - exclude_binaries=True, - name='FluentDNA', - debug=False, - strip=False, - upx=True, - console=True, - icon='D:\\josiah\\Projects\\DDV\\favicon.ico') + a.scripts, + exclude_binaries=True, + name='FluentDNA', + debug=False, + strip=False, + upx=True, + console=True, + icon='favicon.ico') + coll = COLLECT(exe, - a.binaries, - a.zipfiles, - a.datas, - strip=False, - upx=True, - name='FluentDNA') + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + name='FluentDNA') + +#the app will be useful ONLY for the MAC GUI/windowed version +#if is_darwin: +# app = BUNDLE(exe, +# name='FluentDNA.app', +# icon='favicon.icns')