User:Sardisson/Building with mozilla-central

From Camino Wiki
Jump to navigation Jump to search

This page is obsolete. See Development:Building:Mozilla 1.9.2 Branch instead.

If you just want to build Camino with Gecko 1.9.2, hg clone mozilla and then pull pull mozilla/camino from CVS into the Hg checkout, copy over you personal .mozconfig, apply this patch and place [1] and [2] into mozilla/camino/resources/images/gecko, and make -f build in mozilla.

If you just want to build Camino with Gecko 1.9.1, hg clone mozilla and then pull pull mozilla/camino from CVS into the Hg checkout, copy over you personal .mozconfig, apply this patch, and make -f build in mozilla.

The rest of this page lists specific changes that are required for a "release Camino" on par with 1.9.0 but which are either unnecessary for building a working Camino or are already implemented in the megapatch.

Note that the megapatch is updated periodically with new fixes, but it may also be temporarily out-of-sync with any CVS trunk checkins that may also touch the included files.

There are regressions and bugs, so be sure to use a test (or copy) profile. In particular, history does not persist across sessions (1.9.1 only).

To start building Camino against Gecko 1.9.n, n>0, a number of basic build-config changes will be required.

Checkout and mozconfig

To get started, first pull mozilla-central (or mozilla-1.9.x) from Hg.

For mozilla-central that means: hg clone mozilla-central

Then pull mozilla/camino, mozilla/extensions/typeaheadfind, and mozilla/extensions/wallet from cvs into the Hg checkout (at the moment you can skip the typeaheadfind part of this step, because we are disabling typeaheadfind in since it doesn't build).

N.B. If you are building mozilla-central, you will need to adjust your .mozconfig to use gcc-4.2, Mac OS X 10.5 sdk, and a target of Mac OS X 10.5, the defaults on that branch. You should also add ac_add_options --disable-crashreporter to disable building the toolkit crash reporter, which doesn't build in the "10.6, gcc-4.2, 10.5sdk, 10.5 target" configuration; Bug 491774.

Build-config changes in mozilla/camino

  1. In camino/, comment out the MOZ_EXTENSIONS_DEFAULT=" typeaheadfind" line.
  2. In camino/, remove "embedding/config" from the "tier_app_dirs" rule
  3. Add a new file, camino/ that looks like this but replaces all instances of SUITE with MACBROWSER
  4. In camino/
    1. Remove "flashblock", "pinstripe", and "striptease" from the "DIRS" variable.
      This disables flashblock, which will have to be disabled until it is made to use the new toolkit chrome manifests, and pinstripe, which will largely be obsolete but which will need to be adapted to do the new-style toolkit chrome override stuff for the app-license stuff.
      striptease's build will need fixing with gcc4.2/10.5sdk (builds OK with gcc4.0.1/10.5sdk) , or we'll need to switch installer/ back to strip and lose Mac OS X crash reports (Firefox recently reverted their uber-strip in order to get useful OS crash reports and sample/shark traces, so I think we want to fix striptease).
    2. Remove the following lines from the "libs::" rule:
      $(RSYNC_ALL) $(srcdir)/embed-replacements/ embed-replacements.tmp
      cd embed-replacements.tmp && \
       $(ZIP) -r0DX ../../dist/Embed/chrome/embed.jar *
      This disables embed-replacements, which will have to be reworked for the new toolkit jar structure, or turned into new-style toolkit chrome overrides along with the app-license stuff in pinstripe.

The above changes should allow you to make it into the xcodebuild phase of the Camino build; at this point, real errors should start appearing!

Known code-related build breakages

Fixes for all 1.9.1 build breakages not fixed on cvs trunk are included in the "1.9.1-full.diff" patch

  • On 1.9.1 and up, the build breaks in history (mork-based history has been removed from toolkit) - fixed by Bug 351351
  • On 1.9.1 and up, the build breaks in wallet - errors (MOZ_DECL_CTOR_COUNTER was removed in Bug 443058) - fixed by Bug 544690
  • On 1.9.1 and up, GetClientWidth is gone (GeckoUtils calls it on an element); - patch in Bug 544712
  • On 1.9.2 and up, the build also breaks from enn's focus rewrite[3] - Bug 552237
  • On 1.9.2 and up, GetMispelledWord is no longer misspelled - Bug 552238

To do

  1. Bug 553129 - Convert .cvsignore, Camino.xcodeproj/.cvsignore, and sparkle/.cvsignore into .hgignore files
  2. In camino/
    XXXtodo: See if we can set the app name to Camino
    XXXtodo: What other changes from hendy's are required to get the right Gecko build (e.g., MOZ_PLACES)
    Can't disable crashreporter and updater in; need to try mozconfig
  3. mozconfig
    1. Bug 552603 - export MOZ_DEBUG_SYMBOLS=1 for NSS in tinderbox/release mozconfigs (Bug 468701)
    2. ac_add_options --disable-crashreporter (we don't need it, and it doesn't build on 10.6 in certain configs, anyway)
    • All the items mentioned in Build-config changes in mozilla/camino, plus
      1. CFBundleVersion generation sed/regexp needs fixing to deal with longer build IDs
      2. Bug 553139 - CVS_TAG and CVS_TIME will need re-implementing for Hg ([4] may help; also check platform.ini and stuff)
      3. Need to add wallet tables to camino/ and rework wallet table copying to adjust
      4. Bug 553142 - buildcaminosymbols will need fixing for paths, vcs-info, etc.
  5. Project/xcconfig/nsStaticComponents
    1. Remove xpautocomplete, suitetypeaheadfind, xmlextras, mork, lcms (libs, dylibs, xpts, modules)
    2. 1.9.2 - remove libgfxshared_s.a, libwidget.rsrc, PrintPDE.plugin (PDE copy phase, too)
    3. 1.9.2 - move {broken|loading}-image.gif -> .png in project and on disk [5], [6]
    4. s/dist\/Embed/dist\/bin/
    5. replace installed-chrome.txt with dist/bin/chrome/{classic,comm,en-US,toolkit}.manifest
      • also need one for flashblock once it's re-enabled
    6. replace embed.jar and pipnss.jar with dist/bin/chrome/{classic,comm,en-US,toolkit}.jar
    7. What new libs/dylibs/modules/xpts are needed for, e.g. audio, video, qcms
      Check packages-static[7] for Firefox to see what got added when
      • dom_threads, at least
      For nsStaticComponents, see [8]
    8. Additional NSS .chk files - Bug 509558 at least handled by the packager!
    9. Default Plugin lost its space
    10. libsydneyaudio links against CoreAudio, AudioToolbox, AudioUnit [9] but we only had to link against AudioUnit to link static; should we link the other two, also?
  6. Bug 552035 - installer/ - _ABS_TOPSRCDIR is gone
  7. Figure out what other extraneous parts of toolkit/ we can leave out (e.g., alerts, updater) and whether we need to disable them in the mozconfig (only purely optional items) or (better) [see notes above]
    Also all of the XUL UI crap they include that we don't need (toolkit)
  8. Figure out what we lost removing xpautocomplete - absolutely nothing, thanks to dan and hendy!
  9. Bug 547337 - Decide what to do about Find-As-You-Type (suitetypeaheadfind and extensions/typeaheadfind); Sm reimplemented FAYT in js for 1.9.1
  10. Fix embed-replacements/pinstripe changes
    • Bug 545346 - config.dtd needs updating
    • about.css needs rules for buildconfig and license - Bug 545353
    • about:logo? chrome://branding/content/about.png
    • aboutMemory.css needs Camino love - Bug 545353
    • need to verify that netError is OK (until 1.9.3)
  11. Bug 553137 - Update gecko strings
  12. Bug 553138 - Update about:license
  13. Figure out which patches only landed in certain places and whether we need/can get them elsewhere (query fixed1.9.0.x keywords in Camino, maybe fixed1.9.0.x but not fixed1.9.1.x in W:C and Toolkit?)
    • Bug 425958 - Content area flashes grey when opening new blank tabs (1.9.0, 1.9.3)
    • Bug 459744 - Javascript can consume all keystrokes in content area, including tab and app menu shortcuts (1.9.0; Camino-only work-around; josh won't take patch elsewhere; major)
    • Bug 453222 - nsCocoaWindow_NSWindow_sendEvent: changes exception behavior in code having nothing to do with core (1.9.0, waiting for others; crashes)
    • Bug 496582 - nsCocoaWindow_NSWindow_sendEvent should not assume |self| will remain valid (1.9.0, waiting for others; crashes)
    • Bug 379199 - Key events (delete/backspace, escape, etc.) aren't propagated up the view hierarchy (1.9.0; Camino-only work-around; unclear if it will be accepted elsewhere)

Non-build-related bugs

See User:sardisson/Gecko 1.9.2 Bugs.