electron-builder should use Node.js platform identifiers just like electron-packager does.
So the platform options win and osx should become win32 and darwin.
I agree :+1:
Jap, sounds reasonable. :)
:-1: win and osx are a lot more user-friendly. Just because Node.js uses those identifiers doesn't mean it's a good idea. I've seen countless of people being confused that win32 is also the identifier for Windows 64-bit. Also not that clear that darwin is OS X.
@sindresorhus Conversely I was confused as heck when it wasn't the same. Additionally, based on my understanding of the way the platforms are arranged, there's no reason why it can't be both:
module.exports = {
osx : require( './osx' ),
win : require( './win' ),
win32 : require( './win' )
};
Just add:
darwin : require('./osx'),
And everyone could be happy. It was in a PR a while back too:
https://github.com/loopline-systems/electron-builder/pull/14/files#diff-4b53c119f750f41905184bc503e871c6R10
@sindresorhus I suggest you build a cross-platform application and see for yourself if it's user-friendly or not.
Keeping maps from process.platform or process.arch values to custom library values is not user-friendly at all. Node.js uses those values, electron-packager uses those values and even electron uses those values.
No one wants to dig into documentations to figure out if it's "darwin", "macosx", "osx", "mac", "64", "x64", "x86-64" or "amd64" or whatever.
If this confuses a few juniors, so be it.
@sindresorhus @justinmchase @AlicanC
I have to say I'm also on the "consistency" side here.
electron-builder will be used mostly in combination with electron-packager. Using the same identifiers just makes sense here ( if missed that when starting the project ).
Having darwin and osx included doesn't make sense to me. It's configuration and I see no benefit in implementing doubled options for convenience.
To sum up - I still think that the issue here makes sense. :)
Bumping another major version is no problem at all for me ( a bit unlucky - but yeah... it's like it is ).
Let's go like it's done right now and close the issue. What do you think, @stefanjudis ?
In the new API we still use osx, linux and win in the Distributable Format Configuration.
Because:
osx as a OS name (not quite relevant, but anyway)So, @stefanjudis, I want to close issue as a won't fix.
Maybe, to avoid inconsistency, we can introduce new option os and use it instead of platform (deprecate it).
Also, electron-packager uses mas as a platform, but unlikely that we will support it in the same way — my initial proposal (I will open issue to discuss soon) to use ---target=mas and use osx in the distributable format configuration for all OS X targets (as we do in case of NSIS and Squirrel).
So, @stefanjudis, I want to close issue as a won't fix.
:+1:
Maybe, to avoid inconsistency, we can introduce new option os and use it instead of platform (deprecate it).
:+1:
Also, electron-packager uses mas as a platform, but unlikely that we will support it in the same way — my initial proposal (I will open issue to discuss soon) to use ---target=mas and use osx in the distributable format configuration for all OS X targets (as we do in case of NSIS and Squirrel)
:+1:
@stefanjudis I am going to allow use osx instead of darwin and win instead of win32 in the platform arg. See #301 "win and osx are a lot more user-friendly."
to avoid inconsistency, we can introduce new option os and use it instead of platform (deprecate it).
Yeah, os is much clear, but I don't want to disturb our users and rename/deprecate. For now, we can just allow to use osx/win.
:+1:
:-1:
Platform identifiers in nodejs, for better or worse:
https://nodejs.org/api/os.html#os_os_platform
It's pretty confusing for nodejs developers to have platforms named different from package to package.
@justinmchase Both will be supported. So, electron-builder will be still drop-in replacement of electron-packager and logical for nodejs developers accustomed to these identifiers. But for me and other confused users it will allow to use osx/win.
Ok great!