티스토리 뷰

Eclipse Python PyQt4 py2exe를 이용하여 Gui 프로그램을 작성하다 발견..


개발중에 바로 실행하면 모든 이미지가 잘 나온다..




그런데 py2exe로 wrapping 해서 실행하면 아래와 같이 깨짐..

 

 

 

setup.py data_files항목에 아래를 추가하면 정상 표출된다. (결국 dll이 동작안해서 그렇다. 기본적으로 png는 지원된다.)

 

        ('imageformats', ['C:\Python27\Lib\site-packages\PyQt4\plugins\imageformats\qgif4.dll']),
        ('imageformats', ['C:\Python27\Lib\site-packages\PyQt4\plugins\imageformats\qico4.dll']),
        ('imageformats', ['C:\Python27\Lib\site-packages\PyQt4\plugins\imageformats\qjpeg4.dll']),
        ('imageformats', ['C:\Python27\Lib\site-packages\PyQt4\plugins\imageformats\qmng4.dll']),
        ('imageformats', ['C:\Python27\Lib\site-packages\PyQt4\plugins\imageformats\qsvg4.dll']),
        ('imageformats', ['C:\Python27\Lib\site-packages\PyQt4\plugins\imageformats\qtga4.dll']),
        ('imageformats', ['C:\Python27\Lib\site-packages\PyQt4\plugins\imageformats\qtiff4.dll']),

 

 



'Python > Tutorials & examples' 카테고리의 다른 글

파이썬 마우스 클릭 함수  (1) 2017.04.21
Python Web Framework  (0) 2017.04.19
댓글