dmg

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 9 Imported by: 1

Documentation

Overview

Package dmg creates a "dmg" disk image. This package is purposely skewed towards the features required for notarization with gon and isn't meant to be a general purpose dmg creation library.

This package works by embedding create-dmg1 into the binary, self-extracting to a temporary directory, and executing the script. This is NOT a pure Go implementation of dmg creation. Please understand the risks associated with this before choosing to use this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dmg

func Dmg(ctx context.Context, opts *Options) error

Dmg creates a dmg archive for notarization using the options given.

Types

type Options

type Options struct {
	// Files is a list of files to put into the root of the dmg. This is
	// expected to contain already-signed binaries and so on. This overlaps
	// fully with Root so if no files are specified here and Root is specified
	// we can still create a Dmg.
	//
	// If both Files and Root are set, we'll add this list of files to the
	// root directory in the dmg.
	Files []string

	// Root is the directory to use as the root of the dmg file. This can
	// optionally be set to specify additional files that you want within
	// the dmg. If this isn't set, we'll create a root with the files specified
	// in Files.
	Root string

	// OutputPath is the path where the dmg file will be written. The directory
	// containing this path must already exist. If a file already exist here
	// it will be overwritten.
	OutputPath string

	// VolumeName is the name of the dmg volume when mounted.
	VolumeName string

	// Logger is the logger to use. If this is nil then no logging will be done.
	Logger hclog.Logger

	// BaseCmd is the base command for executing the codesign binary. This is
	// used for tests to overwrite where the codesign binary is.
	BaseCmd *exec.Cmd
}

Options are the options for creating the dmg archive.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL