Requirement: Distributing a macOS application. Due to odd requirements the .app-file should not be copied to /Applications, but to a specific path that should be chosen by the user. If that is not possible, it should be unpacked to the same path like the .pkg-Installer.
Example: There is the application SomeApp.app. We pack the SomeApp.app into a SomeApp.pkg. User downloads the SomeApp.pkg to ~/Downloads. After executing the SomeApp.pkg the SomeApp.app should be unpacked to ~/Downloads/SomeApp.app ...or to a path the is specified by the user.
Is there any possibility to change the Distribution.xml (or any other file) so that user can specify a specific path where the .app-File should be unpacked to?
The documentation of the Distribution.xml (https://developer.apple.com/library/content/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html#//apple_ref/doc/uid/TP40005370-CH100-SW10) describes a property customLocation and says:
Optional. Specifies the default installation location, within the installation volume, for this choice. Implies that the user can choose a different installation location. If unspecified, the user cannot choose the installation location for this choice.
If a "customLocation" is defined, the installer unpacks the .app to that specific path but the user is only able to change the volume but not the path on that volume.