Skip to content

Commit

Permalink
feat: add partial Edge support (browserpass#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
rylancates authored May 19, 2022
1 parent e3f18e6 commit 181ad38
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 14 deletions.
55 changes: 55 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,33 @@ hosts-chrome-user:
*) echo "The operating system $(OS) is not supported"; exit 1 ;; \
esac

.PHONY: hosts-edge
hosts-edge:
@case $(OS) in \
# Linux) mkdir -p "/opt/microsoft/msedge/native-messaging-hosts/"; \
# ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "/opt/microsoft/msedge/native-messaging-hosts/$(APP_ID).json"; \
# [ -e "/opt/microsoft/msedge/native-messaging-hosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
# ;; \
# Darwin) mkdir -p "/Library/Google/Chrome/NativeMessagingHosts/"; \
# ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "/Library/Google/Chrome/NativeMessagingHosts/$(APP_ID).json"; \
# [ -e "/Library/Google/Chrome/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
# ;; \
*) echo "The operating system $(OS) is not supported"; exit 1 ;; \
esac

.PHONY: hosts-edge-user
hosts-edge-user:
@case $(OS) in \
Linux|*BSD) mkdir -p "$(XDG_CONFIG_HOME)/microsoft-edge/NativeMessagingHosts/"; \
ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "$(XDG_CONFIG_HOME)/microsoft-edge/NativeMessagingHosts/$(APP_ID).json"; \
[ -e "$(XDG_CONFIG_HOME)/microsoft-edge/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
;; \
# Darwin) mkdir -p "${HOME}/Library/Application Support/Google/Chrome/NativeMessagingHosts/"; \
# ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "${HOME}/Library/Application Support/Google/Chrome/NativeMessagingHosts/$(APP_ID).json"; \
# [ -e "${HOME}/Library/Application Support/Google/Chrome/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
# ;; \
*) echo "The operating system $(OS) is not supported"; exit 1 ;; \

.PHONY: hosts-vivaldi
hosts-vivaldi:
@case $(OS) in \
Expand Down Expand Up @@ -402,6 +429,34 @@ policies-chrome-user:
*) echo "The operating system $(OS) is not supported"; exit 1 ;; \
esac

.PHONY: policies-edge
policies-edge:
@case $(OS) in \
# Linux) mkdir -p "/etc/opt/chrome/policies/managed/"; \
# ln -sfv "$(LIB_DIR)/browserpass/policies/chromium/$(APP_ID).json" "/etc/opt/chrome/policies/managed/$(APP_ID).json"; \
# [ -e "/etc/opt/chrome/policies/managed/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
# ;; \
# Darwin) mkdir -p "/Library/Google/Chrome/policies/managed/"; \
# ln -sfv "$(LIB_DIR)/browserpass/policies/chromium/$(APP_ID).json" "/Library/Google/Chrome/policies/managed/$(APP_ID).json"; \
# [ -e "/Library/Google/Chrome/policies/managed/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
# ;; \
*) echo "The operating system $(OS) is not supported"; exit 1 ;; \
esac

.PHONY: policies-edge-user
policies-edge-user:
@case $(OS) in \
# Linux|*BSD) mkdir -p "$(XDG_CONFIG_HOME)/microsoft-edge/policies/managed/"; \
# ln -sfv "$(LIB_DIR)/browserpass/policies/chromium/$(APP_ID).json" "$(XDG_CONFIG_HOME)/microsoft-edge/policies/managed/$(APP_ID).json"; \
# [ -e "$(XDG_CONFIG_HOME)/microsoft-edge/policies/managed/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
# ;; \
# Darwin) mkdir -p "${HOME}/Library/Application Support/Google/Chrome/policies/managed/"; \
# ln -sfv "$(LIB_DIR)/browserpass/policies/chromium/$(APP_ID).json" "${HOME}/Library/Application Support/Google/Chrome/policies/managed/$(APP_ID).json"; \
# [ -e "${HOME}/Library/Application Support/Google/Chrome/policies/managed/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \
# ;; \
*) echo "The operating system $(OS) is not supported"; exit 1 ;; \
esac

.PHONY: policies-vivaldi
policies-vivaldi:
@case $(OS) in \
Expand Down
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ If you provided `PREFIX` and/or `DESTDIR` while running `make install`, remember
| `make hosts-firefox-user` | Configure browserpass for Firefox browser, for the current user only |
| `make hosts-librewolf-user`| Configure browserpass for Librewolf browser, for the current user only |
| `make hosts-chrome-user` | Configure browserpass for Google Chrome or Opera browsers, for the current user only |
| `make hosts-edge-user` | Configure browserpass for Microsoft Edge browser, for the current user only |
| `make hosts-brave-user` | Configure browserpass for Brave browser, for the current user only |
| `make hosts-iridium-user` | Configure browserpass for Iridium browser, for the current user only |
| `make hosts-vivaldi-user` | Configure browserpass for Vivaldi browser, for the current user only |
Expand All @@ -175,27 +176,30 @@ If you provided `PREFIX` and/or `DESTDIR` while running `make install`, remember
| `sudo make hosts-firefox` | Configure browserpass for Firefox browser, system-wide |
| `sudo make hosts-librewolf`| Configure browserpass for Librewolf browser, system-wide |
| `sudo make hosts-chrome` | Configure browserpass for Google Chrome or Opera browsers, system-wide |
| `sudo make hosts-edge` | Configure browserpass for Microsoft Edge browser, system-wide |
| `sudo make hosts-brave` | Configure browserpass for Brave browser, system-wide |
| `sudo make hosts-iridium` | Configure browserpass for Iridium browser, system-wide |
| `sudo make hosts-vivaldi` | Configure browserpass for Vivaldi browser, system-wide |
| `sudo make hosts-slimjet` | Configure browserpass for Slimjet browser, system-wide |

In addition, Chromium-based browsers support the following `make` goals:

| Command | Description |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `make policies-chromium-user` | Automatically install browser extension from Web Store for Chromium browser, for the current user only |
| `make policies-chrome-user` | Automatically install browser extension from Web Store for Google Chrome browser, for the current user only |
| `make policies-brave-user` | Automatically install browser extension from Web Store for Brave browser, for the current user only |
| `make policies-iridium-user` | Automatically install browser extension from Web Store for Iridium browser, for the current user only |
| `make policies-slimjet-user` | Automatically install browser extension from Web Store for Slimjet browser, for the current user only |
| `make policies-vivaldi-user` | Automatically install browser extension from Web Store for Vivaldi browser, for the current user only |
| `sudo make policies-chromium` | Automatically install browser extension from Web Store for Chromium browser, system-wide |
| `sudo make policies-chrome` | Automatically install browser extension from Web Store for Google Chrome browser, system-wide |
| `sudo make policies-brave` | Automatically install browser extension from Web Store for Brave browser, system-wide |
| `sudo make policies-iridium` | Automatically install browser extension from Web Store for Iridium browser, system-wide |
| `sudo make policies-slimjet` | Automatically install browser extension from Web Store for Slimjet browser, system-wide |
| `sudo make policies-vivaldi` | Automatically install browser extension from Web Store for Vivaldi browser, system-wide |
| Command | Description |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `make policies-chromium-user` | Automatically install browser extension from Web Store for Chromium browser, for the current user only |
| `make policies-chrome-user` | Automatically install browser extension from Web Store for Google Chrome browser, for the current user only |
| `make policies-edge-user` | Automatically install browser extension from Web Store for Microsoft Edge browser, for the current user only |
| `make policies-brave-user` | Automatically install browser extension from Web Store for Brave browser, for the current user only |
| `make policies-iridium-user` | Automatically install browser extension from Web Store for Iridium browser, for the current user only |
| `make policies-slimjet-user` | Automatically install browser extension from Web Store for Slimjet browser, for the current user only |
| `make policies-vivaldi-user` | Automatically install browser extension from Web Store for Vivaldi browser, for the current user only |
| `sudo make policies-chromium` | Automatically install browser extension from Web Store for Chromium browser, system-wide |
| `sudo make policies-chrome` | Automatically install browser extension from Web Store for Google Chrome browser, system-wide |
| `sudo make policies-edge` | Automatically install browser extension from Web Store for Microsoft Edge browser, system-wide |
| `sudo make policies-brave` | Automatically install browser extension from Web Store for Brave browser, system-wide |
| `sudo make policies-iridium` | Automatically install browser extension from Web Store for Iridium browser, system-wide |
| `sudo make policies-slimjet` | Automatically install browser extension from Web Store for Slimjet browser, system-wide |
| `sudo make policies-vivaldi` | Automatically install browser extension from Web Store for Vivaldi browser, system-wide |

## Building the app

Expand Down

0 comments on commit 181ad38

Please sign in to comment.