示例#1
0
 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'")
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()
示例#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.*')
示例#4
0
文件: windows.py 项目: kkoojjyy/fbs
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()
示例#5
0
def freeze_mac(extra_pyinstaller_args=None, debug=False):
    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['mac_bundle_identifier']
    if bundle_identifier:
        pyinstaller_args.extend(['--osx-bundle-identifier', bundle_identifier])
    run_pyinstaller(pyinstaller_args + extra_pyinstaller_args, debug)
    _remove_unwanted_pyinstaller_files()
    _fix_sparkle_delta_updates()
    _generate_resources()
示例#6
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()