import cx_Freeze executables = [cx_Freeze.Executable('run.py')] cx_Freeze.setup( name='Zombie VS World', options={'build_exe': { 'packages': ['pygame'], 'include_files': ['png/'] }}, executables=executables)
import sys import cx_Freeze base = None if (sys.platform == 'win32'): base = "Win32GUI" executables = [ cx_Freeze.Executable("main.py", shortcut_name="mesScriptAsseAndDisassembler", shortcut_dir="mesScriptAsseAndDisassembler") ] cx_Freeze.setup( name="mesScriptAsseAndDisassembler", version="1.2", description= "Dual languaged (rus+eng) tool for packing and unpacking mes scripts of Silky Engine.\n" "Двухязычное средство (рус+англ) для распаковки и запаковки скриптов mes Silky Engine.", options={"build_exe": { "packages": [] }}, executables=executables)
import cx_Freeze import os os.environ['TCL_LIBRARY'] ="C:\\Users\\toshiba\\AppData\\Local\\Programs\\Python\\Python36\\tcl\\tcl8.6" os.environ['TK_LIBRARY'] ="C:\\Users\\toshiba\\AppData\\Local\\Programs\\Python\\Python36\\tcl\\tk8.6" executables = [cx_Freeze.Executable("Tanks War.py")] cx_Freeze.setup( name = "Tanks War", options={"build_exe":{"packages":["pygame"],"include_files":["exp_sound.wav", "fire_sound.wav"]}}, description = "Tanks War Game in Python", executables = executables ) #to setup in the comandline without installer put the path: #C:>Users>toshiba>AppData>Local>Programs>Python>Python36>python setup.py build #to setup in the commandline with installer: #C:>Users>toshiba>AppData>Local>Programs>Python>Python36>python setup.py bdist_msi
os.path.dirname(jupyter_client.__file__)), os.path.join(unpacked_eggs_dir, os.path.dirname(traitlets.__file__)), os.path.join(unpacked_eggs_dir, os.path.dirname( numpy.__file__)), ] + missing_dlls, }, 'bdist_msi': { 'initial_target_dir': '[ProgramFilesFolder]\\UAVCAN\\' + HUMAN_FRIENDLY_NAME, }, } args['executables'] = [ cx_Freeze.Executable(os.path.join('bin', PACKAGE_NAME), base='Win32GUI', icon=ICON_ICO, shortcutName=HUMAN_FRIENDLY_NAME, shortcutDir='ProgramMenuFolder'), ] # Dispatching to cx_Freeze only if MSI build was requested explicitly. Otherwise continue with regular setup. # This is done in order to be able to install dependencies with regular setuptools. # TODO: This is probably not right. def setup(*args, **kwargs): # Checking preconditions and such signtool_path = get_windows_signtool_path() print('Using this signtool:', signtool_path) pfx_path = glob.glob(os.path.join('..', '*.pfx')) if len(pfx_path) != 1: raise RuntimeError(
os.environ['TCL_LIBRARY'] = "C:\\Python36\\tcl\\tcl8.6" os.environ['TK_LIBRARY'] = "C:\\Python36\\tcl\\tk8.6" #Next, add statements to identify the base platform in use base = None if sys.platform == 'win32': base = 'Win32GUI' #Now, add a statement listing the include options opts = {'include_files': ['logo.png'], 'includes': ['re']} #Finally, add a call to the setup() function passing all #information as arguments setup(name='Lotto', version='1.0', description='Lottery Number Picker', author='Jamie Andrews', options={'build_exe': opts}, executables=[cx_Freeze.Executable('lotto.py', base=None)]) #Save the file alongside the application files then run the #setup script to build the distributable bundle #Wait until the build process creates a bundle of files in #the "build" sub-directory then copy the whole bundle #onto portable media, such as a USB flash drive #Now, copy the bundle onto another #computer where Python may not be #present and run the executable file - to see #the application launch
import cx_Freeze exe = [cx_Freeze.Executable("Dimensions.py", base="Win32GUI")] # <-- HERE cx_Freeze.setup( name="Mizatorian LM0B 20", version="1.0", options={ "build_exe": { "packages": ["pygame", "random", "math", "sys"], "include_files": ["music.mid", "bounce.wav", "crash.wav", "wall.wav", "at01.ttf"] } }, executables=exe)
json.dump(manifest, open(manifestpath, "wt"), indent=4) print("Created Manifest") scripts = {"MultiClient.py" : "BerserkerMultiClient", "MultiMystery.py" : "BerserkerMultiMystery", "MultiServer.py" : "BerserkerMultiServer", "gui.py" : "BerserkerMultiCreator", "Mystery.py" : "BerserkerMystery"} exes = [] for script, scriptname in scripts.items(): exes.append(cx_Freeze.Executable( script=script, targetName=scriptname + ("" if sys.platform == "linux" else ".exe"), icon=icon, )) import datetime buildtime = datetime.datetime.utcnow() cx_Freeze.setup( name="BerserkerMultiWorld", version=f"{buildtime.year}.{buildtime.month}.{buildtime.day}.{buildtime.hour}", description="BerserkerMultiWorld", executables=exes, options={ "build_exe": {
""" Set Up Script """ import cx_Freeze executables = [cx_Freeze.Executable("ParticleFilter.py")] cx_Freeze.setup(name="Particle Filter Simulation", options={ "build_exe": { "packages": ["pygame", "random", "math"], "include_files": [ "cat_roomba2.png", "draw_functions.py", "Event_and_Movement.py", "landmarks.py", "Particle.py", "settings.py" ] } }, executables=executables)
"DesktopShortcut", # Shortcut "DesktopFolder", # Directory_ "music player", # Name "TARGETDIR", # Component_ "[TARGETDIR]\PygameWordgame.exe", # Target None, # Arguments None, # Description None, # Hotkey None, # Icon None, # IconIndex None, # ShowCmd "TARGETDIR", # WkDir )] msi_data = {"Shortcut": shortcut_table} # Change some default MSI options and specify the use of the above defined tables bdist_msi_options = {'data': msi_data} executables = [cx_Freeze.Executable(script="new.py", icon='cc.ico', base=base)] cx_Freeze.setup(version="1.0", description="music player", name="new.py", options={ "build_exe": { "packages": ["pygame", "vlc", "tkinter", "os"], "include_files": ['cc.ico'] }, "bdist_msi": bdist_msi_options, }, executables=executables)
import sys import cx_Freeze executables = [cx_Freeze.Executable("HomeScreen.py")] base = None if sys.platform == "win32": base = "Win32GUI" cx_Freeze.setup( name="Conway's Game of Life", version = "0.1", options={"build_exe": {"packages":["pygame", "tkinter"], "include_files": ["AboutCGOL.py", "game_description.txt", "GameOfLife.py", "key_commands.txt", "KeyCommands.py"]}}, executables = executables )
import cx_Freeze import sys import os base = None if sys.platform == 'win32': base = "Win32GUI" os.environ['TCL_LIBRARY'] = r"C:\Users\DELL\AppData\Local\Programs\Python\Python38-32\tcl\tcl8.6" os.environ['TK_LIBRARY'] = r"C:\Users\DELL\AppData\Local\Programs\Python\Python38-32\tcl\tk8.6" executables = [cx_Freeze.Executable("TextEditor.py", base=base, icon="icon.ico")] cx_Freeze.setup( name = "CP TextEditor", options = {"build_exe": {"packages":["tkinter","os"], "include_files":["icon.ico",'tcl86t.dll','tk86t.dll', 'icons2']}}, version = "0.01", description = "Tkinter Application", executables = executables )
'numpy.core._methods', 're', 'numpy.matlib', 'matplotlib.backends.backend_tkagg', 'FileDialog', 'lxml._elementpath' ] includefiles_list = [(matplotlib.get_data_path(), "mpl-data")] scipy_path = os.path.dirname(scipy.__file__) includefiles_list.append(scipy_path) packages = ["Tkinter", "tkFileDialog"] excludes = ["collections.abc"] build_exe_options = { "includes": includes, 'include_files': includefiles_list, 'packages': packages, "excludes": excludes } exe = cx_Freeze.Executable( script="main2.py", base="Win32GUI", ) cx_Freeze.setup(name="wxSampleApp", version="0.1", description="An example wxPython script", options={"build_exe": build_exe_options}, executables=[exe])
('MenuShortcut', 'ProgramMenuFolder', 'ABQ Data Entry', 'TARGETDIR', '[TARGETDIR]' + target_name, None, 'Data Entry application for ABQ Agrilabs', None, None, None, None, 'TARGETDIR'), ] cx.setup( name='ABQ_Data_Entry', version='1.0', author='Alan D Moore', author_email='*****@*****.**', description='Data entry application for ABQ Agrilabs', url="http://abq.example.com", packages=['abq_data_entry'], executables=[ cx.Executable('abq_data_entry.py', base=base, targetName=target_name, icon='abq.ico')], options={ 'build_exe': { 'packages': ['psycopg2', 'requests', 'matplotlib', 'numpy'], 'includes': ['idna.idnadata', 'zlib'], 'excludes': ['PyQt4', 'PyQt5', 'PySide', 'IPython', 'jupyter_client', 'jupyter_core', 'ipykernel', 'ipython_genutils'], 'include_files': include_files }, 'bdist_msi': { # can be generated in powershell: "{"+[System.Guid]::NewGuid().ToString().ToUpper()+"}" 'upgrade_code': '{12345678-90AB-CDEF-1234-567890ABCDEF}', 'data': {'Shortcut': shortcut_data} }, 'bdist_mac': {
import cx_Freeze import sys import os import os.path import re import clips import tkinter if sys.platform == 'win32': base = 'Win32GUI' PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__)) os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6') os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6') executables = [cx_Freeze.Executable('es.py')] cx_Freeze.setup(name='Lung Diagnosis', version='0.01', executables=executables, options={ "build_exe": { "packages": ["tkinter", "re", "clips"], 'include_files': [ os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6'), os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6') ] } })
import cx_Freeze import sys base = None if sys.platform == 'win32': base = 'Win32GUI' executables = [cx_Freeze.Executable("port_scanner.py", base=base)] cx_Freeze.setup( name='port_scanner', options={'build_exe': { 'packages': ['tkinter', 'socket', 'threading'] }}, version='1.0', description='Scan open ports', executables=executables)
import cx_Freeze executables = [cx_Freeze.Executable("snake.py", base="Win32GUI")] build_exe_options = { "packages": ["pygame"], "include_files": [ "arcadeclassic.ttf", "iconRetroSnakeG64.png", "logoIconRetroSnake100x100.png", "BeepSnake.ogg", "GameOverSnake.ogg", "PauseOffSnake.ogg", "PauseOnSnake.ogg", "SongOfSnake.ogg" ] } cx_Freeze.setup(name="RetroSnake", version="1.0.0", description="Recreacion Retro del popular Snake", options={"build_exe": build_exe_options}, executables=executables) #Comando a ejecutar en cmd dentro de la carpeta #>>> python setup.py build
import cx_Freeze import os os.environ['TCL_LIBRARY'] = 'C:\\Program Files\\Python35\\tcl\\tcl8.6' os.environ['TK_LIBRARY'] = 'C:\\Program Files\\Python35\\tcl\\tk8.6' executables = [cx_Freeze.Executable(script='main.py', icon='ELEM.ico')] cx_Freeze.setup( name='Project ELEM', version="1.0", options={ 'build_exe': { 'packages': ['pico2d'], 'include_files': ['./Resources/', './SDL2/', 'Record.txt', 'GameInit.txt'] } }, executables=executables)
import cx_Freeze import sys executables = [cx_Freeze.Executable("Simulation.py")] base = None if sys.platform == "win32": base = "Win32GUI" cx_Freeze.setup(name="guifoo", version="0.1", description="My GUI application!", options={ "build_exe": { "packages": [ "numpy", "pygame", "pandas", "matplotlib", "pickle", "path", "random", "noise", "sklearn.linear_model", "tkinter" ], "include_files": [] } }, executables=executables)
import cx_Freeze import os.path PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__)) os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6') os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6') executables = [cx_Freeze.Executable("GameRun.py")] cx_Freeze.setup(name="TowersOfHanoi", options={ "build_exe": { "packages": ["pygame"], "include_files": [ "background.png", "bottomdisk.png", "four.png", "middledisk.png", "selecttriangle.png", "thirddisk.png", "three.png", "topdisk.png", os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'), os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll'), ] } }, executables=executables, version='1.0.0')
import cx_Freeze executables = [cx_Freeze.Executable("game.py")] cx_Freeze.setup( name="Dodger", version="1.0", description="Dodge The Blocks", options={"build_exe":{"packages":["pygame"], "include_files":["racecar.png","carIcon.png","crash.wav","music.mp3"]}}, executables = executables )
import cx_Freeze executables = [cx_Freeze.Executable("snake.py")] cx_Freeze.setup(name="Snake", options={ "build.exe": { "packages": ["pygame"], "included_files": [ "icon.png", "snakehead.jpg", "snakebody.jpg", "food1.jpg", "food2.jpg", "food3.jpg", "food4.jpg", "food5.jpg", "food6.jpg", "food7.jpg" ] } }, description="Snake game", executables=executables)
#!/usr/bin/env python3 import cx_Freeze from cx_Freeze import * executables = [cx_Freeze.Executable("newga.py")] setup( name="newga", options={'build_exe':{'packages':['pygame']}}, executables=executables )
import cx_Freeze executables = [cx_Freeze.Executable("fivechessonline21.py")] cx_Freeze.setup( name = "Five-Chess", options = {"build_exe": {"packages": ["pygame"], "include_files": ["./sources/pics/board.png", "./sources/pics/cp_k_29.png", "./sources/pics/cp_w_29.png", "./sources/pics/panel.png", "./sources/pics/catsmall.png", "./sources/music/BackgroundMusic.ogg", "./sources/music/Snd_click.ogg"]}}, executables = executables ) ##cx_Freeze.setup( ## name = "Five-Chess", ## options = {"build_exe": {"packages": ["pygame"], ## "include_files": ["board.png", ## "cp_k_29.png", ## "cp_w_29.png", ## "panel.png", ## "catsmall.png", ## "BackgroundMusic.ogg", ## "Snd_click.ogg"]}}, ## executables = executables ## )
import cx_Freeze executables = [cx_Freeze.Executable('Cipher.py')] cx_Freeze.setup(name='Transposition Cipher', options={ "build_exe": { "packages": ["os"], "include_files": ["about.txt", "helpfile.txt"] } }, description="Transposition Cipher", executables=executables)
def run(self): self.error = None metadata = Metadata() metadata.version = self.profile["version"] metadata.long_description = self.profile["comments"] metadata.description = self.profile["description"] metadata.author = self.profile["author"] metadata.name = self.profile["name"] if self.profile["base"] == "Console": base = "ConsoleKeepPath" else: base = "Win32GUI" initScript = None if self.profile["icon"] in os.listdir( self.projectPathDict['iconsdir']): iconPath = os.path.join(self.projectPathDict['iconsdir'], self.profile["icon"]) else: iconPath = None if self.profile["compress"] == 'Compress': compress = True else: compress = False if self.profile["optimize"] == "Don't Optimize": optimizeFlag = 0 elif self.profile["optimize"] == 'Optimize': optimizeFlag = 1 elif self.profile["optimize"] == "Optimize (Remove Doc Strings)": optimizeFlag = 2 if self.profile["copydeps"] == 'Copy Dependencies': copyDependentFiles = True else: copyDependentFiles = False if self.profile["appendscripttoexe"] == 'Append Script to Exe': appendScriptToExe = True else: appendScriptToExe = False if self.profile["appendscripttolibrary"] == 'Append Script to Library': appendScriptToLibrary = True else: appendScriptToLibrary = False includes = self.profile["Includes"] excludes = self.profile["Excludes"] replacePaths = self.profile["Replace Paths"] binIncludes = self.profile["Bin Includes"] binExcludes = self.profile["Bin Excludes"] binPathIncludes = self.profile["Bin Path Includes"] binPathExcludes = self.profile["Bin Path Excludes"] includeFiles = self.profile["Include Files"] zipIncludes = self.profile["Zip Includes"] namespacePackages = self.profile["Namespace Packages"] constantsModules = self.profile["Constants Modules"] packages = self.profile["Packages"] try: executables = [ cx_Freeze.Executable( self.projectPathDict['mainscript'], icon=iconPath, targetDir=self.projectPathDict['builddir'], initScript=initScript, base=base) ] if self.projectSettings["UseVirtualEnv"] == "True": venv_path = self.projectPathDict["venvdir"] path = [ self.projectPathDict['sourcedir'], os.path.join(venv_path, "Scripts"), os.path.join(venv_path, "Lib"), os.path.join(venv_path, "Lib", "site-packages"), os.path.join(venv_path, "Include") ] else: py_path = os.path.dirname( self.projectSettings["DefaultInterpreter"]) path = [ self.projectPathDict['sourcedir'], py_path, os.path.join(py_path, "DLLs"), os.path.join(py_path, "libs"), os.path.join(py_path, "Lib"), os.path.join(py_path, "Lib", "site-packages"), os.path.join(py_path, "include") ] extraPathList = [] for i in path: extraPathList.extend(self.pathListFromDir(i)) path.extend(extraPathList) freezer = Cx_Freeze(executables, self.projectPathDict, self.useData, base=base, icon=iconPath, metadata=metadata, initScript=initScript, path=path, compress=compress, optimizeFlag=optimizeFlag, copyDependentFiles=copyDependentFiles, appendScriptToExe=appendScriptToExe, appendScriptToLibrary=appendScriptToLibrary, includes=includes, excludes=excludes, replacePaths=replacePaths, binIncludes=binIncludes, binExcludes=binExcludes, binPathIncludes=binPathIncludes, binPathExcludes=binPathExcludes, includeFiles=includeFiles, zipIncludes=zipIncludes, namespacePackages=namespacePackages, constantsModules=constantsModules, packages=packages) freezer.Freeze() badModules = freezer.finder._badModules names = list(badModules.keys()) names.sort() self.missing = [] for name in names: callers = list(badModules[name].keys()) callers.sort() self.missing.append("? {0} imported from {1}".format( name, ", ".join(callers))) except Exception as err: exc_type, exc_value, exc_traceback = sys.exc_info() logging.error( repr( traceback.format_exception(exc_type, exc_value, exc_traceback))) self.error = str(err)
import cx_Freeze import os import sys os.environ['TCL_LIBRARY'] = r'C:\Users\Marcus\Python36-32\tcl\tcl8.6' os.environ['TK_LIBRARY'] = r'C:\Users\Marcus\Python36-32\tcl\tk8.6' sys.path.append(os.path.abspath('../CastleofthePython7062018p2')) packages = ["pygame", "Pil", "peewee"] files = ["world/", "actions/", "weapons/", "monsters/", 'tables.db'] includes = ["scripts/"] base = None if sys.platform == "win32": base = "Win32GUI" executables = [cx_Freeze.Executable("game.py", base=base, icon="icon.ico")] # shortcut table shortcut_table = [( "DesktopShortcut", # Shortcut "DesktopFolder", # Directory_ "Castle Of The Python", # Name "TARGETDIR", # Component_ "[TARGETDIR]\game.exe", # Target None, # Arguments None, # Description None, # Hotkey "", # Icon 0, # IconIndex None, # ShowCmd "TARGETDIR", # WkDir )]
import cx_Freeze as cx include_files = [('abq_data_entry/images', 'images')] cx.setup(name='ABQ_Data_Entry', version='1.0', author='Alan D Moore', author_email='*****@*****.**', description='Data entry application for ABQ Agrilabs', url="http://abq.example.com", packages=['abq_data_entry'], executables=[ cx.Executable('abq_data_entry.py', targetName='abq', icon='abq.ico') ], options={ 'build_exe': { 'packages': ['psycopg2', 'requests', 'matplotlib', 'numpy'], 'includes': ['idna.idnadata', 'zlib'], 'include_files': include_files } })
'crosscat.utils.inference_utils', 'crosscat.utils.mutual_information_test_utils', 'crosscat.utils.timing_test_utils', 'crosscat.utils.convergence_test_utils', 'crosscat.LocalEngine', 'crosscat.HadoopEngine', 'crosscat.cython_code.State', 'crosscat.utils.xnet_utils', 'crosscat.utils.general_utils', 'crosscat.utils.sample_utils', 'numpy', 'sklearn.metrics', 'sklearn.utils.lgamma', 'scipy.special', 'scipy.sparse.csgraph._validation', ] buildOptions = dict( excludes=excludes, includes=includes, compressed=False, ) executables = [cx_Freeze.Executable("hadoop_line_processor.py", base=None)] cx_Freeze.setup(name="hadoop_line_processor", version="0.1", description="process arbitrary engine commands on hadoop", executables=executables, options=dict(build_exe=buildOptions))
import cx_Freeze executables = [cx_Freeze.Executable( script="game.py", icon="assets/ico-reciclagem.ico")] cx_Freeze.setup( name="Jogo da Reciclagem", options={"build_exe": {"packages": ["pygame"], "include_files": ["assets","funcoes.py"]}}, executables=executables )
import cx_Freeze executables = [cx_Freeze.Executable('game.py')] cx_Freeze.setup( name="A Bit Racey", options={ "build_exe":{"packages":["pygame"],"include_files":["images/racecar.png"]} }, executables= executables )