The installer completes successfully for a clean system, but fails when upgrading from an older version of your software.

While .pkg files look cleaner on your system, they have specific trade-offs compared to running raw .bin or .iso files through managers like

Check the permissions of the binary within your payload directory. The PKG preserves the permissions you set before building. Use chmod 755 on the binary to ensure it is executable for all users. Remember that system directories like /usr/local/bin require root privileges for writing, but the installer handles this elevation transparently.

: Use tools like makepkg for Arch Linux or dpkg-deb for Debian-based systems to ensure your package is built consistently every time.

<?xml version="1.0" encoding="utf-8"?> <installer-gui-script minSpecVersion="1.0"> <title>My Application</title> <license file="LICENSE.txt" mime-type="text/plain"/> <readme file="README.txt"/> <pkg-ref id="com.yourcompany.myapp"/> <choices-outline> <line choice="default"> <line choice="com.yourcompany.myapp"/> </line> </choices-outline> <choice id="default" visible="false"/> <choice id="com.yourcompany.myapp" visible="true"> <pkg-ref id="com.yourcompany.myapp"/> </choice> <pkg-ref id="com.yourcompany.myapp" version="1.0.0" onConclusion="none">component.pkg</pkg-ref> </installer-gui-script>