diff --git a/README.md b/README.md index df2b1b9..d0284b2 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,9 @@ The name of the application, which will affect strings in titles and the icon. ``` -p, --platform ``` -Automatically determined based on the current OS. Can be overwritten by specifying either `linux`, `win32`, or `darwin`. +Automatically determined based on the current OS. Can be overwritten by specifying either `linux`, `windows`, or `osx`. + +The alternative values `win32` (for Windows) or `darwin`, `mac` (for OSX) can also be used. #### [arch] diff --git a/src/cli.js b/src/cli.js index 715b0a9..1069e4d 100755 --- a/src/cli.js +++ b/src/cli.js @@ -22,7 +22,7 @@ if (require.main === module) { program.out = appDir; }) .option('-n, --name ', 'app name') - .option('-p, --platform ', '\'linux\', \'win32\', or \'darwin\'') + .option('-p, --platform ', '\'osx\', \'linux\' or \'windows\'') .option('-a, --arch ', '\'ia32\' or \'x64\'') .option('-e, --electron-version ', 'electron version to package, without the \'v\', see https://github.com/atom/electron/releases') .option('--no-overwrite', 'do not override output directory if it already exists, defaults to false') diff --git a/src/options/optionsMain.js b/src/options/optionsMain.js index 73353f9..554fe73 100644 --- a/src/options/optionsMain.js +++ b/src/options/optionsMain.js @@ -57,6 +57,14 @@ function optionsFactory(inpOptions, callback) { options.userAgent = null; } + if (options.platform.toLowerCase() === 'windows') { + options.platform = 'win32'; + } + + if (options.platform.toLowerCase() === 'osx' || options.platform.toLowerCase() === 'mac') { + options.platform = 'darwin'; + } + async.waterfall([ callback => { if (options.icon) {