mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-22 10:08:55 +00:00
Use windows
and osx
to specify platform
This commit is contained in:
parent
cbff6ba50d
commit
5bad1d08dd
@ -134,7 +134,9 @@ The name of the application, which will affect strings in titles and the icon.
|
||||
```
|
||||
-p, --platform <value>
|
||||
```
|
||||
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]
|
||||
|
||||
|
@ -22,7 +22,7 @@ if (require.main === module) {
|
||||
program.out = appDir;
|
||||
})
|
||||
.option('-n, --name <value>', 'app name')
|
||||
.option('-p, --platform <value>', '\'linux\', \'win32\', or \'darwin\'')
|
||||
.option('-p, --platform <value>', '\'osx\', \'linux\' or \'windows\'')
|
||||
.option('-a, --arch <value>', '\'ia32\' or \'x64\'')
|
||||
.option('-e, --electron-version <value>', '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')
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user