Interface FlatOptions

Options for creating a flat .pkg installer.

interface FlatOptions {
    app: string;
    identity?: string;
    identityValidation?: boolean;
    install?: string;
    keychain?: string;
    openPermissionsForSquirrelMac?: boolean;
    pkg?: string;
    platform?: ElectronMacPlatform;
    scripts?: string;
}

Hierarchy

  • _FlatOptions
    • FlatOptions

Properties

app: string

Path to the application package. Needs to end with the file extension .app.

identity?: string

Name of the certificate to use when signing.

Default Value

Selected with respect to provisioningProfile and platform from the selected keychain.

  • mas will look for 3rd Party Mac Developer Application: * (*)
  • darwin will look for Developer ID Application: * (*) by default.
identityValidation?: boolean

Flag to enable/disable validation for the signing identity. If enabled, the BaseSignOptions.identity | identity provided will be validated in the BaseSignOptions.keychain | keychain specified.

Default Value

true

install?: string

Path to install the bundle.

Default Value

"/Applications"

keychain?: string

The keychain name.

Default Value

login

openPermissionsForSquirrelMac?: boolean

Permissions of your "MyApp.app" will be overwritten inside the pkg to be owned by root:admin and 775 instead of 755.

This is done so that Squirrel Mac updates work better when this PKG is installed on end user machines. Specifically 775 allows any admin to update MyApp.app instead of it being limtied to the user who installed the app in /Applications.

This is probably what you want to enable if you're shipping a PKG to enterprise companies. It is disabled by default purely for backwards compatibility and will be changed in a future major version.

Default Value

false

pkg?: string

Output path for the flattened installer package. Needs file extension .pkg.

Default Value

Inferred from the app name passed into opts.app.

Build platform of your Electron app. Allowed values: darwin (Direct Download App), mas (Mac App Store).

Default Value

Determined by presence of Squirrel.framework within the application bundle, which is used for non-MAS apps.

scripts?: string

Path to a directory containing preinstall.sh or postinstall.sh scripts. These must be executable and will run on pre/postinstall depending on the file name.

This option is only valid if FlatOptions.platform is set to darwin.