In the last years I have used the Packages Installer for my macOS apps.
But since the obligation to notarize the apps, I can’t use the Packages Installer Builder anymore, because the notarization fails, don’t know why.
I have found 2 alternatives that I would like to share.
the pkgbuild script of Magic Miyako which can be found in the source code here:
Advantage you just have to copy the code and integrate it into your own application.
the very simple version to build a pkg
You have to create a payload root directory, in my picture “payload” and a scripts directory
34224064;“Your comment here…”[/]
Inside payload you have to create the folders where your app and other files should be installed of the destination mac. Then place everything inside the folders which should be installed.
Then call the script
pkgbuild --sign [developer id installer] --root [root-path-to-payload] --scripts [path to scripts] FINAL_PKG_PATH
$command:=“pkgbuild --sign “Developer ID Installer: node Systemloesungen (XXXXXXXXX)” --root /Volumes/Develop/EXPOSE_SignDistributon/Einzelplatz/payload “+”–scripts /Volumes/Develop/EXPOSE_SignDistributon/Einzelplatz/scripts/ “+”/Volumes/OSX_11/Installer/EXPOSÉ\ welcome/build/EXPOSE\ X\ Update.pkg”
LAUNCH EXTERNAL PROCESS($command;$in;$out;$err)
thats it, not very complicated
Tip for a successful notarization of your 4D app: https://forums.4d.com/Post/DE/33171125/