Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- from distutils.core import setup
- import py2exe, sys, os
- import easygui
- manifest = '''
- <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <asmv3:trustInfo xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
- <asmv3:security>
- <asmv3:requestedPrivileges>
- <asmv3:requestedExecutionLevel
- level="requireAdministrator"
- uiAccess="false" />
- </asmv3:requestedPrivileges>
- </asmv3:security>
- </asmv3:trustInfo>
- </assembly>
- '''
- file = easygui.fileopenbox("Script")
- sys.argv.append('py2exe')
- #windows durch console ersetzen
- setup(
- options = {'py2exe': {'includes': "sip, PyQt5.QtNetwork, PyQt5.QtWebKit, PyQt5.QtPrintSupport", 'compressed': True}},
- windows = [{'script': file,
- "icon_resources": [(1, "[Icon]")],
- #Wenn keine UAC nötig ist, folgende Zeile löschen!
- 'other_resources':[(24, 1, manifest)]
- }],
- data_files = [('platforms', [
- 'C:/Python34/Lib/site-packages/PyQt5/plugins/platforms/qwindows.dll'
- ])],
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement