Advertisement
Guest User

p2exe

a guest
Jan 25th, 2015
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.15 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2.  
  3. from distutils.core import setup
  4. import py2exe, sys, os
  5. import easygui
  6.  
  7. manifest = '''
  8. <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  9.       <asmv3:trustInfo xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
  10.         <asmv3:security>
  11.           <asmv3:requestedPrivileges>
  12.             <asmv3:requestedExecutionLevel
  13.               level="requireAdministrator"
  14.               uiAccess="false" />
  15.           </asmv3:requestedPrivileges>
  16.         </asmv3:security>
  17.       </asmv3:trustInfo>
  18.     </assembly>
  19. '''
  20.  
  21. file = easygui.fileopenbox("Script")
  22.  
  23. sys.argv.append('py2exe')
  24.  
  25. #windows durch console ersetzen
  26. setup(
  27.     options = {'py2exe': {'includes': "sip, PyQt5.QtNetwork, PyQt5.QtWebKit, PyQt5.QtPrintSupport", 'compressed': True}},
  28.     windows = [{'script': file,
  29.                 "icon_resources": [(1, "[Icon]")],
  30.                 #Wenn keine UAC nötig ist, folgende Zeile löschen!
  31.                 'other_resources':[(24, 1, manifest)]
  32.                 }],
  33.     data_files = [('platforms', [
  34.         'C:/Python34/Lib/site-packages/PyQt5/plugins/platforms/qwindows.dll'
  35.         ])],
  36. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement