2

I have an NWJS Mac App hello.app.

I signed the app using entitlements and created a package hello.pkg which works fine.

Now I wish to add an EULA agreement inside this package. Can someone suggest me how should I achieve this?

What I tried:

  1. Generate distribution.plist or xml from hello.app

    productbuild --synthesize --product "hello.app/Contents/Info.plist" --package hello.app distribution.plist

  2. Update the plist with readme/license files

            <installer-gui-script minSpecVersion="1">
                   <license file="LICENSE.html"/>
                   <readme file="README.html"/>
            </installer-gui-script>
    
  3. Now again build to create the package.

    $ productbuild --distribution distribution.xml hello.pkg

But I get error:

Cannot copy package "hello.app" into the product. (Bundle-style package "hello.app" is not supported.)

Please provide suggestions.

Swati
  • 2,870
  • 7
  • 45
  • 87

2 Answers2

2

As far as I know --package must point to a .pkg file created by pkgbuild.

asr
  • 220
  • 2
  • 9
1

As mentioned by @asr create a .pkg file using pkgbuild before passing it to packagebuild

For more info:

https://www.unix.com/man-page/osx/1/pkgbuild/

Making macOS Installer Packages which are Developer ID ready

https://medium.com/swlh/the-easiest-way-to-build-macos-installer-for-your-application-34a11dd08744

Dificilcoder
  • 449
  • 5
  • 11