title: add ico file to executable in pyinstaller
body: <p>I have written a small program in <code>tkinter</code> in <code>python 3.5</code></p>
  
  <p>I'm making executable out of it using <code>pyintaller</code></p>
  
  <p>I have included a custom icon to the window to replace default feather icon of tkinter</p>
  
  <pre><code>from tkinter import *
  from tkinter import messagebox
  import webbrowser
  
  calculator = Tk()
  calculator.title("TBE Calculator")
  calculator.resizable(0, 0)
  iconFile = 'calculator.ico'
  
  calculator.iconbitmap(default=iconFile)
  </code></pre>
  
  <p>icon works fine when running <code>program.py</code> file directly</p>
  
  <p>But when making it executable using</p>
  
  <pre><code>pyinstaller --onefile --windowed --icon=program.ico program.py
  </code></pre>
  
  <p>and running program.exe from dist directory, it gives error as</p>
  
  <pre><code>failed to execute script program
  </code></pre>
  
  <p>I also tried with</p>
  
  <pre><code>pyinstaller --onefile --windowed --icon=program.ico --add-data="calculator.ico;ico" program.py
  </code></pre>
  
  <p>But still same error.</p>
  
  <p><strong>program.spec</strong> file</p>
  
  <pre><code># -*- mode: python -*-
  
  block_cipher = None
  
  
  a = Analysis(['program.py'],
               pathex=['C:\\Users\\anuj\\PycharmProjects\\YouTubePlayer\\Program'],
               binaries=[],
               datas=[],
               hiddenimports=[],
               hookspath=[],
               runtime_hooks=[],
               excludes=[],
               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,
            a.binaries,
            a.zipfiles,
            a.datas,
            name='calculator',
            debug=False,
            strip=False,
            upx=True,
            console=False , icon='program.ico')
  </code></pre>
  
  <p>Removing the line <code>calculator.iconbitmap(default=iconFile)</code> works fine but with default feather icon.</p>
  
  <p><strong>How to include window icon file with .exe executable?</strong></p>