Closed Bug 1675437 Opened 5 years ago Closed 5 years ago

Local mac builds have big-endian utf-16 files

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(firefox84 fixed)

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(3 files)

As opposed to cross builds, that have little-endian utf-16 files, and that prevents unification of the files.

For some reason the iconv tool on mac does that with the utf-16 encoding, but not python.

Back in bug 382762, it was originally set to contain the application
name, and the Makefile parts have remained, but the application name was
removed in later iterations because back then, the crash reporter would
be shipped with XulRunner and that would be a problem for XulRunner
apps.

XulRunner is long dead, so we can go back to the original idea.

The real motive behind this is that InfoPlist.strings.in needs to be
converted to UTF-16 at build time, and that while we currently do that
with iconv, we want to change that, and a convenient way to do so is to
use the preprocessor, but then the preprocessor doesn't like that this
specific InfoPlist.strings.in doesn't have any preprocessing directives,
so this adds one.

Since python creates little-endian utf-16 consistently whether
cross-compiling from Linux or compiling natively on macOS, we could
write a small script that essentially replaces iconv. On the other hand,
we're also doing some manual preprocessing on the InfoPlist.strings.in
files, and we might as well use the preprocessor for that.

So, we augment the preprocessor to allow an explicit output encoding
other than utf-8, and use the preprocessor instead of sed | iconv.

While we're in the vicinity, change the manual preprocessing of
Info.plist.in to uses of the preprocessor.

Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/415a591e6b75 Add application name to the crash reporter bundle display name. r=Gijs https://hg.mozilla.org/integration/autoland/rev/8f94ac8827f6 Avoid using iconv to create InfoPlist.strings. r=firefox-build-system-reviewers,mhentges https://hg.mozilla.org/integration/autoland/rev/6fc8a9c12790 Use preprocessor to create Info.plist files. r=firefox-build-system-reviewers,mhentges
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: