{"id":262983,"date":"2015-08-05T20:39:02","date_gmt":"2015-08-05T16:39:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=262983"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=262983","title":{"rendered":"\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 Python3 + Qt5 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u0434 Windows"},"content":{"rendered":"<p>     \t\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043c\u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u0433\u0443 \u043f\u043e\u0434 Windows. \u0420\u0430\u043d\u044c\u0448\u0435 \u043c\u043d\u0435 \u043d\u0435 \u0434\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043d\u0435\u0435.<br \/>  \u0421\u0430\u043c\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u0430\u044f, \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0430\u0441\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e. \u041d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0442\u044a\u0435\u043b\u0430 \u0441\u0431\u043e\u0440\u043a\u0430 \u0435\u0435 \u043f\u043e\u0434 \u0432\u0438\u043d\u0434\u0443. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b (Python3 + Qt5) \u043d\u0435 \u0440\u043e\u0434\u043d\u044b\u0435, \u0430 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435, \u043d\u043e \u0447\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443, \u044f \u043d\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b.<br \/>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439, \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043c\u0443 \u0435\u0449\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043b\u0431\u043e\u043c \u0432 \u044d\u0442\u0443 \u0441\u0442\u0435\u043d\u0443.<br \/>  \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0432\u044b\u0441\u0442\u0440\u0430\u0434\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043a\u0430\u043a \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c PyQt5 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 single-file.exe \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043c\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u2014 \u0441\u0431\u043e\u0440\u043a\u0438 python \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 .exe \u044d\u0442\u043e: py2exe, cx_freeze \u0438 pyinstaller. \u041f\u0440\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e. \u041d\u043e \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u0430\u0432\u0442\u043e\u0440\u044b \u0433\u0440\u0435\u0448\u0430\u0442 \u0445\u0430\u043b\u0442\u0443\u0440\u043e\u0439 \u2014 \u043b\u0435\u0433\u043a\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f\u2026 \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u041d\u0430\u0434\u043e \u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0434\u0432\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u2014 \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0430 \u0434\u0435\u0432-\u0441\u0440\u0435\u0434\u0435 \u0438 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f? \u0423 \u043c\u0435\u043d\u044f-\u0442\u043e \u0438 \u0442\u0430\u043a \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437\u043e \u0432\u0441\u044f\u043a\u0438\u0445 \u0441\u0431\u043e\u0440\u043e\u043a \u0438 \u0442\u0430\u043d\u0446\u0435\u0432 \u0441 \u0431\u0443\u0431\u043d\u043e\u043c. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u2014 \u043a\u0442\u043e \u0438\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435 Qt?<\/p>\n<p>  \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0435\u0441\u0442\u044c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b. \u041d\u043e \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u044b\u043b\u0438 \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \u043e\u0434\u0438\u043d \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0441\u044f (pyinstaller \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 3-\u0439 \u043f\u0438\u0442\u043e\u043d \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435), \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043e\u0431\u0440\u0430\u043b \u0442\u043e, \u0447\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u0442\u0440\u0435\u0442\u0438\u0439 \u0432\u043e\u043e\u0431\u0449\u0435 \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u043b, \u0440\u0443\u0433\u0430\u044f \u0432\u0441\u0435 \u0432\u043e\u043a\u0440\u0443\u0433.<br \/>  \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u043b\u0433\u043e\u0439 \u0431\u043e\u0440\u044c\u0431\u044b \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d py2exe.<\/p>\n<p>  \u0421\u0435\u043a\u0440\u0435\u0442 \u0443\u0441\u043f\u0435\u0445\u0430 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438\u0437 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 (\u044f \u043d\u0435 \u0434\u0430\u044e \u043f\u0440\u044f\u043c\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438, \u0442.\u043a. \u043e\u043d\u0438 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u044e\u0442, \u043f\u0438\u0448\u0443 \u0447\u0442\u043e \u0433\u0434\u0435 \u0438\u0441\u043a\u0430\u0442\u044c):  <\/p>\n<ul>\n<li>Win XP 32-bit (\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u0442\u0435 \u0437\u0430 \u0431\u0430\u0437\u0443 \u2014 \u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u043b \u0441\u0430\u043c\u0443\u044e \u0441\u0442\u0430\u0440\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443)<\/li>\n<li>Python 3.4 \u2014 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441 <a href=\"http:\/\/www.python.ord\/download\">www.python.ord\/download<\/a> Windows x86 msi installer. \u041c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c C:\\Python34\\ \u0432 %PATH%<\/li>\n<li>PyWin32 \u2014 \u0441\u0442\u0430\u0432\u0438\u043c \u0441 sf.net \u0444\u0430\u0439\u043b pywin32-219.win32.py3.4.exe<\/li>\n<li>Qt5.5 \u2014 \u0441\u0442\u0430\u0432\u0438\u043c \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 qt.io. \u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441 \u043d\u0438\u043c \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 mingw4.9.2 <\/li>\n<li>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c C:\\Qt\\Tools\\mingw492_32\\bin \u0432 %PATH%.<\/li>\n<li>Git for Windows \u2014 \u043e\u043d \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0441\u0442\u0430\u0432\u0438\u043c \u0441 git-scm.com<\/li>\n<li>PyQt5 \u2014 \u043a\u0430\u0447\u0430\u0435\u043c \u0438 \u0441\u0442\u0430\u0432\u0438\u043c riverbankcomputing.co.uk win32 x86 installer <\/li>\n<li>SIP \u2014 \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u043f\u043e\u043d\u044f\u043b \u043f\u043e\u0447\u0435\u043c\u0443, \u043d\u043e \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 riverbankcomputing.co.uk \u043d\u0435 \u0443\u0434\u043e\u0441\u0443\u0436\u0438\u043b\u0441\u044f \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u0435\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u0430\u0447\u0430\u0435\u043c win \u0441\u043e\u0440\u0446\u044b, \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c, \u0434\u0430\u043b\u044c\u0448\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Git Bash:<\/li>\n<li>python configure.py -p win32-g++ <\/li>\n<li>mingw32-make.exe <\/li>\n<li>mingw32-make.exe install.<\/li>\n<li>\u0421\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439, \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044f \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 (. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435\u0433\u043e 3 \u0444\u0430\u0439\u043b\u0430. \u0418\u0434\u0435\u043c \u0440\u0443\u043a\u0430\u043c\u0438 \u0432 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0443 sipgen\/ folder \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c sip.exe \u0432 C:\\Python34. <\/li>\n<li>\u0417\u0430\u0442\u0435\u043c \u0438\u0434\u0435 \u0432 ..\/siplib \u0438 <\/li>\n<li>copy sip.pyd c:\\python34\\Lib\\site-packages<\/li>\n<li>strip \/c\/Python34\/Lib\/site-packages\/sip.pyd<\/li>\n<li>\u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c .h-\u0444\u0430\u0439\u043b:<\/li>\n<li>cp sip.h \/c\/Python34\/include\/<\/li>\n<li>py2exe \u2014 \u0441\u0442\u0430\u0432\u0438\u043c \u0440\u043e\u0434\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c: python -m pip install py2exe<\/li>\n<li>pyreadline \u2014 \u0442\u0430\u043a \u0436\u0435: python -m pip install pyinstaller<\/li>\n<li>7-Zip \u2014 c \u0441\u0430\u0439\u0442\u0430 7-zip.org \u043a\u0430\u0447\u0430\u0435\u043c x86 exe<\/li>\n<li>7-zip extra \u2014 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0430\u0435\u043c \u043e\u0442\u0442\u0443\u0434\u0430 \u0436\u0435, \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c 7-zip folder. \u041d\u0430 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b txt-\u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0431\u0438\u0442\u044c.<\/li>\n<li>Resource Hacker \u2014 \u043a\u0430\u0447\u0430\u0435\u043c angusj.com \u2014 \u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u0443\u044e \u043f\u0438\u043a\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u0441\u0432\u043e\u044e, \u0442\u043e \u043e\u043d\u0430 \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u041b\u0438\u0431\u043e \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 windres, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0434\u0435\u0442 \u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u0441 mingw \u2014 \u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0441 RH.<\/li>\n<\/ul>\n<p>  \u0414\u0435\u043b\u044e\u0441\u044c \u0441\u0432\u043e\u0438\u043c setup.py:<\/p>\n<pre><code class=\"python\">from distutils.core import setup import os, sys import py2exe from glob import glob import PyQt5  NAME=&quot;Proga&quot;  qt_platform_plugins = [(&quot;platforms&quot;, glob(PyQt5.__path__[0] + r'\\plugins\\platforms\\*.*'))] data_files.extend(qt_platform_plugins) msvc_dlls = [('.', glob(r'C:\\Windows\\System32\\msvc?100.dll'))] data_files.extend(msvc_dlls) # print(data_files)  sys.argv.append('py2exe')  setup( \tdata_files=data_files, \twindows=[ \t\t{ \t\t\t&quot;script&quot;: &quot;pyftp1.py&quot;, \t\t\t&quot;icon_resources&quot;: [(0, &quot;resources\/favicon.ico&quot;)] \t\t} \t], \t# zipfile=None, \toptions={ \t\t&quot;py2exe&quot;: { \t\t\t&quot;includes&quot;:[&quot;sip&quot;, &quot;atexit&quot;,],  # \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c atexit \u0435\u0433\u043e \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c, sip \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u044f\u0432\u043d\u043e - \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0438 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u043e \u043d\u0435\u0433\u043e \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442  \t\t\t# &quot;packages&quot;: ['PyQt5'], \t\t\t&quot;compressed&quot;: True, \t\t\t&quot;dist_dir&quot;: &quot;dist\/&quot; + NAME, \t\t\t# &quot;bundle_files&quot;: 0, # \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e ( \u0441 \u044d\u0442\u043e\u0439 \u043e\u043f\u0446\u0438\u0435\u0439 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u0440\u043e\u0433\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 msvc*.dll  \t\t\t# &quot;zipfile&quot;: None, # \u0442\u043e\u0436\u0435 \u043b\u0438\u0448\u043d\u0435\u0435 \t\t\t&quot;optimize&quot;: 2, \t\t} \t} ) <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430-\u043c\u0438\u043d\u0438\u043c\u0443\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0430\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"python\">python setup.py py2exe <\/code><\/pre>\n<p>  \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 \u0441 \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u043f\u0440\u043e\u0433\u043e\u0439 \u0432 dist.<br \/>  \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041d\u0430 \u044d\u0442\u0443 \u043f\u0430\u043f\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0442\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u043e\u0432, \u0442\u0438\u043f\u0430 Inno Setup \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c msi. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u2014 \u0442\u043e\u0447\u043d\u043e \u0431\u0435\u0437 \u043f\u0440\u0430\u0432\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043b\u0438\u0431.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u0448\u0435\u043b \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0437\u0430\u043f\u0430\u043a\u043e\u0432\u0430\u043b \u0432 1 \u0444\u0430\u0439\u043b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e 7-zip. \u0421\u0445\u0435\u043c\u0430 \u0442\u0430\u043a\u0430\u044f: \u0441\u043e\u0437\u0434\u0430\u0435\u043c 7z-\u0430\u0440\u0445\u0438\u0432 \u0438 \u043a \u043d\u0435\u043c\u0443 \u043f\u0440\u0438\u0441\u0442\u044b\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f SFX-\u0433\u043e\u043b\u043e\u0432\u0430 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433. \u0413\u043e\u043b\u043e\u0432\u0430 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0430\u0440\u0445\u0438\u0432 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0439 exe-\u0444\u0430\u0439\u043b. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<br \/>  cat 7zS.sfx resources\/config.txt Proga.7z &gt; Proga.exe<\/p>\n<p>  \u0412 \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <a href=\"http:\/\/7zsfx.info\/en\/\">\u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438<\/a>, \u044f \u0437\u0430\u0434\u0430\u043b \u043c\u0438\u043d\u0438\u043c\u0443\u043c:  <\/p>\n<pre><code>;!@Install@!UTF-8! Title=&quot;Proga&quot; RunProgram=&quot;Proga\\\\pyftp1.exe&quot; ;!@InstallEnd@! <\/code><\/pre>\n<p>  \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u2014 \u043d\u0435\u043a\u0440\u0430\u0441\u0438\u0432\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0443 exe \u0444\u0430\u0439\u043b\u0430 \u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0449\u0438\u043a. \u0422\u0443\u0442-\u0442\u043e \u0438 \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u043c\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0430 \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c:<br \/>  RESHACKER.exe -addoverwrite Proga.exe, Proga.exe, resources\/favicon.ico, ICONGROUP, MAINICON, 0<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043c\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0441 \u044d\u0442\u0438\u043c \u0432\u0441\u0435\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 Makefile:  <\/p>\n<pre><code class=\"bash\"># start settings DIST=dist # change NAME also in setup.py and resource\/config.txt NAME=Proga EXT=exe  # final name and location of the built program FINAL=$(DIST)\/$(NAME).$(EXT)  # external programs 7ZIPDIR=&quot;C:\\Program Files\\7-Zip&quot; RESHACKER=&quot;\/c\/Program\\ Files\/Resource\\ Hacker\/ResourceHacker.exe&quot;  # intermediate steps  # no icon version of program  NOICON=$(DIST)\/$(NAME)_no_icon.$(EXT)  # name of .7z archive 7Z_BASENAME=$(NAME).7z 7Z=$(DIST)\/$(7Z_BASENAME)  # folder with ready .exe PROGDIR=$(DIST)\/$(NAME)  all: $(FINAL)   $(FINAL): $(NOICON) \t# change icon \t&quot;$(RESHACKER)&quot; -addoverwrite $(NOICON), $(FINAL), resources\/favicon.ico, ICONGROUP, MAINICON, 0   $(NOICON): $(7Z) \t#build autorunning sfx with default icon \tcat $(7ZIPDIR)\/7zS.sfx resources\/config.txt $(7Z) &gt; $(NOICON)   $(7Z): exe \t# compress program folder to .7z \tcd $(DIST);  $(7ZIPDIR)\\\\\\7z.exe a  $(7Z_BASENAME)  $(NAME)   exe:  $(DIST) \t# build program itself \tpython setup.py py2exe   $(DIST):  \t# create dist directory  \t# echo $(DIST)\/   clean: \trm -rf $(DIST)\/*  <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0443:  <\/p>\n<pre><code class=\"bash\">mingw492-make.exe clean all <\/code><\/pre>\n<p>  \u0423\u0441\u043f\u0435\u0445\u043e\u0432 \u0432 \u0441\u0431\u043e\u0440\u043a\u0435!<br \/>  \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0440\u043e \u0441\u0432\u043e\u0439 \u043e\u043f\u044b\u0442!     \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/264233\/\"> http:\/\/habrahabr.ru\/post\/264233\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043c\u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u0433\u0443 \u043f\u043e\u0434 Windows. \u0420\u0430\u043d\u044c\u0448\u0435 \u043c\u043d\u0435 \u043d\u0435 \u0434\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043d\u0435\u0435.<br \/>  \u0421\u0430\u043c\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u0430\u044f, \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0430\u0441\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e. \u041d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0442\u044a\u0435\u043b\u0430 \u0441\u0431\u043e\u0440\u043a\u0430 \u0435\u0435 \u043f\u043e\u0434 \u0432\u0438\u043d\u0434\u0443. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b (Python3 + Qt5) \u043d\u0435 \u0440\u043e\u0434\u043d\u044b\u0435, \u0430 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435, \u043d\u043e \u0447\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443, \u044f \u043d\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b.<br \/>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439, \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043c\u0443 \u0435\u0449\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043b\u0431\u043e\u043c \u0432 \u044d\u0442\u0443 \u0441\u0442\u0435\u043d\u0443.<br \/>  \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0432\u044b\u0441\u0442\u0440\u0430\u0434\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043a\u0430\u043a \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c PyQt5 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 single-file.exe \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-262983","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/262983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=262983"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/262983\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=262983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=262983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=262983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}