-1

As i took the reference from Embed icon in python script @ali3n-w0r1d answer.

I added icon file and it's perfectly fine for me, but I want to add example.c and example.h files. So what are the changes I need to add in .spec file and my python script.

halfer
  • 19,824
  • 17
  • 99
  • 186
Meera
  • 57
  • 2
  • 11
  • Please post your spec file – The4thIceman Nov 03 '17 at 17:39
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Nov 04 '17 at 12:11

1 Answers1

0

I resolved my problem. so this is my .spec file. I put my example_doxigen.c and example_doxigen.h and logo.ico file in my directory where python file stored.

# -*- mode: python -*-
a = Analysis([os.path.join(HOMEPATH,'doxygen_skeleton.py')],
         pathex=['E:\\pyinstaller-2.0\\pyinstaller-2.0', 'E:\\pyinstaller-2.0\\pyinstaller-2.0\\utils'],
         hiddenimports=[],
         hookspath=None)
a.datas += [ ('logo.ico', 'E:\\pyinstaller-2.0\\pyinstaller-2.0\\logo.ico', 'DATA')]
a.datas += [ ('example_doxigen.c', 'E:\\pyinstaller-2.0\\pyinstaller-2.0\\example_doxigen.c', 'DATA')]
a.datas += [ ('example_doxigen.h', 'E:\\pyinstaller-2.0\\pyinstaller-2.0\\example_doxigen.h', 'DATA')]
pyz = PYZ(a.pure)
exe = EXE(pyz,
      a.scripts,
      a.binaries,
      a.zipfiles,
      a.datas,
      name=os.path.join('dist', 'doxygen_skeleton.exe'),
      debug=False,
      strip=None,
      upx=True,
      console=False , icon='E:\\pyinstaller-2.0\\pyinstaller-2.0\\logo.ico')
Meera
  • 57
  • 2
  • 11