# ======================================================== # # File automagically generated by GUI2Exe version 0.5.0 # Copyright: (c) 2007-2009 Andrea Gavana # ======================================================== # # Let's start with some default (for me) imports... from distutils.core import setup from py2exe.build_exe import py2exe import glob import os import zlib import shutil # Remove the build folder shutil.rmtree("build", ignore_errors=True) class Target(object): """ A simple class that holds information on our executable file. """ def __init__(self, **kw): """ Default class constructor. Update as you need. """ self.__dict__.update(kw) # Ok, let's explain why I am doing that. # Often, data_files, excludes and dll_excludes (but also resources) # can be very long list of things, and this will clutter too much # the setup call at the end of this file. So, I put all the big lists # here and I wrap them using the textwrap module. data_files = [('translations', ['P:\\video4fuze\\translations\\v4f_ca.qm', 'P:\\video4fuze\\translations\\v4f_de.qm', 'P:\\video4fuze\\translations\\v4f_en.qm', 'P:\\video4fuze\\translations\\v4f_es.qm']), ('.', ['P:\\video4fuze\\CHANGELOG.txt', 'P:\\video4fuze\\ffmpeg.exe', 'P:\\video4fuze\\fuzemux.exe', 'P:\\video4fuze\\LICENSE.html', 'P:\\video4fuze\\LICENSE.txt', 'P:\\video4fuze\\mencoder.exe', 'P:\\video4fuze\\README.txt'])] includes = ['sip'] excludes = ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'email', 'pywin.debugger', 'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl', 'Tkconstants', 'Tkinter'] packages = [] dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 'tcl84.dll', 'tk84.dll'] icon_resources = [(1, 'P:\\video4fuze\\icons\\black.ico')] bitmap_resources = [] other_resources = [] # This is a place where the user custom code may go. You can do almost # whatever you want, even modify the data_files, includes and friends # here as long as they have the same variable name that the setup call # below is expecting. # No custom code added # Ok, now we are going to build our target class. # I chose this building strategy as it works perfectly for me :-D GUI2Exe_Target_1 = Target( # what to build script = "video4fuze.pyw", icon_resources = icon_resources, bitmap_resources = bitmap_resources, other_resources = other_resources, dest_base = "video4fuze", version = "0.6", company_name = "ssorgatem", copyright = "Adrian Cereto Massague", name = "video4fuze", author_email = 'ssorgatem@esdebian.org', url = 'http://code.google.com/p/video4fuze', license = 'GPLv3', author = 'Adrian Cereto Massague', ) GUI2Exe_Target_2 = Target( # what to build script = "fuze.py", icon_resources = icon_resources, bitmap_resources = bitmap_resources, other_resources = other_resources, dest_base = "fuze", version = "0.6", company_name = "ssorgatem", copyright = "Adrian Cereto Massague", name = "video4fuze CLI", ) # No custom class for UPX compression or Inno Setup script # That's serious now: we have all (or almost all) the options py2exe # supports. I put them all even if some of them are usually defaulted # and not used. Some of them I didn't even know about. setup( # No UPX or Inno Setup data_files = data_files, options = {"py2exe": {"compressed": 0, "optimize": 2, "includes": includes, "excludes": excludes, "packages": packages, "dll_excludes": dll_excludes, "bundle_files": 3, "dist_dir": "dist/win32", "xref": False, "skip_archive": False, "ascii": False, "custom_boot_script": '', } }, zipfile = None, console = [GUI2Exe_Target_2], windows = [GUI2Exe_Target_1], service = [], com_server = [], ctypes_com_server = [] ) # This is a place where any post-compile code may go. # You can add as much code as you want, which can be used, for example, # to clean up your folders or to do some particular post-compilation # actions. # No post-compilation code added # And we are done. That's a setup script :-D