How to use the fbs.freeze._generate_resources function in fbs

To help you get started, we’ve selected a few fbs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mherrmann / fbs / tests / test_fbs / test_freeze.py View on Github external
def test_generate_resources(self):
        self.init_fbs('Mac')
        _generate_resources()
        info_plist = path('${freeze_dir}/Contents/Info.plist')
        self.assertTrue(exists(info_plist))
        with open(info_plist) as f:
            self.assertIn(
                'MyApp', f.read(), "Did not replace '${app_name}' by 'MyApp'"
            )
github mherrmann / fbs / fbs / freeze / mac.py View on Github external
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()
github mherrmann / fbs / fbs / freeze / linux.py View on Github external
def freeze_linux(debug=False):
    run_pyinstaller(debug=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.*'
    )
github mherrmann / fbs / fbs / freeze / windows.py View on Github external
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()