Bin To Pkg -
When you copy a binary into root/, it retains its Unix permissions. But if you rebuild from a source that doesn't preserve the executable bit, the installed file will be non-executable. Always chmod 755 on binaries and chmod 644 on conf files before building.
xcrun notarytool submit signed-ffmpeg.pkg --apple-id "user@me.com" --team-id "ABCDE" --wait
file_type=$(file -b "$INPUT_BIN")
If you are currently releasing raw binaries, here is how to switch to a Pkg mindset:
If the disc contains a folder like AppName/ with binaries, frameworks, and resources, you will create a PKG, not "convert" the BIN. bin to pkg
Create a PKG from the extracted folder:
# Using pkgbuild (built into macOS)
pkgbuild --root /Volumes/MyDisc/MyAppFolder \
--identifier com.mycompany.myapp \
--version 1.0 \
--install-location /Applications/MyApp \
MyApp.pkg
Now you have turned the data from the BIN into a PKG. When you copy a binary into root/ ,
Before attempting any conversion, you must identify what you are actually holding.
Sometimes you don't have a single binary, but a whole application bundle (.app). The principle is identical: Now you have turned the data from the BIN into a PKG
pkgbuild --root ./MyApp.app \
--component ./MyApp.app \
--install-location /Applications \
MyApp.pkg
This tells the system to treat the binary inside the .app as a component.