Example #1
0
def standaloneApp(path):
    if not os.path.isdir(path) and os.path.exists(
            os.path.join(path, 'Contents')):
        raise SystemExit('%s: %s does not look like an app bundle' %
                         (sys.argv[0], path))
    files = MachOStandalone(path).run()
    strip_files(files)
Example #2
0
def standaloneApp(path):
    if not os.path.isdir(path) and os.path.exists(
            os.path.join(path, 'Contents')):
        raise SystemExit('%s: %s does not look like an app bundle'
            % (sys.argv[0], path))
    files = MachOStandalone(path).run()
    strip_files(files)
Example #3
0
def strip_files_and_report(files, verbose):
    unstripped = 0
    stripfiles = []
    for fn in files:
        unstripped += os.stat(fn).st_size
        stripfiles.append(fn)
        log.info("stripping %s", os.path.basename(fn))
    strip_files(stripfiles)
    stripped = 0
    for fn in stripfiles:
        stripped += os.stat(fn).st_size
    log.info("stripping saved %d bytes (%d / %d)", unstripped - stripped, stripped, unstripped)
Example #4
0
def strip_files_and_report(files, verbose):
    unstripped = 0
    stripfiles = []
    for fn in files:
        unstripped += os.stat(fn).st_size
        stripfiles.append(fn)
        log.info('stripping %s', os.path.basename(fn))
    strip_files(stripfiles)
    stripped = 0
    for fn in stripfiles:
        stripped += os.stat(fn).st_size
    log.info('stripping saved %d bytes (%d / %d)', unstripped - stripped,
             stripped, unstripped)
Example #5
0
def standaloneApp(path):
    if not (os.path.isdir(path) and os.path.exists(os.path.join(path, "Contents"))):
        print("%s: %s does not look like an app bundle" % (sys.argv[0], path))
        sys.exit(1)
    files = MachOStandalone(path).run()
    strip_files(files)