Table of Contents
Moonlight Accessibility
As part of their second phase, the Mono Accessibility team will be implementing full UIA support for Moonlight.
The following platforms will be supported using our plugin:
- SUSE Linux Enterprise Desktop 10
- openSUSE 11.0
- openSUSE 11.1
- SUSE Linux Enterprise Desktop 11
- Fedora 10
- Ubuntu 9.04 (Jaunty Jackalope)
For Developers
Building Firefox with Plugin Accessibility
- Install autoconf 2.13 (http://software.opensuse.org/ymp/mozilla/openSUSE_11.1/autoconf213.ymp)
- Install libnotify-devel
- Check out (https://developer.mozilla.org/en/Mozilla_Source_Code_(Mercurial)) Firefox from mozilla-1.9.2 (Firefox 3.6)
- Create a .mozconfig file from this template:
. $topsrcdir/browser/config/mozconfig ac_add_options --enable-application=browser mk_add_options MOZ_CO_PROJECT=browser mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-debug mk_add_options MOZ_MAKE_FLAGS=-j4 ac_add_options --enable-debug ac_add_options --disable-optimize ac_add_options --enable-tests ac_add_options --disable-crashreporter ac_add_options --disable-necko-wifi
- Apply the latest plugin accessibility patch from uia2atk/MoonAtkBridge (http://anonsvn.mono-project.com/viewvc/trunk/uia2atk/MoonAtkBridge/patches/ff-plugin-a11y.patch) (Notice this patch is tracked in Mozilla Bug #480317 (https://bugzilla.mozilla.org/show_bug.cgi?id=480317))
- Build for the first time:
make -f client.mk build
From now on, incremental build has been enabled. This will allow you to only build what has changed instead of the entire project, saving hours of time. To use this, simply change directory into obj-debug/FolderYouChanged and type make.
If I changed something in the accessible/ directory, I would:
cd obj-debug/accessible/ make
Development with Firefox
If you find yourself in the position of maintaining a patch against Firefox for a long time, Mercurial can be your best friend.
When you get to a good stopping point, hg commit your code, and continue working as normal.
Sooner or later, you'll have to pull in the latest changes from HEAD into your branch. To make this easier, enable the Mercurial rebase plugin by putting
[extensions] hgext.rebase =
into your ~/.hgrc file.
Now, to update your local repository:
brad@blackbird:~/build/firefox-trunk$ hg pull pulling from http://hg.mozilla.org/mozilla-central/ searching for changes adding changesets adding manifests adding file changes added 76 changesets with 276 changes to 228 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) brad@blackbird:~/build/firefox-trunk$ hg rebase merging accessible/src/atk/Makefile.in merging accessible/src/base/nsAccessibilityService.cpp merging accessible/src/base/nsAccessibilityService.cpp warning: conflicts during merge. merging accessible/src/base/nsAccessibilityService.cpp failed! abort: fix unresolved conflicts with hg resolve then run hg rebase --continue ... Resolve any conflicts... ... brad@blackbird:~/build/firefox-trunk$ hg rebase --continue saving bundle to /home/brad/build/firefox-trunk/.hg/strip-backup/b67e49ad7fa4-temp adding branch adding changesets adding manifests adding file changes added 81 changesets with 292 changes to 232 files rebase completed brad@blackbird:~/build/firefox-trunk$
Setting up your Moonlight Environment
Supplies
- Matching versions of mono, mcs, and moon from trunk
- A checkout of uia2atk from trunk
- Firefox trunk with plugin patch applied (see above)
- An hour, a good (http://icanhascheezburger.com) build-time (http://thedailykitten.com/) distraction (http://youlooknicetoday.com) and a tall glass of water
Setting up the Base Environment
- Set up a development profile in Firefox
firefox -no-remote -ProfileManager
Press the Create Profile button. Set the profile name to dev and the path to ~/.mozilla/firefox/profiles-dev.
- Create an alias to the development version of Firefox
alias ffd='$HOME/build/firefox-trunk/obj-debug/dist/bin/firefox -no-remote -P dev'
- Build mono (and mcs).
cd mono/ ./autogen.sh --prefix=/path/to/my/prefix make && make install
- Patch moon with all of our pending patches:
cd moon/ patch -p0 < ~/path/to/uia2atk/MoonAtkBridge/patches/moonlight-a11y-slot-tree.diff ..
- Configure moon
cd moon/ ./autogen.sh --prefix=/path/to/my/prefix --with-mcspath=$HOME/src/mono-2-6/mcs --with-mono-basic-path=$HOME/src/mono-2-6/mono-basic
- Make sure that ./autogen.sh's output looks something like
Silverlight Support:
Silverlight 1.0: yes
Silverlight 2.0: yes
Browser plugin assemblies: yes
Path to mcs tree: ./../mcs
Path to mono-basic tree: no
Desktop application assemblies: yes
Browser Support:
Firefox: yes
Plugin Installer (.xpi): yes
Gecko 1.8 (Firefox 2): no (reason: missing FF2 development packages)
Gecko 1.9 (Firefox 3): yes
- Build moon
make && make install
- Build moon XPI file
make user-plugin
- Install Moon XPI into Firefox
ffd plugin/install/novell-moonlight.xpi
If you're making changes to Moonlight, you'll often have to:
make && rm plugin/install/novell-moonlight.xpi && make user-plugin ffd plugin/install/novell-moonlight.xpi
Setting up the MoonAtkBridge Environment
- Configure and build MoonAtkBridge
cd uia2atk/MoonAtkBridge ./autogen.sh --prefix=/home/brad/mono make
This will create a stage/ directory containing all of the files required for a Firefox extension. We could make and install an XPI right away with make xpi, but for development, it's much easier if we just symlink this directory into our Mozilla plugins folder:
cd ~/.mozilla/firefox/profiles-dev/extensions/ ln -s /path/to/uia2atk/MoonAtkBridge/stage moonlight-a11y@novell.com
Now, when you run Firefox, our extension should load and you should be able to see a live accessibility hierarchy inside of Accerciser.
When developing in MoonAtkBridge, just make after you make changes, and re-run Firefox to see the results.
Also, don't forget to make sure stage/active.xml is true, i.e., the content is: <root><active>true</active></root>, by default is false.