Search the Community
Showing results for tags 'multi architecture'.
-
The following thinapp.py Python 3 script can be used on macOS systems to thin the multi-architecture Affinity apps (the FAT binaries, containing "x86_64" and "arm64" architectures) to the one only specific architecture just required by the particular Mac platform ("x86_64" or "arm64"). This will reclaim some disk space. Important prerequisites in order to make use of the thinapp.py Python script: Python 3 is installed on your MacOS system MacOS lipo from the Xcode development CLI tools is installed and can be find under /usr/bin/lipo ...or... an alternative GO based lipo from https://github.com/konoui/lipo/ A working file command is available and can be find under /usr/bin/file In order to check for the needed prerequisites, you can perform a corresponding which command execution in Terminal.app: > which python3 /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 > which lipo /usr/bin/lipo > which file /usr/bin/file If all of the above prerequisites are met, you can execute the thinapp.py Python 3 script in Terminal.app like this to get a short help overview... If you apply execution rights to the thinapp.py Python 3 script, via "chmod +x thinapp.py" in Terminal.app, then you can also execute the script via it's filename directly just by calling it, aka thinapp.py or thinapp.py -h . For the -arch option argument supported architectures are x86_64 or arm64, in order to thin an app to an just Intel or Arm platform specific app only here! Now in order to thin let's say Affinity Designer.app to contain just the Intel "x86_64" architecture and thus to strip out the "arm64" architecture from it's FAT binary app, you would call thinapp.py this way ... ... which in turn would then create a duplicate copy of "Affinity Designer.app" under the by the -o option as argument given file path "/Users/<yourusername>/tmp" and then process to thin it there under the "/Users/<yourusername>/tmp/Affinity Designer.app" file path. The as -arch option given x86_64 argument tells thinapp.py to keep just that x86_64 architecture, meaning that the arm64 architecture will be stripped out of the FAT binary app. After the script has finished it's work, you can compare the ADe sizes under "/Applications/Affinity Designer.app" and "/Users/<yourusername>/tmp/Affinity Designer.app" in order to see how much space has been reclaimed due to the architecture thinning process. Next you can start the thinned app from "/Users/<yourusername>/tmp/Affinity Designer.app" in order to see if it operates well. - If all is fine, you can remove the initial "/Applications/Affinity Designer.app" and replace it with the thinned one from "/Users/<yourusername>/tmp/Affinity Designer.app" (... so exchanging the initial with the thinned app). What you can expect from thinning the V1 apps of ADe, APh and APub size wise is ... ADe v1 = initially ~2.59 GB after thinning to x86_64 it has then ~1.69 GB APh v1 = initially ~2.65 GB after thinning to x86_64 it has then ~1.71 GB APub v1 = initially ~2.60 GB after thinning to x86_64 it has then ~1.65 GB Here's the thinapp.py Python 3 script: thinapp.py <-- has been updated! And as always, have fun!
- 4 replies
-
- macos
- affinity apps
-
(and 7 more)
Tagged with: