From 53192b173b76e27ad89a1a1ed246b8844510f621 Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Mon, 28 Jan 2013 15:10:21 -0500 Subject: [PATCH] Add CCDump to extensions list This includes tweaking the install.rdf file. In this case we cheat by hijacking the Firefox entry for the toolkit. Signed-off-by: Thomas Berezansky --- Open-ILS/xul/staff_client/Makefile.am | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/Makefile.am b/Open-ILS/xul/staff_client/Makefile.am index 2e165a689e..1664dd6991 100644 --- a/Open-ILS/xul/staff_client/Makefile.am +++ b/Open-ILS/xul/staff_client/Makefile.am @@ -24,6 +24,8 @@ DOMINSPECTOR_URL=https://addons.mozilla.org/firefox/downloads/latest/6622/addon- DOMINSPECTOR_ID=inspector@mozilla.org VENKMAN_URL=https://addons.mozilla.org/firefox/downloads/latest/216/addon-216-latest.xpi VENKMAN_ID={f13b157f-b174-47e7-a34d-4815ddfdfeb8} +CCDUMP_URL=https://addons.mozilla.org/firefox/downloads/latest/363814/addon-363814-latest.xpi +CCDUMP_ID=ccdump@getfirebug.com OPENSRF_JSLIBS = "$(OPENSRF_LIBS)/javascript" CHROME_LOCALES = $$(ls -1 chrome/locale) @@ -242,6 +244,7 @@ client_app: client_dir # Note: XULRunner before 4 requires extracted extensions # XULRunner after 4 keeps them in XPI form...unless their manifest says to unpack # This block is thus structured to make it easy to add the latter kind later. +# CCDUMP doesn't seem to support earlier versions, so it only gets grabbed for post-4 @if [ ${XULRUNNER_MAJOR_VERSION} -lt 4 ]; then \ if [ -f extensions/${DOMINSPECTOR_ID}.xpi ]; then \ mkdir -p client/extensions/${DOMINSPECTOR_ID}/; \ @@ -258,6 +261,9 @@ client_app: client_dir if [ -f extensions/${VENKMAN_ID}.xpi ]; then \ cp extensions/${VENKMAN_ID}.xpi client/extensions/; \ fi; \ + if [ -f extensions/${CCDUMP_ID}.xpi ]; then \ + cp extensions/${CCDUMP_ID}.xpi client/extensions/; \ + fi; \ fi # If automatic updates are enabled, or the standalone_xul_app.js is present, @@ -287,7 +293,7 @@ extension: client_ext # Fetch extensions to load into the client # This could be done in a "if they aren't there" fashion, but these are manually triggered anyway # That, and this way you can update the extensions by running this target again -fetch-extensions: fetch-dom-inspector fetch-venkman +fetch-extensions: fetch-dom-inspector fetch-venkman fetch-ccdump fetch-dom-inspector: @echo 'Fetching DOM Inspector' @@ -299,6 +305,20 @@ fetch-venkman: @mkdir -p extensions/ @wget -Oextensions/${VENKMAN_ID}.xpi ${VENKMAN_URL} +fetch-ccdump: + @echo 'Fetching CCDump' + @mkdir -p extensions/ + @wget -Oextensions/${CCDUMP_ID}.xpi ${CCDUMP_URL} + @echo 'Prepping CCDump' + @cd extensions; unzip ${CCDUMP_ID}.xpi install.rdf; \ + mv install.rdf install.rdf.orig; \ + sed -e '/Firefox/,/\/em:targetApplication/ s/[^<]*<\/em:id>/toolkit@mozilla.org<\/em:id>/' \ + -e '/Firefox/,/\/em:targetApplication/ s/[^<]*<\/em:maxVersion>/${XULRUNNER_VERSION}<\/em:maxVersion>/' \ + install.rdf.orig > install.rdf; \ + zip ${CCDUMP_ID}.xpi install.rdf; \ + rm install.rdf*; + @rm -rf ${CCDUMP_ID}* + # Generic client, as an xpi, theoretically suitable for --install-app usage generic-client: client_app -- 2.11.0