Creating Installer For Application Support Only - productbuild issue

I successfully create a pkg using: 


pkgbuild --root ./packaging/plugins/AppData --identifier com.company.plugin--install-location '/Library/Application Support/company/AppStorage' ./packaging/com.company.plugin.pkg


Then I create a distribution:


  productbuild --distribution .packaging/plugins/pkg/distribution.xml "./packaging/Plugin 1.0.0.pkg"


But when running through "Plugin 1.0.0.pkg", when I click install I get:


"the installer could not install the software because there was no software found to be installed"


Does productbuild require an .app file or what am I doing wrong?


Here is the distribution I wrote:


<?xml version="1.0" encoding="utf-8"?>
<installer-gui-script minSpecVersion="2">
    <title>Plugin</title>
    <options customize="never" require-scripts="false" hostArchitectures="x86_64"/>
    <domains enable_anywhere="true" enable_currentUserHome="true" enable_localSystem="true" />
    <volume-check>
        <allowed-os-versions>
            <os-version min="10.11.0"/>
        </allowed-os-versions>
        <required-bundles>
            <bundle id="com.company.app" path="Applications/app.app" CFBundleShortVersionString="1.0.0"/>
        </required-bundles>
    </volume-check>
    <choices-outline>
        <line choice="com.company.plugin"/>
    </choices-outline>
    <choice id="com.company.plugin" title="Plugin" visible="false">
        <pkg-ref id="com.company.plugin"/>
    </choice>
    <pkg-ref id="com.company.plugin">com.company.plugin.pkg</pkg-ref>
    <pkg-ref id="com.company.plugin">
        <must-close>
            <app id="com.company.app"/>
        </must-close>
    </pkg-ref>
</installer-gui-script>

Posted on Mar 1, 2024 6:05 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 4, 2024 11:22 AM

I think I was able to answer my own question. So it seems I am creating a "codeless bundle" which still requires me to create an ".app" as it seems that productbuild will always need an app.


Productbuild will either need to contain an .app file or find an existing .app to install on top of. So the above distribution fails since I don't have an APP for product build.


Information on creating codeless bundle: Placing Content in a Bundle | Apple Developer Documentation

Information on non-standard code structures: Embedding nonstandard code structures in a bundle | Apple Developer Documentation


Similar questions

3 replies
Question marked as Top-ranking reply

Mar 4, 2024 11:22 AM in response to kristinaplusplus

I think I was able to answer my own question. So it seems I am creating a "codeless bundle" which still requires me to create an ".app" as it seems that productbuild will always need an app.


Productbuild will either need to contain an .app file or find an existing .app to install on top of. So the above distribution fails since I don't have an APP for product build.


Information on creating codeless bundle: Placing Content in a Bundle | Apple Developer Documentation

Information on non-standard code structures: Embedding nonstandard code structures in a bundle | Apple Developer Documentation


Mar 1, 2024 12:54 PM in response to kristinaplusplus

If you’ve indicated an app is present, then an app should be present in the kit, yes.


If you’re loading plug-ins, I’d tend to expect the following be present on the command:

—-plugins


Here’s a tool that can make generating these easier: http://s.sudre.free.fr/Software/Packages/about.html


For info on signing apps for distribution (the next step), see: Packaging Mac software for distribution | Apple Developer Documentation


PS: company.com is a real and registered domain. Use example.com, example.org, or example.net for examples, for obfuscation or expurgation, and for documentation.


Mar 1, 2024 1:03 PM in response to MrHoffman

I have not indicated an app is present. Yes - the above is an example where I replaced all the information I could not post.


     --plugins plugins-path
		 The contents of plugins-path is added to the product archive for use by the OS X Installer application's plugin mechanism.  It
		 will normally contain a InstallerSections.plist file, and one or more plugin bundles.


I thought plugins were plugins of the installer? Not of my own application?


In this example -> plugins represent the app data of my application. We have an installer for the main application. I am writing a separate installer for the plugins of the application, so the app should already be present on their machine and not part of the installer.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Creating Installer For Application Support Only - productbuild issue

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.