Exemplo n.º 1
0
def freeze_windows(extra_pyinstaller_args=None):
    if extra_pyinstaller_args is None:
        extra_pyinstaller_args = []
    args = ['--windowed', '--icon',
            path('src/main/icons/Icon.ico')] + extra_pyinstaller_args
    run_pyinstaller(extra_args=args)
    _restore_corrupted_python_dlls()
    generate_resources(dest_dir=path('${freeze_dir}'))
    copy(path('src/main/icons/Icon.ico'), path('${freeze_dir}'))
    _add_missing_dlls()
Exemplo n.º 2
0
def freeze_windows(debug=False):
    args = []
    if not (debug or SETTINGS['show_console_window']):
        # The --windowed flag below prevents us from seeing any console output.
        # We therefore only add it when we're not debugging.
        args.append('--windowed')
    args.extend(['--icon', path('src/main/icons/Icon.ico')])
    run_pyinstaller(args, debug)
    _restore_corrupted_python_dlls()
    _generate_resources()
    copy(path('src/main/icons/Icon.ico'), path('${freeze_dir}'))
    _add_missing_dlls()
Exemplo n.º 3
0
def freeze_linux(extra_pyinstaller_args=None, debug=False):
    run_pyinstaller(extra_pyinstaller_args, debug)
    _generate_resources()
    copy(path('src/main/icons/Icon.ico'), path('${freeze_dir}'))
    # For some reason, PyInstaller packages libstdc++.so.6 even though it is
    # available on most Linux distributions. If we include it and run our app on
    # a different Ubuntu version, then Popen(...) calls fail with errors
    # "GLIBCXX_... not found" or "CXXABI_..." not found. So ensure we don't
    # package the file, so that the respective system's compatible version is
    # used:
    remove_shared_libraries('libstdc++.so.*', 'libtinfo.so.*',
                            'libreadline.so.*', 'libdrm.so.*')
Exemplo n.º 4
0
def freeze_windows(extra_pyinstaller_args=None, debug=False):
    if extra_pyinstaller_args is None:
        extra_pyinstaller_args = []
    pyinstaller_args = []
    if not debug:
        # The --windowed flag below prevents us from seeing any console output.
        # We therefore only add it when we're not debugging.
        pyinstaller_args.append('--windowed')
    pyinstaller_args.extend(['--icon', path('src/main/icons/Icon.ico')])
    run_pyinstaller(pyinstaller_args + extra_pyinstaller_args, debug)
    _restore_corrupted_python_dlls()
    _generate_resources()
    copy(path('src/main/icons/Icon.ico'), path('${freeze_dir}'))
    _add_missing_dlls()
Exemplo n.º 5
0
def freeze_windows(extra_pyinstaller_args=None):
    if extra_pyinstaller_args is None:
        extra_pyinstaller_args = []
    args = ['--windowed', '--icon',
            path('src/main/icons/Icon.ico')] + extra_pyinstaller_args
    run_pyinstaller(extra_args=args)
    # PyInstaller somehow corrupts python3*.dll - see:
    # https://github.com/pyinstaller/pyinstaller/issues/2526
    # Restore the uncorrupted original:
    for dll_name in ('python3.dll', 'python35.dll'):
        remove(path('target/App.app/' + dll_name))
        copy(join(dirname(sys.executable), dll_name), path('target/App.app'))
    generate_resources(dest_dir=path('target/App.app'))
    copy(path('src/main/icons/Icon.ico'), path('target/App.app'))
    _add_missing_dlls()
Exemplo n.º 6
0
def freeze_mac(extra_pyinstaller_args=None):
    if extra_pyinstaller_args is None:
        extra_pyinstaller_args = []
    if not exists(path('target/Icon.icns')):
        _generate_iconset()
        run(['iconutil', '-c', 'icns',
             path('target/Icon.iconset')],
            check=True)
    pyinstaller_args = ['--windowed', '--icon', path('target/Icon.icns')]
    bundle_identifier = SETTINGS.get('mac_bundle_identifier', '')
    if bundle_identifier:
        pyinstaller_args.extend(['--osx-bundle-identifier', bundle_identifier])
    run_pyinstaller(extra_args=pyinstaller_args + extra_pyinstaller_args)
    _remove_unwanted_pyinstaller_files()
    _fix_sparkle_delta_updates()
    generate_resources()
Exemplo n.º 7
0
def freeze_mac(debug=False):
    if not exists(path('target/Icon.icns')):
        _generate_iconset()
        run(['iconutil', '-c', 'icns',
             path('target/Icon.iconset')],
            check=True)
    args = []
    if not (debug or SETTINGS['show_console_window']):
        args.append('--windowed')
    args.extend(['--icon', path('target/Icon.icns')])
    bundle_identifier = SETTINGS['mac_bundle_identifier']
    if bundle_identifier:
        args.extend(['--osx-bundle-identifier', bundle_identifier])
    run_pyinstaller(args, debug)
    _remove_unwanted_pyinstaller_files()
    _fix_sparkle_delta_updates()
    _generate_resources()
def freeze_windows(extra_pyinstaller_args=None):
    if extra_pyinstaller_args is None:
        extra_pyinstaller_args = []
    args = ['--windowed', '--icon',
            path('src/main/icons/Icon.ico')] + extra_pyinstaller_args
    run_pyinstaller(extra_args=args)
    # PyInstaller somehow corrupts python3*.dll - see:
    # https://github.com/pyinstaller/pyinstaller/issues/2526
    # Restore the uncorrupted original:
    python_dlls = ('python%s.dll' % sys.version_info.major, 'python%s%s.dll' %
                   (sys.version_info.major, sys.version_info.minor))
    for dll_name in python_dlls:
        remove(path('${freeze_dir}/' + dll_name))
        copy(join(dirname(sys.executable), dll_name), path('${freeze_dir}'))
    generate_resources(dest_dir=path('${freeze_dir}'))
    copy(path('src/main/icons/Icon.ico'), path('${freeze_dir}'))
    _add_missing_dlls()