Convert MOZILLA_OFFICIAL conditionals to MC_OFFICIAL where needed.

- `--enable-official-branding` implies `MC_OFFICIAL` (no need to specifically set it)
- `--enable-official-vendor` can be used to set `MC_OFFICIAL` on builds without `--enable-official-branding` that should still be considered official release versions.
- `MC_OFFICIAL` implies `--enable-release`, meaning `DEVELOPER_OPTIONS` isn't set
- `MC_OFFICIAL` makes `nsXULAppInfo.getIsOfficial` return `true`
- `MC_OFFICIAL` makes `AppConstants.MOZILLA_OFFICIAL` (for compatibility in extensions) and `AppConstants.MC_OFFICIAL` return `true`
- Optional, for the time being: `MOZILLA_OFFICIAL` is still present in some places in case someone wants to build a Mozilla-alike official application and has the rights and necessary keys to use Mozilla-official third-party services. This must always be combined with `MC_OFFICIAL` to have a sane combination of defines. This may be removed in the future.
This commit is contained in:
wolfbeast 2018-04-13 22:06:20 +02:00 committed by Roy Tam
commit d37246737b
12 changed files with 32 additions and 21 deletions

View file

@ -36,11 +36,18 @@ this.AppConstants = Object.freeze({
false,
#endif
// Official corresponds, roughly, to whether this build is performed
// on Mozilla's continuous integration infrastructure. You should
// Official corresponds to whether this build is considered an
// official, branded release for the public. You should
// disable developer-only functionality when this flag is set.
// MOZILLA_OFFICIAL is deprecated but kept for extension compatibility.
MOZILLA_OFFICIAL:
#ifdef MOZILLA_OFFICIAL
#ifdef MC_OFFICIAL
true,
#else
false,
#endif
MC_OFFICIAL:
#ifdef MC_OFFICIAL
true,
#else
false,