When you develop a lot of python applications and you want that your next script is close sourced, then you are right with this article. I explain you have to compile a python application and generate a msi Windows installer. For that i use cx_Freeze.
Built Script:
company_name = 'Marcins Programms' product_name = 'Sokrates' bdist_msi_options = { 'upgrade_code': '{Banana-rama-30403344939493}', 'add_to_path': False, 'initial_target_dir': r'[ProgramFilesFolder]\%s\%s' % (company_name, product_name), } path = sys.path build_exe_options = { "path": path, "icon": "brain.ico"} base = None if sys.platform == "win32": base = "Win32GUI" exe = Executable(script='Sokrates__PYMATH.py', base=base, icon='brain.ico', ) setup( name = "Sokrates", version = "1.1", description = "Powerfull Calculator for all plattforms", executables = [exe], options = {'bdist_msi': bdist_msi_options})run this script with a batch file:
py build.py build
py build.py bdist_msi
You need cx_freeze
No comments:
Post a Comment