Skip to content

Commit

Permalink
Updated .spec file so that it can generate the MAC OSX distribution f…
Browse files Browse the repository at this point in the history
…or a console application. Added favicon.icns that will be useful eventually for the windowed mac OSX app icon.
  • Loading branch information
photomedia committed Jul 11, 2018
1 parent 3cd2580 commit 6bf5774
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 27 deletions.
Binary file added favicon.icns
Binary file not shown.
68 changes: 41 additions & 27 deletions fluentdna.spec
Original file line number Diff line number Diff line change
@@ -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')

0 comments on commit 6bf5774

Please sign in to comment.