mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-28 10:18:39 +09:00
26 lines
735 B
Python
26 lines
735 B
Python
#!/usr/bin/env python
|
|
|
|
import os
|
|
import sys
|
|
|
|
from macholib.MachOStandalone import MachOStandalone
|
|
from macholib.util import strip_files
|
|
|
|
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)
|
|
|
|
def main():
|
|
print("WARNING: 'macho_standalone' is deprecated, use 'python -mmacholib standalone' instead")
|
|
if not sys.argv[1:]:
|
|
raise SystemExit('usage: %s [appbundle ...]' % (sys.argv[0],))
|
|
for fn in sys.argv[1:]:
|
|
standaloneApp(fn)
|
|
|
|
if __name__ == '__main__':
|
|
main()
|