Build improvements for Chrome plugin. git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@6828 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/plugins/npapi/Makefile b/plugins/npapi/Makefile index bb3a850..04b0c05 100644 --- a/plugins/npapi/Makefile +++ b/plugins/npapi/Makefile
@@ -16,7 +16,14 @@ SRCS= main.cpp Plugin.cpp LocalObjectTable.cpp JavaObject.cpp \ npn_bindings.cc ScriptableInstance.cpp -all:: oophm.xpi +VERSION ?= 0.9.$(shell ./getversion).$(shell date +%Y%m%d) + +all:: versioned-files + +signable: prebuilt/gwt-dev-plugin/manifest.json + -rm -rf signable + mkdir signable + cd prebuilt; find gwt-dev-plugin -path */.svn -prune -o -print | cpio -pmdua ../signable oophm.xpi: extension $(INSTDIR)/liboophm.so liboophm.so extension/install.rdf -rm -f oophm.xpi @@ -27,6 +34,10 @@ -rm -f $@ cd extension; zip -9 ../$@ META-INF/zigbert.rsa; zip -r -D -9 -o ../$@ * -x '*/.svn/*' -x META-INF/zigbert.rsa +versioned-files:: + sed -e s/GWT_DEV_PLUGIN_VERSION/$(VERSION)/ manifest-template.json >prebuilt/gwt-dev-plugin/manifest.json + sed -e s/GWT_DEV_PLUGIN_VERSION/$(VERSION)/ updates-template.xml >prebuilt/updates.xml + extension: prebuilt/extension -rm -rf extension cp -r --preserve=mode $< $@ @@ -54,7 +65,7 @@ $(OBJS): -.PHONY: all realclean clean depend common install install-platform +.PHONY: all realclean clean depend common install install-platform versioned-files install:: oophm.xpi -cp --preserve=mode $< prebuilt
diff --git a/plugins/npapi/getversion b/plugins/npapi/getversion new file mode 100755 index 0000000..c5ec58f --- /dev/null +++ b/plugins/npapi/getversion
@@ -0,0 +1,10 @@ +#!/bin/sh +# Wrapper to prevent failure if svnversion isn't available + +V=`svnversion ${PWD}/.. 2>/dev/null` +if [ $? -gt 0 -o -z "$V" ] +then + V='0' +fi +echo $V | sed s/[^0-9].*$// +exit 0
diff --git a/plugins/npapi/manifest-template.json b/plugins/npapi/manifest-template.json new file mode 100644 index 0000000..2a257ab --- /dev/null +++ b/plugins/npapi/manifest-template.json
@@ -0,0 +1,23 @@ +{ + "name": "GWT Developer Plugin", + "version": "GWT_DEV_PLUGIN_VERSION", + "description": "A plugin to enable debugging with GWT's Development Mode", + "update_url": "https://dl-ssl.google.com/gwt/plugins/chrome/updates.xml", + "icons": { + "16": "gwt16.png", + "32": "gwt32.png", + "48": "gwt48.png", + "64": "gwt64.png", + "128": "gwt128.png" + }, + "background_page": "background.html", + "content_scripts": [ + { + "matches": ["http://*/*", "https://*/*", "file:///*"], + "js": ["record_tab_id.js"] + } + ], + "plugins": [ + { "path": "WINNT_x86-msvc/npGwtDevPlugin.dll", "public": true } + ] +}