Skip to content

Commit

Permalink
Split up arguments section into OS-specific subsections
Browse files Browse the repository at this point in the history
Fixes #237.
  • Loading branch information
malept committed Mar 8, 2016
1 parent 9bf1f1b commit c2dd6c2
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 49 deletions.
81 changes: 44 additions & 37 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,12 @@ packager(opts, function done (err, appPath) { })

**Optional**

***All Platforms***

`all` - *Boolean*

When `true`, sets both `arch` and `platform` to `all`.

`app-bundle-id` - *String*

The bundle identifier to use in the application's plist (OS X only).

`app-category-type` - *String*

The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory (OS X only).

For example, `app-category-type=public.app-category.developer-tools` will set the application category to *Developer Tools*.

Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).

`app-copyright` - *String*

The human-readable copyright line for the app. Maps to the `LegalCopyright` metadata property on Windows, and `NSHumanReadableCopyright` on OS X.
Expand Down Expand Up @@ -193,18 +183,6 @@ packager(opts, function done (err, appPath) { })

The directory where prebuilt, pre-packaged Electron downloads are cached. Defaults to `$HOME/.electron`.

`extend-info` - *String*

Filename of a plist file; the contents are added to the app's plist. Entries in `extend-info` override entries in the base plist file supplied by electron-prebuilt, but are overridden by other explicit arguments such as `app-version` or `app-bundle-id`. (OS X only)

`extra-resource` - *String* or *Array*

Filename of a file to be copied directly into the app's `Contents/Resources` directory. (OS X only)

`helper-bundle-id` - *String*

The bundle identifier to use in the application helper's plist (OS X only).

`icon` - *String*

Currently you must look for conversion tools in order to supply an icon in the format required by the platform:
Expand Down Expand Up @@ -234,18 +212,6 @@ If the file extension is omitted, it is auto-completed to the correct extension

Runs [`npm prune --production`](https://docs.npmjs.com/cli/prune) before starting to package the app.

`sign` - *String*

The identity used when signing the package via `codesign`. (Only for the OS X / Mac App Store target platforms, when XCode is present on the host platform.)

`sign-entitlements` - *String*

The path to the 'parent' entitlements used in signing.

`sign-entitlements-inherit` - *String*

The path to the 'child' entitlements. See [electron-osx-sign](https://www.npmjs.com/package/electron-osx-sign#opts) for more details.

`strict-ssl` - *Boolean*

Whether SSL certificates are required to be valid when downloading Electron. **Defaults to `true`**.
Expand All @@ -258,9 +224,50 @@ If the file extension is omitted, it is auto-completed to the correct extension

The Electron version with which the app is built (without the leading 'v') - for example, [`0.33.9`](https://github.com/atom/electron/releases/tag/v0.33.9). See [Electron releases](https://github.com/atom/electron/releases) for valid versions. If omitted, it will use the version of the nearest local installation of electron-prebuilt.


***OS X/Mac App Store targets only***

`app-bundle-id` - *String*

The bundle identifier to use in the application's plist.

`app-category-type` - *String*

The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.

For example, `app-category-type=public.app-category.developer-tools` will set the application category to *Developer Tools*.

Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).

`extend-info` - *String*

Filename of a plist file; the contents are added to the app's plist. Entries in `extend-info` override entries in the base plist file supplied by electron-prebuilt, but are overridden by other explicit arguments such as `app-version` or `app-bundle-id`.

`extra-resource` - *String* or *Array*

Filename of a file to be copied directly into the app's `Contents/Resources` directory.

`helper-bundle-id` - *String*

The bundle identifier to use in the application helper's plist.

`sign` - *String*

The identity used when signing the package via `codesign`. (Only for when XCode is present on the host platform.)

`sign-entitlements` - *String*

The path to the 'parent' entitlements used in signing. (Only for when XCode is present on the host platform.)

`sign-entitlements-inherit` - *String*

The path to the 'child' entitlements. See [electron-osx-sign](https://www.npmjs.com/package/electron-osx-sign#opts) for more details. (Only for when XCode is present on the host platform.)

***Windows targets only***

`version-string` - *Object*

Object hash of application metadata to embed into the executable (Windows only):
Object hash of application metadata to embed into the executable:
- `CompanyName`
- `LegalCopyright` (**deprecated** and will be removed in a future major version, pleas use the top-level `app-copyright` parameter instead)
- `FileDescription`
Expand Down
32 changes: 20 additions & 12 deletions usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,43 @@ Example electron-packager ./ FooBar --platform=darwin --arch=x64

Optional options

* All platforms *

all equivalent to --platform=all --arch=all
app-bundle-id bundle identifier to use in the app plist (darwin/mas platform only)
app-category-type the application category type (darwin/mas platform only)
For example, `app-category-type=public.app-category.developer-tools` will set the application category to 'Developer Tools'.
app-copyright human-readable copyright line for the app
app-version release version to set for the app
asar packages the source code within your app into an archive
asar-unpack unpacks the files to app.asar.unpacked directory whose filenames regex .match this string
asar-unpack-dir unpacks the dir to app.asar.unpacked directory whose names match this string. It's relative to the <sourcedir>.
For example, `--asar-unpack-dir=sub_dir` will unpack the directory `/<sourcedir>/sub_dir`.
build-version build version to set for the app (darwin/mas platform only)
build-version build version to set for the app
cache directory of cached Electron downloads. Defaults to '$HOME/.electron'
extend-info a plist file to append to the app plist (darwin/mas platform only)
extra-resource a file to copy into the app's Contents/Resources (darwin/mas platform only)
helper-bundle-id bundle identifier to use in the app helper plist (darwin/mas platform only)
icon the icon file to use as the icon for the app. Note: Format depends on platform.
ignore do not copy files into app whose filenames regex .match this string
out the dir to put the app into at the end. defaults to current working dir
overwrite if output directory for a platform already exists, replaces it rather than skipping it
prune runs `npm prune --production` on the app
sign should contain the identity to be used when running `codesign` (only for building for the darwin/mas platform, on OS X)
sign-entitlements the path to entitlements used in signing
sign-entitlements-inherit
the path to the 'child' entitlements
strict-ssl whether SSL certificates are required to be valid when downloading Electron.
It defaults to true, use --strict-ssl=false to disable checks.
tmpdir temp directory. Defaults to system temp directory, use --tmpdir=false to disable use of a temporary directory.
version the version of Electron that is being packaged, see https://github.com/atom/electron/releases
version-string should contain a hash of the application metadata to be embedded into the executable (win32 platform only).

* darwin/mas target platforms only *

app-bundle-id bundle identifier to use in the app plist
app-category-type the application category type
For example, `app-category-type=public.app-category.developer-tools` will set the application category to 'Developer Tools'.
extend-info a plist file to append to the app plist
extra-resource a file to copy into the app's Contents/Resources
helper-bundle-id bundle identifier to use in the app helper plist
sign should contain the identity to be used when running `codesign` (OS X host platform only)
sign-entitlements the path to entitlements used in signing (OS X host platform only)
sign-entitlements-inherit
the path to the 'child' entitlements (OS X host platform only)

* win32 target platform only *

version-string should contain a hash of the application metadata to be embedded into the executable.
These can be specified on the command line via dot notation,
e.g. --version-string.CompanyName="Company Inc." --version-string.ProductName="Product"
Keys supported:
Expand Down

0 comments on commit c2dd6c2

Please sign in to comment.