Portfile for a DMG that displays license before mounting

Andrew Udvare audvare at gmail.com
Sat Jun 1 20:14:58 UTC 2019


> On 2019-06-01, at 08:59, Ryan Schmidt <ryandesign at macports.org> wrote:
> 
> Yes, I've done this before. Echoing Y to hdiutil wasn't working for me so I wrote an expect script to do it.
> 
> Here is the expect script:
> 
> https://github.com/macports/macports-ports/blob/d8f0e670fe55cb35a5861bc26eba98acb0368ad6/emulators/minivmac/files/attach.exp
> 
> You may need to modify the strings "Software License" and "Agree Y/N?" depending on the exact wording of your disk image's license.
> 
> Here are the Tcl procedures to mount a disk image using that expect script and to unmount it:
> 
> https://github.com/macports/macports-ports/blob/d8f0e670fe55cb35a5861bc26eba98acb0368ad6/emulators/minivmac/Portfile#L354-L368
> 
> (Change "my_system" to "system" though.)
> 
> Don't forget to add a dependency on bin:expect:expect for whatever phase you're doing this in (e.g. depends_extract-append).
> 
> You want to mount the disk image using these procedures instead of MacPorts base code, so set extract.only to a value that excludes the disk image (i.e. list all the other distfiles; if there are no other distfiles, set extract.only to a blank value), then call the procedures in the post-extract block (or whatever phase you want).

Thanks. I made a Portfile for MakeMKV (binary-only package): https://github.com/Tatsh/ports/blob/master/multimedia/makemkv/Portfile

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20190601/8f8e474e/attachment.sig>


More information about the macports-users mailing list