usage.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. Usage: electron-packager <sourcedir> <appname> [options...]
  2. Required options
  3. sourcedir the base directory of the application source
  4. Examples: electron-packager ./
  5. electron-packager ./ --all
  6. Optional options
  7. appname the name of the app, if it needs to be different from the "productName" or "name"
  8. in the nearest package.json
  9. * All platforms *
  10. all equivalent to --platform=all --arch=all
  11. app-copyright human-readable copyright line for the app
  12. app-version release version to set for the app
  13. arch all, or one or more of: ia32, x64, armv7l, arm64, mips64el (comma-delimited if
  14. multiple). Defaults to the host arch
  15. asar whether to package the source code within your app into an archive. You can either
  16. pass --asar by itself to use the default configuration, OR use dot notation to
  17. configure a list of sub-properties, e.g. --asar.unpackDir=sub_dir - do not use
  18. --asar and its sub-properties simultaneously.
  19. Properties supported:
  20. - ordering: path to an ordering file for file packing
  21. - unpack: unpacks the files to the app.asar.unpacked directory whose filenames
  22. regex .match this string
  23. - unpackDir: unpacks the dir to the app.asar.unpacked directory whose names glob
  24. pattern or exactly match this string. It's relative to the <sourcedir>.
  25. build-version build version to set for the app
  26. download a list of sub-options to pass to electron-download. They are specified via dot
  27. notation, e.g., --download.cache=/tmp/cache
  28. Properties supported:
  29. - cache: directory of cached Electron downloads. Defaults to `$HOME/.electron`
  30. - mirror: alternate URL to download Electron zips
  31. - strictSSL: whether SSL certs are required to be valid when downloading
  32. Electron. Defaults to true, use --no-download.strictSSL to disable checks.
  33. electron-version the version of Electron that is being packaged, see
  34. https://github.com/electron/electron/releases
  35. executable-name the name of the executable file, sans file extension. Defaults to appname
  36. extra-resource a file to copy into the app's resources directory
  37. icon the local path to an icon file to use as the icon for the app.
  38. Note: Format depends on platform.
  39. ignore do not copy files into app whose filenames RegExp.match this string. See also:
  40. https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#ignore
  41. and --no-prune. Can be specified multiple times
  42. no-deref-symlinks make sure symlinks are not dereferenced within the app source
  43. no-prune do not prune devDependencies from the packaged app
  44. out the dir to put the app into at the end. Defaults to current working dir
  45. overwrite if output directory for a platform already exists, replaces it rather than
  46. skipping it
  47. platform all, or one or more of: darwin, linux, mas, win32 (comma-delimited if multiple).
  48. Defaults to the host platform
  49. quiet Do not print informational or warning messages
  50. tmpdir temp directory. Defaults to system temp directory, use --no-tmpdir to disable
  51. use of a temporary directory.
  52. * darwin/mas target platforms only *
  53. app-bundle-id bundle identifier to use in the app plist
  54. app-category-type the application category type
  55. For example, `app-category-type=public.app-category.developer-tools` will set the
  56. application category to 'Developer Tools'.
  57. extend-info a plist file to merge into the app plist
  58. helper-bundle-id bundle identifier to use in the app helper plist
  59. osx-sign (OSX host platform only) Whether to sign the OSX app packages. You can either
  60. pass --osx-sign by itself to use the default configuration, or use dot notation
  61. to configure a list of sub-properties, e.g. --osx-sign.identity="My Name"
  62. Properties supported:
  63. - identity: should contain the identity to be used when running `codesign`
  64. - entitlements: the path to entitlements used in signing
  65. - entitlements-inherit: the path to the 'child' entitlements
  66. protocol URL protocol scheme to register the app as an opener of.
  67. For example, `--protocol=myapp` would register the app to open
  68. URLs such as `myapp://path`. This argument requires a `--protocol-name`
  69. argument to also be specified.
  70. protocol-name Descriptive name of URL protocol scheme specified via `--protocol`
  71. * win32 target platform only *
  72. win32metadata a list of sub-properties used to set the application metadata embedded into
  73. the executable. They are specified via dot notation,
  74. e.g. --win32metadata.CompanyName="Company Inc."
  75. or --win32metadata.ProductName="Product"
  76. Properties supported:
  77. - CompanyName (default: author name from nearest package.json)
  78. - FileDescription (default: appname)
  79. - OriginalFilename (default: renamed exe)
  80. - ProductName (default: appname)
  81. - InternalName (default: appname)
  82. - requested-execution-level (user, asInvoker, or requireAdministrator)
  83. - application-manifest