Advertising
- Anonymous
- Wednesday, January 16th, 2013 at 4:10:04pm MST
- import glob
- import os
- import shutil
- import sys
- from cx_Freeze import setup, Executable
- from PyQt4 import QtCore
- app = QtCore.QCoreApplication(sys.argv)
- qt_library_path = QtCore.QCoreApplication.libraryPaths()
- buildexe_options = {
- 'compressed' : True,
- 'optimize' : 2
- }
- imageformats_path = None
- for path in qt_library_path:
- if os.path.exists(os.path.join(path, 'imageformats')):
- imageformats_path = os.path.join(path, 'imageformats')
- local_imageformats_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'imageformats')
- buildexe_options['include_files'] = ['imageformats']
- if not os.path.exists(local_imageformats_path):
- os.mkdir(local_imageformats_path)
- for file in glob.glob(os.path.join(imageformats_path, '*')):
- shutil.copy(file, os.path.join(local_imageformats_path, os.path.basename(file)))
- setup(
- name='Bodenpython',
- version='0.1',
- description='Orksokopter Bodenstation',
- executables=[
- Executable('serial_port_handler.py'),
- Executable('gui/main_window.py',
- icon='gui/resources/app.ico',
- base="Win32GUI" if sys.platform == "win32" else None)
- ],
- options={
- 'build_exe' : buildexe_options
- }
- )
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.