From 6e9ddc2851862a0477cf931e5c7cfb4d3b4e44ff Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Thu, 13 Aug 2020 10:35:55 +0200 Subject: support build of chrome and ff webext; use version from latest tag --- Makefile | 12 ++++++++++++ bin/build_plugin | 7 +++++-- bin/package_plugin | 17 ++++++++++++++++ manifest-chrome.json | 40 ++++++++++++++++++++++++++++++++++++++ manifest-firefox.json | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ manifest.json | 54 --------------------------------------------------- ui | 2 +- 7 files changed, 129 insertions(+), 57 deletions(-) create mode 100755 bin/package_plugin create mode 100644 manifest-chrome.json create mode 100644 manifest-firefox.json delete mode 100644 manifest.json diff --git a/Makefile b/Makefile index 5015077..936d9a4 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,14 @@ +all: build package_firefox package_chrome clean + ./bin/build_plugin firefox chrome + build: ./bin/build_plugin + +package_firefox: build + ./bin/package_plugin firefox + +package_chrome: build + ./bin/package_plugin chrome + +clean: + if test -d build; then rm -rf build; fi diff --git a/bin/build_plugin b/bin/build_plugin index 2c5ffe0..3f81408 100755 --- a/bin/build_plugin +++ b/bin/build_plugin @@ -18,6 +18,9 @@ cd .. rm -rf ui -zip -r $DEST/reclaim-plugin.zip -FS * -rm -rf $TEMPDIR +if test -d $DEST/build +then + rm -rf $DEST/build +fi +mv $TEMPDIR $DEST/build cd $DEST diff --git a/bin/package_plugin b/bin/package_plugin new file mode 100755 index 0000000..f846f5f --- /dev/null +++ b/bin/package_plugin @@ -0,0 +1,17 @@ +#!/bin/sh + +TEMPDIR=build +DEST=$PWD + +cd $TEMPDIR + +TARGET=$1 +if test $1 != "firefox" -a $1 != "chrome" +then +echo "Unknown extension target. Use 'firefox' or 'chrome'" +exit 1 +fi + +cp manifest-$TARGET.json manifest.json # Set manifest for browser +zip -r $DEST/reclaim-plugin-$TARGET-$(git describe --tags).zip -FS * +cd $DEST diff --git a/manifest-chrome.json b/manifest-chrome.json new file mode 100644 index 0000000..9896cff --- /dev/null +++ b/manifest-chrome.json @@ -0,0 +1,40 @@ +{ + + "manifest_version": 2, + "name": "re:claimID", + "description": "An extension for use with re:claimID.", + "version": "0.13.0", + + "browser_action": { + "default_icon": "icons/logo.png", + "theme_icons": [{ + "light": "icons/logo_dark.png", + "dark": "icons/logo.png", + "size": 32 + }], + "default_title": "re:claimID", + "default_popup": "popup/popup.html" + }, + + "icons": { + "48": "icons/logo48.png", + "96": "icons/logo96.png" + }, + + "background": { + "scripts": [ + "background/reclaim.js", + "scripts/gnunet.js" + ] + }, + + "permissions": ["storage", "https://api.reclaim/*", "https://ui.reclaim/*", "http://localhost:7776/*", + "webRequest", "webRequestBlocking"], + "web_accessible_resources": ["*/**", "index.html", "*.js", "assets/*", "*.woff*", "*.ttf", "*.svg"], + + "options_ui": { + "page": "index.html", + "open_in_tab": true, + "chrome_style": true + } +} diff --git a/manifest-firefox.json b/manifest-firefox.json new file mode 100644 index 0000000..da98670 --- /dev/null +++ b/manifest-firefox.json @@ -0,0 +1,54 @@ +{ + + "manifest_version": 2, + "name": "re:claimID", + "description": "An extension for use with re:claimID.", + "version": "0.13.0", + + "applications": { + "gecko": { + "strict_min_version": "57.0" + } + }, + "browser_specific_settings": { + "gecko": { + "id": "{b2d334a4-bcd4-476f-9122-4e85f8a71ec5}", + "strict_min_version": "57.0" + } + }, + + "browser_action": { + "browser_style": true, + "default_icon": "icons/logo.png", + "theme_icons": [{ + "light": "icons/logo_dark.png", + "dark": "icons/logo.png", + "size": 32 + }], + "default_title": "re:claimID", + "default_popup": "popup/popup.html" + }, + + "icons": { + "48": "icons/logo48.png", + "96": "icons/logo96.png" + }, + + "background": { + "scripts": [ + "background/reclaim.js", + "scripts/gnunet.js" + ] + }, + + "permissions": ["storage", "https://api.reclaim/*", "https://ui.reclaim/*", "http://localhost:7776/*", + "webRequest", "webRequestBlocking"], + "web_accessible_resources": ["*/**", "index.html", "*.js", "assets/*", "*.woff*", "*.ttf", "*.svg"], + + "options_ui": { + "page": "index.html", + "open_in_tab": true, + "browser_style": true, + "chrome_style": true + } +} diff --git a/manifest.json b/manifest.json deleted file mode 100644 index ff07a58..0000000 --- a/manifest.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - - "manifest_version": 2, - "name": "re:claimID", - "description": "An extension for use with re:claimID.", - "version": "0.3.0", - - "applications": { - "gecko": { - "strict_min_version": "57.0" - } - }, - "browser_specific_settings": { - "gecko": { - "id": "{b2d334a4-bcd4-476f-9122-4e85f8a71ec5}", - "strict_min_version": "57.0" - } - }, - - "browser_action": { - "browser_style": true, - "default_icon": "icons/logo.png", - "theme_icons": [{ - "light": "icons/logo_dark.png", - "dark": "icons/logo.png", - "size": 32 - }], - "default_title": "re:claimID", - "default_popup": "popup/popup.html" - }, - - "icons": { - "48": "icons/logo48.png", - "96": "icons/logo96.png" - }, - - "background": { - "scripts": [ - "background/reclaim.js", - "scripts/gnunet.js" - ] - }, - - "permissions": ["storage", "https://api.reclaim/*", "https://ui.reclaim/*", "http://localhost:7776/*", - "webRequest", "webRequestBlocking"], - "web_accessible_resources": ["*/**", "index.html", "*.js", "assets/*", "*.woff*", "*.ttf", "*.svg"], - - "options_ui": { - "page": "index.html", - "open_in_tab": true, - "browser_style": true, - "chrome_style": true - } -} diff --git a/ui b/ui index 7c39f4d..8f771fe 160000 --- a/ui +++ b/ui @@ -1 +1 @@ -Subproject commit 7c39f4d7980edda8fdfa65f0304153d6205791de +Subproject commit 8f771fe65b5fa62b9533d54a20044067f1086ff2 -- cgit v1.2.3