Permalink
Browse files

In .:

2006-06-24 Michael Hutchinson <m.j.hutchinson@gmail.com>

	* configure.in: Allow choice of either Firefox or Mozilla

In src/jscall:
2006-06-24  Michael Hutchinson <m.j.hutchinson@gmail.com>

	* jscallglue/jscallglue.cpp: Fix build on Gecko 1.8+ browsers. Not a
	long-term solution -- need to re-work Mozilla string conversions to use
	the new frozen interfaces, but that will break backwards compatibility.

In src/chrome:
2006-06-24 Michael Hutchinson <m.j.hutchinson@gmail.com>

	* locale/en-US/contents.rdf
	  install.rdf
	  chrome.manifest
	  Makefile.am: Make chrome installable on Firefox, and build an XPI
	  extension. Unfortunately gtkmozembed doesn't appear to load 
	  extensions, so we still have to install into the browser's chrome.

In src/chrome:
2006-06-24 Michael Hutchinson <m.j.hutchinson@gmail.com>

	* locale/en-US/contents.rdf
	  install.rdf
	  chrome.manifest
	  Makefile.am: Make chrome installable on Firefox, and build an XPI
	  extension. Unfortunately gtkmozembed doesn't appear to load 
	  extensions, so we still have to install into the browser's chrome.


svn path=/trunk/aspeditor/; revision=62004
  • Loading branch information...
2 parents 4283773 + 6cfc0a9 commit 7634fd87c2cc2fc8c7d4eb767494f876eb93b341 @mhutch mhutch committed Jun 24, 2006
View
4 ChangeLog
@@ -1,3 +1,7 @@
+2006-06-24 Michael Hutchinson <m.j.hutchinson@gmail.com>
+
+ * configure.in: Allow choice of either Firefox or Mozilla
+
2006-04-26 Michael Hutchinson <m.j.hutchinson@gmail.com>
* Makefile.am, script.in: Use the MOZILLA_HOME determined by configure
View
73 configure.in
@@ -12,8 +12,9 @@ MONO_REQUIRED_VERSION=1.1.9
GTKSHARP_REQUIRED_VERSION=2.5.5.99
GECKOSHARP_REQUIRED_VERSION=0.10
-GTK_VERSION=2.6.0
-MOZILLA_VERSION=1.6
+m4_define(gtk_required_version, 2.6.0)
+m4_define(mozilla_required_version, 1.6)
+m4_define(firefox_required_version, 1.0)
### Check for pkg-config
@@ -57,23 +58,64 @@ AC_SUBST(MCS_OPTIONS)
PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION)
PKG_CHECK_MODULES(GECKOSHARP, gecko-sharp-2.0 >= $GECKOSHARP_REQUIRED_VERSION)
-### Check c++ dependencies
-PKG_CHECK_MODULES(JSGLUEDEPS, mozilla-xpcom >= $MOZILLA_VERSION gtk+-2.0 >= $GTK_VERSION mozilla-gtkmozembed >= $MOZILLA_VERSION)
+### Check for C++/Mozilla dependencies (inspired by gnome-python-extras)
+AC_ARG_WITH(gtkmozembed, AS_HELP_STRING(
+ [--with-gtkmozembed=mozilla|firefox],
+ [package that provides libgtkmozembed]),
+ [mozpackage=$withval], [mozpackage=any])
+
+if test $mozpackage = any ; then
+ AC_MSG_CHECKING(for Gecko development files)
+ if $PKG_CONFIG --exists mozilla-gtkmozembed; then
+ AC_MSG_RESULT([Mozilla detected])
+ mozpackage=mozilla
+ else
+ if $PKG_CONFIG --exists firefox-gtkmozembed; then
+ AC_MSG_RESULT([Firefox detected])
+ mozpackage=firefox
+ else
+ AC_MSG_ERROR([Neither Firefox nor Mozilla development packages were detected])
+ fi
+ fi
+fi
-### Find the Mozilla directory to install chrome
-MOZILLA_HOME="`$PKG_CONFIG --variable=libdir mozilla-gtkmozembed`"
-AC_SUBST(MOZILLA_HOME)
+case $mozpackage in
+ firefox) mozpackage_required_version=firefox_required_version ;;
+ mozilla) mozpackage_required_version=mozilla_required_version ;;
+ *) AC_MSG_ERROR([--with-gtkmozembed argument must be either 'mozilla' or 'firefox'])
+esac
-AC_MSG_CHECKING(for installed-chrome.txt)
-INSTALLED_CHROME="$MOZILLA_HOME/chrome/installed-chrome.txt"
-if test -f "$INSTALLED_CHROME"; then
- AC_MSG_RESULT(yes)
- AC_SUBST(INSTALLED_CHROME)
+PKG_CHECK_MODULES(JSGLUEDEPS, [$mozpackage-gtkmozembed >= $mozpackage_required_version,
+ $mozpackage-xpcom >= $mozpackage_required_version
+ gtk+-2.0 >= gtk_required_version])
+
+
+### Find the Mozilla directory to install chrome, and how we need to install the
+### chrome -- the installation mechanism changed from FF 1.0 to FF 1.5
+MOZILLA_HOME="`$PKG_CONFIG --variable=libdir $mozpackage-gtkmozembed`"
+
+AC_MSG_CHECKING([method of Mozilla extension installation])
+if test -f "$CHROME_FOLDER/installed-chrome.txt"; then
+ EXTENSION_DIR="$MOZILLA_HOME/chrome"
+ AC_MSG_RESULT([installed-chrome.txt])
else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([Your Mozilla installation has an unexpected structure])
+ EXTENSION_DIR="$MOZILLA_HOME/extensions"
+ AC_MSG_RESULT([manifest file])
fi
+###FIXME: we should be able to install this as an extension, not into the chrome,
+### but gtkmozembed does not appear to load extensions at all.
+### This probably needs some permissions-elevating C++ glue, so that the XUL
+### document can be stored elsewhere on the disc, rather than the profile...
+EXTENSION_DIR="$MOZILLA_HOME/chrome"
+
+AC_SUBST(MOZILLA_HOME)
+AC_SUBST(EXTENSION_DIR)
+
+# get zip to create jar/xpi for chrome
+AC_PATH_PROG(ZIP, zip)
+
+
### Create build directories, as tarballs seem to ignore them despite being in svn
AC_MSG_CHECKING(for build directory)
if test -d build ; then
@@ -108,5 +150,6 @@ echo ""
echo " * Installation prefix = $prefix"
echo " * C# compiler = $MCS"
echo " * C# compiler options = $MCS_OPTIONS"
-echo " * Mozilla home: $MOZILLA_HOME"
+echo " * Gecko libraries from: $mozpackage"
+echo " * $mozpackage home: $MOZILLA_HOME"
echo ""
View
9 src/chrome/ChangeLog
@@ -1,3 +1,12 @@
+2006-06-24 Michael Hutchinson <m.j.hutchinson@gmail.com>
+
+ * locale/en-US/contents.rdf
+ install.rdf
+ chrome.manifest
+ Makefile.am: Make chrome installable on Firefox, and build an XPI
+ extension. Unfortunately gtkmozembed doesn't appear to load
+ extensions, so we still have to install into the browser's chrome.
+
2006-01-16 Michael Hutchinson <m.j.hutchinson@gmail.com>
* Makefile.am: find installed-chrome.txt in correct location
View
94 src/chrome/Makefile.am
@@ -1,39 +1,71 @@
packagename = aspdesigner
-chromedir = $(MOZILLA_HOME)/chrome/$(packagename)
+extension_guid="{d7d824a2-030d-11db-9804-b622a1ef5492}"
+chromedir = $(EXTENSION_DIR)
chrome_install_file = $(MOZILLA_HOME)/chrome/installed-chrome.txt
chrome_install_text = "content,install,url,resource:/chrome/aspdesigner/content/" \
"locale,install,url,resource:/chrome/aspdesigner/locale/en-US/"
-contentdir = $(chromedir)/content
-content_DATA = $(content_files)
-content_files = \
- $(srcdir)/../jscall/Resources/JSCall.js \
- $(srcdir)/content/contents.rdf \
- $(srcdir)/content/editor.xul \
- $(srcdir)/content/editorContent.css \
- $(srcdir)/content/editor.js \
- $(srcdir)/content/clipboard.js \
- $(srcdir)/content/constants.js \
- $(srcdir)/content/xpcom.js
-
-
-localedir = $(chromedir)/locale/en-US
-locale_DATA = $(locale_files)
-locale_files = \
- $(srcdir)/locale/contents.rdf
-
-install-data-hook:
- cp $(INSTALLED_CHROME) /tmp/chrome.old; \
- sudo bash -c "sed -e'/aspdesigner/d' /tmp/chrome.old > $(INSTALLED_CHROME)"; \
- for CHRM in $(chrome_install_text); do \
- cp $(INSTALLED_CHROME) /tmp/chrome.old; \
- sudo bash -c "sed -e'\$$a$$CHRM' /tmp/chrome.old > $(INSTALLED_CHROME)"; \
- rm /tmp/chrome.old; \
+jar_files = \
+ content/JSCall.js \
+ content/contents.rdf \
+ content/editor.xul \
+ content/editorContent.css \
+ content/editor.js \
+ content/clipboard.js \
+ content/constants.js \
+ content/xpcom.js \
+ locale/en-US/contents.rdf
+
+xpi_files = \
+ chrome/$(packagename).jar \
+ chrome.manifest \
+ install.rdf
+
+all: $(packagename).xpi
+
+$(packagename).xpi: $(xpi_files)
+ $(ZIP) -q9 $@ $^
+
+content/JSCall.js: ../jscall/Resources/JSCall.js
+ cp $^ $@
+
+chrome/$(packagename).jar: $(jar_files)
+ -@mkdir -p chrome
+ $(ZIP) -q9 $@ $^
+
+install-data-hook: install-files install-text
+
+uninstall-hook: uninstall_files uninstall-text
+
+install-files:
+ mkdir -p $(chromedir)/chrome; \
+ for file in $(xpi_files); do \
+ cp $$file $(chromedir)/$$file; \
done;
-uninstall-hook:
- cp $(chrome_install_file) /tmp/chrome.old; \
- sudo bash -c "sed -e'/aspdesigner/d' /tmp/chrome.old > $(chrome_install_file)"; \
- rm /tmp/chrome.old;
+uninstall-files:
+ rm -rf $(chromedir)
+
+install-text:
+ if test -f $(chrome_install_file); then \
+ cp $(chrome_install_file) /tmp/chrome.old; \
+ sudo bash -c "sed -e'/aspdesigner/d' /tmp/chrome.old > $(chrome_install_file)"; \
+ for CHRM in $(chrome_install_text); do \
+ cp $(chrome_install_file) /tmp/chrome.old; \
+ sudo bash -c "sed -e'\$$a$$CHRM' /tmp/chrome.old > $(chrome_install_file)"; \
+ rm /tmp/chrome.old; \
+ done; \
+ fi;
+
+uninstall-text:
+ if test -f $(chrome_install_file); then \
+ cp $(chrome_install_file) /tmp/chrome.old; \
+ sudo bash -c "sed -e'/aspdesigner/d' /tmp/chrome.old > $(chrome_install_file)"; \
+ rm /tmp/chrome.old;
+ fi;
+
+EXTRA_DIST = $(jar_files) $(xpi_files)
-EXTRA_DIST = $(content_files) $(locale_files)
+CLEANFILES = \
+ chrome/$(packagename).jar \
+ $(packagename).xpi
View
2 src/chrome/chrome.manifest
@@ -0,0 +1,2 @@
+content aspdesigner jar:chrome/aspdesigner.jar!/content/
+locale aspdesigner en-US jar:chrome/aspdesigner.jar!/locale/en-US/
View
49 src/chrome/install.rdf
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+
+ <Description about="urn:mozilla:install-manifest">
+ <em:id>{d7d824a2-030d-11db-9804-b622a1ef5492}</em:id>
+ <em:name>ASP.NET Visual Designer Extension</em:name>
+ <em:version>0.1</em:version>
+ <em:description>
+ Required for the AspNetEdit Visual ASP.NET Forms Designer,
+ which is used in the Mono Project's MonoDevelop IDE.
+ </em:description>
+ <em:creator>Michael Hutchinson, Blagovest Dachev</em:creator>
+ <em:homepageURL>http://mono-project.com/AspNetEdit</em:homepageURL>
+
+ <em:file>
+ <Description about="urn:mozilla:extension:file:aspdesigner.jar">
+ <em:package>content/</em:package>
+ <em:locale>locale/en-US/</em:locale>
+ </Description>
+ </em:file>
+
+ <!-- Firefox -->
+ <em:targetApplication>
+ <Description>
+ <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+ <em:minVersion>1.0</em:minVersion>
+ <em:maxVersion>1.5.*</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+
+ <!-- Mozilla Suite -->
+ <em:targetApplication>
+ <Description>
+ <em:id>{86c18b42-e466-45a9-ae7a-9b95ba6f5640}</em:id>
+ <em:minVersion>1.7</em:minVersion>
+ <em:maxVersion>1.8</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+
+ <!-- SeaMonkey -->
+ <em:targetApplication>
+ <Description>
+ <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
+ <em:minVersion>1.0</em:minVersion>
+ <em:maxVersion>1.0</em:maxVersion>
+ </Description>
+ </em:targetApplication>
View
0 src/chrome/locale/contents.rdf → src/chrome/locale/en-US/contents.rdf
File renamed without changes.
View
6 src/jscall/ChangeLog
@@ -1,3 +1,9 @@
+2006-06-24 Michael Hutchinson <m.j.hutchinson@gmail.com>
+
+ * jscallglue/jscallglue.cpp: Fix build on Gecko 1.8+ browsers. Not a
+ long-term solution -- need to re-work Mozilla string conversions to use
+ the new frozen interfaces, but that will break backwards compatibility.
+
2006-06-14 Michael Hutchinson <m.j.hutchinson@gmail.com>
* AspNetEdit.JSCall/CommandManager.cs: Null input checking to avoid
View
7 src/jscall/jscallglue/jscallglue.cpp
@@ -27,6 +27,10 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+
+//FIXME: uses internal string functions, so have to define this in newer Mozillas
+//But we can only migrate to nsStringAPI.h in FF1.5/Mozilla 1.7+
+#define MOZILLA_INTERNAL_API
#include <gtkmozembed.h>
#include <gtkmozembed_internal.h>
@@ -42,6 +46,9 @@
#include <nsIDOMHTMLScriptElement.h>
+
+
+
extern "C"
{
int PlaceFunctionCall(GtkMozEmbed *embed, const PRUnichar *call, const PRUnichar *returnto, const PRUnichar *args);

0 comments on commit 7634fd8

Please sign in to comment.